An Orchestrator executes a set of, possibly dependent, Tasks.
This class holds all the settings that parameterize akkastrator.
This class holds all the settings that parameterize akkastrator.
By default these settings are read from the Config obtained with ConfigFactory.load().
You can change the settings in multiple ways:
new Settings(yourConfig)However it will be more succinct to pass your config directly to your akkastrator:
context.actorOf(Props(classOf[YourAkkastrator], yourConfig))
object YourSettings extends Settings() { override val saveSnapshotEveryXMessages = 1000 } context.actorOf(Props(classOf[YourAkkastrator], YourSettings))
An Orchestrator executes a set of, possibly dependent,
Tasks. A task corresponds to sending a message to an actor, handling its response and possibly mutate the internal state of the Orchestrator.The Orchestrator together with the Task is able to:
NOTE: the responses that are received must be Serializable.
In order for the Orchestrator and the Tasks to be able to achieve all of this they have to access and modify each others state directly. This means they are very tightly coupled with each other. To make this relation more obvious and to enforce it, you will only be able to create tasks inside an orchestrator.
If you have the need to refactor the creation of tasks so that you can use them in multiple orchestrators you can leverage self type annotations like so: