In this video, I will walk through how to implement distributed transactions using Saga Orchestration design pattern using Stateless state machine.
Managing transaction across multiple microservices is a hard problem to solve. The saga pattern was introduced to solve this problem of managing distributed transactions.
For the orchestration pattern, as the name suggests in the orchestration implementation there is a centralized orchestrator.
The orchestrator tells each microservice which operation to perform. And in case of issues, it also sends messages to different microservices for a rollback of transactions. It manages the state of each task through a state machine.
Pros:
1. Highly scalable logic since individual microservices do not have to talk to each other.
2. No possibility of cyclic dependency between microservices.
In my last few videos where I covered stateless state machine as well Saga orchestration pattern is here:
Saga Orchestration: • Saga Orchestration Pat...
State machine: • State Machine and Stat...
Stateless state machine: • Proxy Design Pattern (...
My RU-vid channel URL: / dotnetcorecentral
My Blog URL: dotnetcorecent...
My GitHub repo: github.com/cho...
2 окт 2024