execution-engine 0.1.0

Toca Execution Engine implemented using Futures and async/await
execution-engine-0.1.0 is not a library.
Visit the last successful build: execution-engine-0.1.4

Execution Engine MkII


The EE is split into 2 main parts

  1. 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.
  2. 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:

  1. Spawn a new task which will perform all of the work associated with executing a wf to completion
  2. Deserialize the workflow into a Job, the Job type should describe the entity as accurately as possible
  3. 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.

The Executor is responsible for running each job and also the ability to cancel each job

while let Some(msg) = nats.subscriber("job.*").next().await {
match msg.topic {
"job.execute" => {...}
"job.cancel" => {...}
}
}