Saga Pattern
Saga Pattern
The problem
In microservices, you can't use traditional DB transactions across service boundaries
Choreography
No central controller — services listen for events and react independently. Best for loosely coupled systems.
Orchestration
A central orchestrator directs each service step-by-step. Best when you need clear control and monitoring.
Benefits
Services stay independent and loosely coupled
Drawbacks
Complex to design, especially compensating actions
Best practices
Keep each step small, focused, and idempotent
Do we have any examples in LessonUp?
Where could we benefit from this pattern in LessonUp?