GithubHelp home page GithubHelp logo

yeasin90 / forked-saga-sagastatemachine_medium Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vahidalizadeh7070/sagastatemachine_medium

0.0 0.0 0.0 53 KB

This repo contains the implementation of saga pattern using MassTransit which is a orchestration type.

C# 100.00%

forked-saga-sagastatemachine_medium's Introduction

Saga Medium

In this repo, the Saga orchestration will be covered, and a simple scenario will be implemented to indicate how it works. In the previous article, MassTransit covered and demonstrated how can send a message through MassTransit and RabbitMQ. The code is available on GitHub and if there are any questions, please feel free to visit my website and contact me. So, let's get started.

Scenario

In this scenario, three services are going to be used to illustrate the process of performing the saga pattern and managing the consistency of data. The services are: TicketService: Responsible for registering a ticket GenerateTicketService: Responsible for generating a ticket EmailService: Responsible for sending ticket information to the user (to keep the example simple, logging information will be used)

SagaDiagram As shown in the above image, a client will send a request to TicketService to register a ticket, then a AddTicketEvent will occur and send a message to GenerateTicketService and if the message contains valid values, it will send a message to EmailService to send a confirmation email that contains all information of ticket to the client. If one of the Services of GenerateTicketService or EmailService retrieves an invalid message the Cancel event will occur and incoming data will be removed from all Service's database.

Prerequires

  • C# and .NET Core
  • Visual Studio or VSCode
  • Entity Framework core or any other ORMs
  • SQL or NoSQL databases
  • MassTransit
  • RabbitMQ
  • Docker
  • Postman

YouTube

https://youtu.be/dTI4FF7VogU

Medium

https://medium.com/@vahidalizadeh1990/implementation-of-saga-orchestration-using-masstransit-dd238530f0d7

forked-saga-sagastatemachine_medium's People

Contributors

vahidalizadeh7070 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.