workflowfm / proter

A discrete event simulator for asynchronous prioritized processes
http://docs.workflowfm.com/proter
Apache License 2.0
1 stars 0 forks source link

Full actor-based simulation #3

Closed PetrosPapapa closed 4 years ago

PetrosPapapa commented 4 years ago

The main purpose of this PR is to solve #1 and all the underlying implementation issues.

Simulation - Coordinator synchronisation

The Coordinator now has a much more explicit interaction with the simulations and waits for them to signal when they have completed all computations.

This means that Thread.sleep is no longer needed, resulting in a huge speed boost compared to the previous version and a generally more robust system.

Simulation - Coordinator interaction

It also allows (better) intermediate interaction. The SimulationActor can interact with the Coordinator arbitrarily while the latter is just waiting for the AddTasks message. This includes having a simulation that triggers other simulations.

Event Stream

This also implements an event stream so that you can monitor what the Coordinator is doing, using SubAkka.

This will form version 0.2.