Saga Choreography Pattern

Saga Choreography Pattern

Using the Choreography method (distributed)


This type of asynchronous event-driven saga pattern is used when the code running in each service decides how to handle events in its scope and what to do next.?Of course, you can also think of it as a chain of event-driven microservices.?Each service listens to the events of others and emits its own events, which can cause events to be paired with each other.

Using the Choreography method will have the best results when more teams are involved in managing the saga.?One of the advantages of this method is that each team will focus exclusively on the sagas within its range.?On the other hand, there is no need for a separate microservice responsible for coordinating a workflow because there is no central coordinator.

However, this approach can make it difficult to understand more complex workflows and how some services interact.?The absence of a central coordinator in the Choreography method has caused the relevant microservices to listen to failure events in order to return to the previous stage.

No alt text provided for this image


you can see an example in my GitHub account :


要查看或添加评论,请登录

hussein zakizadeh的更多文章

  • Stream

    Stream

    In javascript almost everything is a Stream, when you click on the page, it creates an stream which is consist of click…

  • Event Sourcing Sample with SQL and EventStoreDB

    Event Sourcing Sample with SQL and EventStoreDB

    What is Event Sourcing? Martin Fowler says: "Capture all changes to an application state as a sequence of events." The…

  • Domain Events in .Net

    Domain Events in .Net

    Domain Events in .Net “A Domain Event captures the memory of something interesting which affects the domain “ — Martin…

  • Microservice architecture design with SAGA pattern

    Microservice architecture design with SAGA pattern

    microservices are known as a good way to scale and maintain programs as easily as possible. However, this method also…

    4 条评论

社区洞察

其他会员也浏览了