A Different Flavor of the Distributed Transactions
summary
Compares 2PC’s locking and coordinator failure problem to the Saga approach, using MicroProfile LRA 2.0 and a Quarkus + Narayana implementation; demos a trip workflow (flight → hotel → car) with services on ports 8081/8082, a Docker LRA coordinator, propagated LRA context headers, and invoked compensation handlers when a participant returns 500. Shows how to declare lra/compensate/complete endpoints, set a 1s timeout, and that the coordinator retries failed compensations until eventual consistency is achieved; the demo runs and compensations are triggered as expected.
AI-written summary · about
chapters (13)
- 0:00Introduction and context
- 1:48Understanding ACID
- 3:222PC protocol limitations
- 6:06Introducing the saga pattern
- 7:38Saga failure scenarios
- 12:06BASE consistency model
- 13:48Orchestration vs choreography
- 16:48Setting up the development environment
- 21:59Coding the flight service
- 26:50Implementing compensation and completion
- 29:35Managing saga identification
- 32:26Building microservices communication
- 37:05Advanced configurations and Q&A
