Problem Statement
What problem does the Saga pattern address in microservices?
Explanation
A saga breaks a write that spans services into a sequence of local transactions with compensating actions. If a step fails, previous steps are undone by compensation.
You can orchestrate centrally or choreograph via events. Design idempotent handlers and clear failure semantics.
Code Solution
SolutionRead Only
Reserve inventory → authorize payment → confirm order; else compensate
