Total orders
0
saga instances
Distributed systems demo
Four Go processes, four SQLite databases and an embedded NATS JetStream broker. Every command is committed with its outbox row in one transaction, then relayed to the broker. Failures trigger compensating transactions — and every step streams into the log panel below.
Total orders
0
saga instances
Completed
0
all steps succeeded
In flight
0
running or compensating
Compensated
0
rolled back cleanly
Failed
0
rejected at reservation
Choose a scenario to exercise the happy path or a compensation.
The endpoint returns immediately. Orders are created by a bounded worker pool and processed asynchronously through the saga.
loading…
state machine · outbox relay · SSE hub
loading…
reserve / release stock
loading…
charge / refund
loading…
create / cancel shipment
Each row is one order moving through the state machine.
| Order | Status | Current step | Amount | Steps | Age | |
|---|---|---|---|---|---|---|
| No orders yet. Place one above. | ||||||
The orchestrator owns the state machine and decides the next command. Participants never call each other, so the compensation path is explicit.
Business state and the outbox row share one SQLite transaction. The relay only marks a row published after JetStream confirms persistence.
Deterministic command IDs and processed-command tables turn at-least-once delivery into effectively-once business behaviour.
The load-test button is a real HTTP endpoint. It returns in milliseconds while a bounded worker pool drives the sagas asynchronously.