Saga Pattern: Distributed Transactions Across Microservices
Interactive 3D simulation of the Saga pattern: watch transactions flow through a chain of microservices, trigger compensating rollbacks on failure, and compare orchestrated vs. choreographed coordination in real time.
Microservices architectures split one application into independent services that own their own data and talk over the network — which means a single ACID transaction spanning all of them is off the table. The Saga pattern solves this by chaining local transactions, one per service, and defining a compensating action for every step so that a failure partway through can be undone in reverse rather than left half-committed. This simulator renders a live chain of five services — Order, Payment, Inventory, Shipping and Notification — and streams saga instances through them in 3D: watch each one commit its local step and move forward, or, when a step fails, watch it trigger a wave of compensating transactions that walk backward through every service that already committed. A failure-probability slider controls how often steps fail, a spawn-rate slider controls saga throughput, and a mode toggle switches the coordination style between choreography (services react to each other's events directly) and orchestration (a central coordinator hub drives every step) — with live counters comparing the observed success rate against the theoretical (1−p)ⁿ prediction.
Watch saga transactions flow through a chain of five microservices, trigger compensating rollbacks on failure, and compare orchestrated vs. choreographed coordination against the (1-p)^n success prediction.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install