Saga
/ˈsɑːɡə/ · Noun · Development
Definitions
A pattern for managing distributed transactions across multiple services without a global two-phase commit. A saga breaks a transaction into a sequence of local transactions, each publishing an event that triggers the next step; if any step fails, compensating transactions are executed in reverse order to undo prior changes.
In plain English: A way to coordinate a multi-step process across different services, with a plan to undo earlier steps if a later one fails.
Example: "The order saga first reserves inventory, then charges payment, then ships — if payment fails, it runs a compensating action to release the reserved stock."