Evolving from a monolithic architecture to microservices is not a long, quiet river. One of the main challenge, is transactional integrity. How to ensure global data consistency with business transactions spanning and changing several services?
The first solution that comes to mind is distributed ACID transactions. Unfortunately, this solution is far from optimal in terms of coupling, performance, scalability and fault tolerance.
The good news is that there is an alternative that is better suited to microservices architectures: SAGA! The concept is quite old but implementations are relatively recent and propose different flavors. SAGA can be declined in 2 modes: choreography and orchestration (technical or functional). We will see how to implement them concretely with 3 technical solutions: MicroProfile Long Running Action specification, Eventuate Tram and Debezium Outbox Event Router frameworks.
This presentation will give you a global understanding of the transactional integrity problem and how to effectively address it in your next microservices project.