Using sagas to maintain data consistency in a microservice architecture by Chris Richardson

Devoxx · 323K views · 2017 · 49:10

Open on YouTube

Software architecture & designDistributed systemstalk

Why Stack Overflow recommends it

Stack Overflow users link it when answering questions about transactions, atomicity and message-driven coordination across microservices, as a clear introduction to the saga pattern.

Recommended by 2 people across 2 different months, 2019 to 2020.

What it is

A Devoxx conference talk by Chris Richardson, creator of microservices.io, on using sagas to keep data consistent across microservices that each own their database. It explains why JTA distributed transactions are not an option, how sagas are eventually consistent rather than ACID, and how to design and implement them in a Java application.

What people said

Recommends tony _008 · 2019-11 · Stack Overflow · on “Event Sourcing - Apache Kafka + Kafka Streams - How to assure atomicity / transactionality”

I just want to add a very good presentation which focuses on the usage of sagas for dealing with the problem of transactional integrity acorss distributed microservices. Here you go: [this video]

Recommends reda la · 2020-08 · Stack Overflow · on “Choreography Sagas in DDD - Chain of Integration Events?”

I found this talk helpful: [this video] I don't remember all details about it, but it seems that the given example was a choreography saga

Cites Imran Arshad · 2019-01 · Stack Overflow · on “What type of application to subscribe to Azure Message Queues?”

That's right, This is called Async communication(AMQP). Once MicroService1 (MS1) drops the message in Queue it shouldn't care what happens to the message and that's the whole point creating loosely coupled Microservices. So there is not way For MS1 to know that message has been processed. MS2 will have to drop the message in another queue for MS1 to pick that up once completed and that's how MS1 would know the transaction is completed. The pattern itself is called Saga and you can find more about here [this video]