Critical flow
What reservation evidence survives a lost response, and which actions are then permitted?
Now the architecture is tested at its sensitive point of failure. Reservation API locks category nights in date order, checks the remaining inventory for both nights and commits the reservation together with the channel request. After a lost response, the same key delivers the same reservation. External channel success is reconciled separately.
Starting point Room-night inventory remains with the reservation core.
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.
Critical flow with commit and failure point
Critical flow · Commit, failure point and replay
The Reservation API locks both category nights in date order and stores Reservation plus channel order together.
Result: Both nights are committed together; replay and channel reconciliation provide evidence for the same reservation.
A reservation atomically occupies all required nights without exceeding inventory.
Ordering and failure outcomes
- Required order
- Reservation API locks category nights in date order, checks the remaining inventory for both nights and commits the reservation together with the channel request. After a lost response, the same key will deliver the same reservation. External channel success is reconciled separately.
- Crash before commit
- For reservation R-27 there is no new permanent proof. The same command may be re-examined; unconfirmed intermediate work does not give a business guarantee.
- Crash after commit, before response
- The command journal entry records the original result. Identical replay returns that evidence; a fresh view of the current state comes from the read contract.
- External uncertainty
- A lack of feedback from the distribution channel remains unknown. Confirmed acceptance, definite rejection and lack of proof are given distinct states; the responsible role clarifies using the same reference.
Channel reconciliation follows the local commit
Channel reconciliation follows the local commit.
Reservation API locks category nights in date order, checks the remaining inventory for both nights and commits the reservation together with the channel request. After a lost response, the same key will deliver the same reservation. External channel success is reconciled separately.
Each confirmed reservation atomically occupies all required nights; occupancy never exceeds the local inventory for its room category. The exercise specifies the input and expected result.
- Alternative considered
- Submitting a new request after a response is lost can execute the same business operation again.
- Trade-off
- Unresolved evidence from the distribution channel requires a work queue.
- Reassess
- Frequent unresolved outcomes require a more reliable contract for external reconciliation.
Try it yourself
Mark the commit point, failure point and next permitted action. Explain the effect of an identical retry.
A hint for your attempt
Trace the same request through the datastore and response path.
Compare with a possible solution
- Flow and failure
- Reservation API locks category nights in date order, checks the remaining inventory for both nights and commits the reservation together with the channel request. After a lost response, the same key will deliver the same reservation. External channel success is reconciled separately.
- Commit and replay
- The domain change and command result are stored together before response. Loss of response after commit leads to reading this result. For reservation R-27, this does not have a second effect.
Apply to your project
What feedback could be missing even though the underlying action has already taken place?