#workflow #execution #job #future #reactor #engine #toca

bin+lib execution-engine

Toca Execution Engine implemented using Futures and async/await

5 releases

0.1.4 Mar 1, 2022
0.1.3 Mar 1, 2022
0.1.2 Mar 1, 2022
0.1.1 Mar 1, 2022
0.1.0 Mar 1, 2022

#1373 in Asynchronous

MIT/Apache

46KB
776 lines

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.

Dependencies

~21–36MB
~674K SLoC