Loading lesson…
Level 1 · Apprentice0 XP
When one database transaction is impossible, use a chain of steps that can be undone.
Step 1 / 5
ProblemA trip booking reserves a flight, a hotel and a car in three services. The car step fails. The flight and hotel are already reserved and charged.
← → step
Before this: API gateways, service discovery and service mesh
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Model a 'book trip' saga with three steps and compensations, as an orchestrator state machine. Write a test where step 3 fails and assert that compensations ran in reverse order.