Skip to content

Conversation

@PetrosPapapa
Copy link
Member

@PetrosPapapa PetrosPapapa commented Jun 27, 2019

Release of v1.4.0.

This includes:

PetrosPapapa and others added 19 commits December 9, 2018 18:01
Closes #26

No need to change the factories and no need for a `PromiseHandleFactory`
There are a few design decisions to be made
See #34

Need to fix and extend testing
Need to see if it fits with Kafka and Aurora stuff
# Conflicts:
#	src/com/workflowfm/pew/PiEvents.scala
This makes for a cleaner, more flexible implementation, allowing
multiple simulations across multiple `Coordinator`s.

The downside is that simulations can be run asynchronously, making it
hard to disambiguate which results came from which `Coordinator`.

We leave that problem to the user for now.
@PetrosPapapa PetrosPapapa added the feature New feature or request label Jun 27, 2019
@PetrosPapapa PetrosPapapa self-assigned this Jun 27, 2019
PetrosPapapa and others added 22 commits July 30, 2019 17:47
Using a separate AkkaExecutor for each simulation is inevitable at
this point... The problem is just too complex otherwise.

1) Atomic processes run in their own actor, but they don't have access
to it in advance, so they can't receive directly. We use the ask
pattern for that.
2) They need to communicate with the SimulationActor to queue tasks,
so they need to know its ActorRef in advance.
3) The SimulationActor needs to know the Executor in advance so that
it can start the simulation when instructed by the Coordinator.
4) The Executor needs to know the available processes in advance.

Hence the cycle.
I tried to make the executor a variable in SimulationActor, but now
stuck at (4). The PiProcessStore in AkkaExecutor is mutable, but that
is too much mutability for my taste. I think having the
SimulationActor generate its own AkkaExecutor will do at least for now.
Realised that ready() gets called before the processes have a chance
to register their tasks.
Resolved multiple race conditions.

Everything looks fine now. We only need to deal with processes that
register multiple or no tasks. QueueMachine in Aurora for example.

We need to take care of removing them from the taskWaiting list.
For multiple tasks, we might want to add them once for each task they
register and avoid the additional ready call.
For no tasks, we need to think about managing multiple instances with
the same name.
Perhaps we can use metadata to register our own unique ID for all
processes?
If the process takes too long to declare itself resumed, we may
proceed the coordinator before it resumes.
Also tightens synchronisation when waiting/resuming
Also allows swapping of the process map in a `PiInstance`/`PiState`.

Closes #44
Things like `SimulationExecutor`, `PiInstance.isSimulationReady` etc
are no longer needed.
Affects `AkkaExecutor`, though it already had a timeout parameter
@PetrosPapapa PetrosPapapa marked this pull request as ready for review December 19, 2019 01:17
@PetrosPapapa PetrosPapapa merged commit 7178e1d into master Jul 9, 2020
@PetrosPapapa PetrosPapapa deleted the v1.4.0 branch July 9, 2020 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants