Expand description
Execution Engine MkII
The EE is split into 2 main parts
- Executor - This is responsible for driving the workflows to completion and should contain all the objects required for each workflow to be executed, think of this as a runtime.
- Reactor - The reactor is responsible for notifying the executor when a future can make progress, this is done via the Waker API.
When a workflow is sent to the EE, the flow is as follows:
- Spawn a new task which will perform all of the work associated with executing a wf to completion
- Deserialize the workflow into a Job, the Job type should describe the entity as accurately as possible
- Drive the workflow forward, this uses an event based stream to do so
When a workflow reaches a point where it cannot make progress (e.g. waiting for Bots to Lock or waiting for an Activity to complete) it should yield execution using the underlying mechanics of Rust’s async/await.
Modules§
- executor
- The logic for executing a job
- node
- The interface for running a node
- reactor
- Register interest in events and wake futures when the event occurs
- spawner
- Spawns new jobs and handles cancellations
- workflow
- The workflow module contains the structs and functions relating to the Workflow object and job object.
Functions§
- start
- Sets up the runtime and starts the message broker listeners