The champagne of reliable distributed systems.
warehouse
: local servicecatalog
: manages the list of itemsorder
: manage order from multiple warehousesapi-gateway
: HTTP API layer to comunicate with other services
install:
- just
- golang
- docker
- docker compose
- natscli
just up
just down
just reset
curl -X POST localhost:80/catalog -H "Content-Type: application/json" -d '{"name": "hat"}'
HAT_ID=
curl localhost:80/catalog
curl -X POST localhost:80/stock/41 -H "Content-Type: application/json" -d '[{"good_id": "'$HAT_ID'", "amount": 20}]'
curl localhost:80/warehouses
curl localhost:80/stock/41
curl -X POST localhost:80/orders -H "Content-Type: application/json" -d '{"items":[{"good_id": "'$HAT_ID'", "amount": 5}]}'
curl localhost:80/stock/41
curl localhost:80/orders