Sagas
Placing an order touches four services: orders, payments, stock and delivery. Each has its own database, and there's no transaction that covers them all. Payment succeeds, then stock runs out. How do you put things back?
In this lesson you'll learn to
- Explain a saga as a sequence of local transactions, each with a compensating action.
- Design compensating actions, and order steps so the ones that can't be undone come last.
- Compare orchestration and choreography for running a saga.
- Handle the lack of isolation in sagas, and make steps and compensations safe to retry.
Create a free account to open this lesson
It's free. You'll get every free lesson, quizzes that save your progress, daily flashcards and streaks.