The overall architecture
How do modules and processes divide responsibility for reservations and external processing?
The local consistency rule determines the boundaries of the reservation API. Channel reconciliation runs separately for deferred work. The modules Offer, Room-night inventory, Reservation, Stay completion organize responsibilities within the API; they are not individually operated services. Guests search through a rebuildable offer read model. The reservation API makes the commitment directly on the relational category-night inventory and stores reservation plus channel order atomically. The channel reconciliation processes distribution channel requests and confirmations separately. Reception uses the same authoritative reservation state for arrival and completion. External channels may only sell via the confirming API path in the example; an independent sale of the same capacity would be an additional open quota contract.
Starting point Cancellation releases the same nights exactly once.
Assumptions for the example case
Own fictitious example design. One hotel, one room category, full nights and a fixed offer in EUR without prepayment. A price offer is valid for 300 seconds; at exactly 300 seconds, a new confirmation is rejected. All figures and test goals are illustrative assumptions.
Runtime components and datastores
Runtime topology · processes, data stores and external systems
Hotel reservations
The booking is committed directly against the authoritative category-night inventory; external channels sell only through this confirmation path.
Domain responsibilities within the API
Interior view · Reservation API
Process framework · Reservation API
Offer, volume commitment and stay remain separate responsibilities in the same process.
Map responsibilities to runtime components
| Domain task | Runtime | Responsibility |
|---|---|---|
| Offer | Reservation API | Freezes price and validity for selected nights. |
| Room-night inventory | Reservation API | Tracks available room nights for each room category. |
| Reservation | Reservation API | Confirms all nights together and releases them once on cancellation. |
| Stay completion | Reservation API | Records arrival and documented completion of the stay. |
| Channel reconciliation | Separate background process | Processes stored work and external feedback. |
| Distribution channel | External boundary | Provides or confirms the evidence agreed for this case. |
Offer
- Runtime
- Reservation API
- Responsibility
- Freezes price and validity for selected nights.
Room-night inventory
- Runtime
- Reservation API
- Responsibility
- Tracks available room nights for each room category.
Reservation
- Runtime
- Reservation API
- Responsibility
- Confirms all nights together and releases them once on cancellation.
Stay completion
- Runtime
- Reservation API
- Responsibility
- Records arrival and documented completion of the stay.
Channel reconciliation
- Runtime
- Separate background process
- Responsibility
- Processes stored work and external feedback.
Distribution channel
- Runtime
- External boundary
- Responsibility
- Provides or confirms the evidence agreed for this case.
Room-night inventory remains with the reservation core
Room-night inventory remains with the reservation core.
Each confirmed reservation atomically occupies all required nights; occupancy never exceeds the local inventory for its room category.
Room-category inventory per night, offers and reservations must express the same valid state. The exercise specifies the input and expected result.
- Alternative considered
- A separate service for each module distributes the guarantee “Each confirmed reservation atomically occupies all required nights; occupancy never exceeds the local inventory for its room category” across additional network boundaries.
- Trade-off
- Common schema changes require coordinated releases.
- Reassess
- Significantly deviating load from channel reconciliation or independent responsibility justifies a new runtime structure.
Try it yourself
Assign offer, channel reconciliation and distribution channel to the types module, process and external system. Justify the authoritative data store.
A hint for your attempt
A domain responsibility becomes a process only when it has its own execution unit.
Compare with a possible solution
- Boundaries
- Offer is a module within the reservation API; channel reconciliation is its own process; distribution channel is outside.
- Storage
- Room-category inventory per night, offers and reservations hold the authoritative evidence. Each confirmed reservation atomically occupies all required nights; occupancy never exceeds the local inventory for its room category. The joint transaction protects this connection; external responses remain separate evidence.
Apply to your project
Which planned service boundary would distribute a currently local guarantee across the network?