Distributed Data Patterns
Keep data consistent across service boundaries with sagas, a transactional outbox and idempotent consumers, and use CQRS or event sourcing only where they pay off.
3 objectives 6 steps about 135 min
Check what you know
The lessons are coming later. The knowledge check is ready now.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Design a saga with compensating actions and semantic locks for a business process spanning several services.
- Eliminate dual writes with a transactional outbox (polling or change data capture) and an idempotent inbox.
- Decide whether CQRS read models or event sourcing are justified for a context and describe their operational costs.
Lesson plan
6 steps, about 135 min · 0 of 5 lessons available so far
- Why two-phase commit rarely fits and what replaces it Concept · 15 min · coming later
- Orchestrated and choreographed sagas with compensation Worked example · 30 min · coming later
- The dual-write problem and the transactional outbox Concept · 20 min · coming later
- Building an outbox relay and an idempotent consumer Lab · 30 min · coming later
- CQRS read models and event sourcing: when the cost is justified Concept · 25 min · coming later
- Consistency pattern check Knowledge check · 6 questions
Practise it
Implement an order-payment-inventory saga across three services with an outbox table relayed to a broker, inject a failure in the payment step, and show that compensations run and no message is lost or applied twice.
Build it from scratch
Practice builds that exercise this skill by re-creating a real technology.
References
Hard prerequisites
Unlocks
On these roadmaps
Progress and evidence for this skill are shared across all of them.