An open API service indexing awesome lists of open source software.

https://github.com/kevinmichaelchen/temporal-saga-grpc

Using Temporal to orchestrate distributed transactions (sagas) across Golang microservices
https://github.com/kevinmichaelchen/temporal-saga-grpc

buf connect-go distributed-transaction golang grpc microservice microservices opentelemetry otel remote-generation saga temporal

Last synced: about 1 month ago
JSON representation

Using Temporal to orchestrate distributed transactions (sagas) across Golang microservices

Awesome Lists containing this project

README

        

# temporal-saga-grpc

[![Lines Of Code](https://aschey.tech/tokei/github/kevinmichaelchen/temporal-saga-grpc?category=code&style=for-the-badge)](https://github.com/kevinmichaelchen/temporal-saga-grpc)

![./docs/public/diagrams/architecture.svg](./docs/public/diagrams/architecture.svg)

This project demonstrates using
Temporal to orchestrate a
saga
(effectively a distributed transaction) that interacts with multiple services
and has a robust, edge-case-proof rollback strategy, as well as durable function
execution. **Temporal abstracts away failures.**

## Getting started

### Step 1: Spin everything up

You can spin everything up with:

```shell
make
```

> [!NOTE]
>
> Under the hood, we use a bunch of tools (which you can read about [here][tech-stack]), but to run things seamlessly locally, the one tool you will need is [pkgx][pkgx].

[tech-stack]: https://kevinmichaelchen.github.io/temporal-saga-grpc/architecture/overview/
[pkgx]: https://pkgx.sh/

### Step 2: Observe the workflow

Let's get ready to observe this thing in action!

- View traces in Jaeger — [localhost:16686][jaeger-ui].
- View the workflow in Temporal's UI — [localhost:8233][temporal-ui].

[temporal-ui]: http://localhost:8233
[jaeger-ui]: http://localhost:16686

### Step 3: Start a Temporal Workflow

```shell
curl -v http://localhost:8081/temporal.v1beta1.TemporalService/CreateOnboardingWorkflow \
-H "Content-Type: application/json" \
--data-binary @- <