durable-workflow-lab
An order saga on Temporal, run against a real Temporal dev server (Temporal CLI 1.9.1, server 1.32). Every timeline below is the actual event history that run produced, exported by cmd/scenarios. Personal learning project, not a production system.
Outcome
What this shows
Durable execution: the workflow function holds no state of its own. Its progress is the event history stored by the server, so a new worker rebuilds it by replaying that history and carries on. In the last scenario the first worker is stopped mid-charge; the second worker does not repeat the reservation and the card is charged once.
Activities run at least once: after a lost worker the charge is attempted again. The idempotency key is what keeps that from double charging, so side effects must be idempotent.
Determinism and versioning: the test suite replays every recorded history against the current code (passes), against a version that adds a step behind workflow.GetVersion (passes) and against one that adds the same step with no version marker (rejected with Temporal's non-determinism error, code TMPRL1100).
Not covered: multi-cluster namespaces, child workflows and continue-as-new at scale, Temporal Cloud, and any load testing. I have not run Temporal in production. Cadence and Windmill are compared in the README from their documentation only.
References
- Temporal: Workflows and Workflow definition and determinism
- Temporal: Activities and Retry policies
- Temporal: Event history
- Temporal Go SDK: Versioning and Testing suite
- go.temporal.io/sdk package documentation
- Garcia-Molina and Salem, Sagas (SIGMOD 1987), and the Saga pattern
- Cadence and Windmill documentation, for comparison