Giter VIP home page Giter VIP logo

edaorchestration's Introduction

Event-Driven Saga Orchestration

author : @miftakhul_aziz github : https://github.com/mftakhullaziz

Dependency requirement :

Spring WebFlux
R2DBC Postgres (Non-Blocking Database)
Spring Cloud Stream
Project Reactor
Spring Cloud Eureka Server
Spring Cloud Eureka Client
SpringFox-UI
Spring Kafka
Lombok

Spring webflux service :

emailService = http://localhost:8081
inventoryService = http://localhost:8082
orderService = http://localhost:8083
paymentService = http://localhost:8084
orchestratorDomainService = http://localhost:8085

Spring cloud service :

springCloudServer = http://localhost:8761
swaggerUIDocsServer = http://localhost:8000

All endpoint service streaming on :
URL : http://localhost:8000/swagger-ui/index.html?

Docker Requirement :

Postgresql

1. add postgres images
    $~: docker pull postgres
2. create user authentication with postgres db on docker container
    $~: docker run --name eventdriven-postgres -e POSTGRES_USER=user -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres
    Explain :
        --name : container name is "evendriven-postgres"
        -e POSTGRES_USER : username is "user"
        -e POSTGRES_PASSWORD : password is "password"
        -p : port is "5432" running on http://localhost:5432/postgres
        -d : databases is "postgres"
    To stop container
    $~: docker stop eventdriven-postgres
    To start container
    $~: docker start eventdriven-postgres

Kafka-Broker :

1. Run docker compose up in path kafka-broker:
    $~: docker compose up

How to use :

1. Run Postgres database and migration query
2. Run Kafka Broker
3. Build all project reactor in default module 
   $~: cd saga-orchestration
   saga-orchestration$~: mvn clean install
4. Run all service
5. Request API from Postman or other

Saga Orchestrator Pattern : OrchestratorSaga

Spring Cloud Eureka : SpringCloud

Next updated :

add payment service
add notification mail service
add consumer inventory
add consumer payment
add consumer notification email

Happy coders:

edaorchestration's People

Stargazers

Miftakhul A avatar

Watchers

Miftakhul A 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.