saga

module
v0.0.0-...-ffaedda Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2022 License: Apache-2.0, MIT

README

Demo Saga implementation with Golang and Redis Streams

Implementation idea inspired by following article:

  1. Distributed Transactions in Microservices with Kafka Streams and Spring Boot - how to implement distributed transaction based on the SAGA pattern with Spring Boot and Kafka Streams

Description

There are three microservices:

order-service - it sends Order events to the Redis streams and orchestrates the process of a distributed transaction

payment-service - it performs local transaction on the customer account basing on the Order price

stock-service - it performs local transaction on the store basing on number of products in the Order

Installation And Configuration

Local development
$ make help # print help message
# install required tools
$ make tools
$ make up # make down for up and down local environment
$ make run service=order # run order service

License

Saga is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and/or LICENSE-MIT for details.

Directories

Path Synopsis
cmd
internal
order/infrastructure/api
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
pkg
errors
copid from https://github.com/AntonStoeckl/go-iddd/blob/main/src/shared/Errors.go
copid from https://github.com/AntonStoeckl/go-iddd/blob/main/src/shared/Errors.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL