Overview
Explore the challenges of maintaining data consistency in microservice architectures and learn how to implement sagas as an alternative to distributed transactions. Dive into the benefits and drawbacks of using sagas, understand their eventually consistent nature, and discover how to design and implement them in Java applications. Gain insights into encapsulated data, compensating transactions, API design complexities, and the differences between implicit and explicit orchestrators. Follow along as the speaker demonstrates initializing sagas, handling commands in customer services, and publishing messages using polling techniques.
Syllabus
Intro
About Chris
Microservice architecture
Loose coupling = encapsulated data
Use Sagas instead of 2PC
Rollback using compensating transactions
Sagas complicate API design
Sagas complicate the business logic
Implicit vs. explicit orchestrator
Initializing the saga
Customer Service - command handling
Publishing message using polling
Summary
Taught by
Devoxx