Where to draw a service boundary
On this page
Follow a seat reservation through two concurrent requests before deciding which components should deploy independently.
There is one seat left in a workshop. Two customers click Reserve. Draw the proposed services on a whiteboard, then point to the component allowed to promise that seat. If two boxes can make the promise, the diagram needs another pass.
Trace the promise
A tempting cut gives the catalogue team a Workshop service and the sales team a Booking service. Booking asks Workshop for the remaining capacity. Workshop replies “one” to both callers. Each caller writes a booking. The components have clear names and separate deployments, yet the customer promise has no owner.
Put the capacity check and the claim in one transaction under one owner. That owner can return a reservation identifier. A catalogue projection can still show a slightly stale count if the page describes availability as provisional. The confirmation screen needs the outcome of the claim itself.
What can arrive late?
A confirmation email can arrive after the transaction. A receipt generator can catch up after an outage. Both consumers can use the reservation identifier to recognise a repeated event. Moving either into another process changes delivery and recovery, but leaves the seat promise intact. Those are easier first separations when independent operation has a tangible payoff.
Lewis and Fowler describe decentralised data ownership and explicit compensation as recurring features of microservices. Compensation is a product decision here. A waiting list can tolerate a later allocation decision. A customer buying the last wheelchair-accessible place may reasonably require an immediate guarantee. Write that distinction into the contract before choosing a queue. Lewis and Fowler on decentralised data management.
The design review
- Write one customer-visible promise in ordinary language.
- Circle the writes that must agree for it to hold.
- Walk through two concurrent requests and a lost response.
- Identify who can authoritatively answer “did my reservation succeed?”
Independent deployment earns its operating cost when the teams can change, release and recover separately. If a routine pricing change still needs a coordinated release, demonstrate what that split buys before moving the next module.