saga-graph is an implemented proposal for extending the linear SAGA pattern with parallel execution, WAL-before-action as a safety net, and a clear separation of responsibilities for recovery outside the happy path.
The core ideas:
-
WAL-before-action — compensation is persisted before the step executes.
-
Parallel forks — concurrent steps within a single saga with all-or-nothing semantics.
-
TTL per step — every step has a configurable time to live.
-
ZombieHunter — an autonomous background agent that resumes blocked sagas.
-
Zero external dependencies in
core.
The project includes a Problem Boundaries section that analyzes the limits of compensating distributed resource consumption — the Two Generals problem applied to scarce resources in competition, the token protocol for adapted services, and the finalism contract.
Run it:
git clone https://github.com/ccerdadiaz/saga-graph.git
cd saga-graph
sbt "examples/runMain sagagraph.examples.goblin.GoblinArmyDemo"
Feedback and contributions welcome — particularly real application scenarios and problem boundaries.