Event Sourcing
Committed events provide durable Flow state, recovery, and an inspectable execution history.
Aggregates and Projections
An aggregate is the ordered event stream for one resource, such as the catalog or one Flow. Argyll appends each state change to that stream. A projection is the resource’s current state, rebuilt by applying its events in order.
| Aggregate | State |
|---|---|
["catalog"] | Registered Step definitions |
["cluster"] | Per-node Step health |
["flow", "flow-id"] | One Flow’s execution history |
The WebSocket API provides the event catalog and subscription protocol.
Committed Execution
The engine commits the event that authorizes a Work Item before dispatching its external action. After a restart, Argyll reconstructs the same state and resumes authorized work from that point. The receipt token carries the Work Item’s identity to the service, allowing repeated delivery to represent the same logical effect.
Flow outcomes and deactivation are separate events. flow_completed or flow_failed establishes the result for callers. flow_deactivated records that active work and compensation have settled, completing the Flow’s side-effect history.
Recovery and Inspection
On startup, each node rebuilds its projections from the shared stores and resumes scheduled work from committed state. Operators use the same event history to:
- Inspect why a Flow reached its current state
- Replay state after restart
- Subscribe to current state and live changes through WebSocket