Overview
Syllabus
Intro
Remember the monolith?
Micro services
The journey
Car rental co.
Travel agency
Travel packages
Separate databases Multiple services
Fire and forget
Manual failure recovery
Let's automate recovery
Brute force
Distributed transactions?
2-phase commit
Scalability issues
Single point of failure
Enlightenment
What if we didn't stick to ACID?
The saga pattern
Original purpose
Definition: Saga
Sequence of actions
Idempotent compensating action
Definition: Idempotent
Happy path
The Saga guarantee
Atomicity vs Availability
Digging deeper
SEC Saga Execution Coordinator
Saga log
When to undo?
Forward recovery
Periodically retry
Each action needs a unique ID
Conclusion
Saga helps you think of the error case
Think of compensating actions
Think of idempotent actions
Taught by
Devoxx