Orchestration saga example with docker compose, golang and dtm
DTM is a distributed transaction framework which provides cross-service eventual data consistency. It provides saga, tcc, xa, 2-phase message, outbox, workflow patterns for a variety of application scenarios.
Ref: https://github.com/dtm-labs/dtm
docker-compose up
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Iphone 14",
"price": 5000,
"price_max": 5000,
"price_min": 5000,
"show_free_ship": true,
"description": "Iphone 14",
"sku": "123456789",
"quantity": 1000,
"stock":10,
"discount": "0%",
"raw_discount": 0,
"images": ["123456789"],
"category_id": "2",
"variant_ids": [1]
}'
--header 'Content-Type: application/json' \
--data-raw '{
"user_id":"1",
"balance":999999
}'
--header 'Content-Type: application/json' \
--data-raw '{
"order_items": [
{
"item_id": "0000022b-d387-4e7d-b0fe-506c75fc9158",
"quantity": 1
}
]
}'