Director - dandeliondeathray/gooseberry GitHub Wiki
The Director service is Erik's attempt at the core logic.
Terminology
The Director executes a pipeline.
A pipeline consists of many steps.
A step has an associated work, which it performs.
A step has zero or more dependencies, which are executed before the step.
A step has a result.
A step can be executed.
Work can be scheduled.
Step states
A step is a state machine.
-
State: Not executed
Initial state upon step creation.
-
State: Dependencies pending
Dependencies are being executed, but not all have completed.
-
State: Work pending
Work has begun, but has not completed. All, if any, dependencies have completed.
-
State: Completed
All dependencies have completed, and the work is complete. There is a result.
-
Transition: Not executed -- Execute --> Dependencies pending:
Execute all direct dependencies in parallel.
-
Transition: Not executed -- Execute with no dependencies --> Work pending
Schedule the work.
-
Transition: Dependencies pending -- All completede --> Work pending
All dependencies have completed. Schedule work.
-
Transition: Dependencies pending -- At least on failed --> Completed with result.
At least on dependency failed. Cannot schedule work. Complete with failed result.
-
Transition: Work pending -- Work finishes with some result --> Completed with result
The work has finished, with some result.