Nine Services and a Message Bus
DShop is one e-commerce shop stamped out as nine microservices over RabbitMQ - this series reads the real source to see how the topology holds together and where it drifts. Part 1 of Nine Services and a Message Bus.
In reading order.
DShop is one e-commerce shop stamped out as nine microservices over RabbitMQ - this series reads the real source to see how the topology holds together and where it drifts. Part 1 of Nine Services and a Message Bus.
Nine DShop services share one skeleton stamped out by hand - and the places they quietly disagree teach more than the places they match. A drift catalogue read from the real source. Part 2 of Nine Services and a Message Bus.
The same event is declared three times across DShop, and one copy quietly drops a field - here is the contract drift in the real source and the canonical-model cure that would have caught it. Part 3 of Nine Services and a Message Bus.
DShop answers the shared-kernel question twice - eight services copy every event contract locally, one references a shared package - and both answers are in the same estate with their real costs on show. Part 4 of Nine Services and a Message Bus.
DShop moves data between services two opposite ways - one rebuilds a local replica from the event payload, the other treats the event as a doorbell and fetches over HTTP - and the estate runs both at once. Part 5 of Nine Services and a Message Bus.
Operations drives an order from created to approved across three services, and rolls it back when a step fails - a textbook process manager with compensation, read from the real Chronicle-backed source. Part 6 of Nine Services and a Message Bus.
A stateful DShop saga remembers when a customer signed up and grants a discount only if their first order lands within 24 hours - a genuinely stateful process manager whose reward turns out to be a Console.WriteLine. Part 7 of Nine Services and a Message Bus.
Operations subscribes to every command and event in the estate by reflection and routes them through two open-generic handlers - a neat trick with one dead limb the wiring can never light. Part 8 of Nine Services and a Message Bus.
DShop runs competing consumers over an at-least-once bus with no message-id dedup, so a redelivered reservation decrements stock twice - the estate aspires to idempotency and enforces none of it. Part 9 of Nine Services and a Message Bus.
Storage subscribes to almost every event in DShop, serves read-only queries, and owns nothing it cannot rebuild - the read side of a CQRS split that runs across a service boundary instead of inside one. Part 10 of Nine Services and a Message Bus.
One DShop service targets a different framework, references a frozen NuGet package, and calls an API that no longer exists in the repo - so its Debug configuration cannot compile, and it only builds in Release. Part 11 of Nine Services and a Message Bus.
A single product identity is represented four ways across four DShop services - owner, replica, cart snapshot, order snapshot - each on its own refresh discipline, and nothing masters the set. Part 12 of Nine Services and a Message Bus.
The Identity service gets the hard parts of auth genuinely right - issue, refresh, revoke - and then commits its signing key to source control and ships a CORS policy the spec forbids. Part 13 of Nine Services and a Message Bus.
Nine DShop services ship a tests folder and only one of them tests anything - a census where five test projects cannot even see the code they claim to cover and the lone unit test asserts a thing that never happens. Part 14 of Nine Services and a Message Bus.
A retrospective on nine DShop services - the order aggregate and checkout saga that genuinely work, sitting next to the discount that only prints, the emails that never send, and a currency guard that guards nothing. Part 15 of Nine Services and a Message Bus.