System Design Atlas

Restaurant orders between service and kitchen

06 / 10Worked example

The overall architecture

Which local chain must remain operational in the event of failure of a central evaluation?

The data contract leads to this runtime topology: Service terminal with a local queue ↔ restaurant API → portion and ticket database. The kitchen display subscribes to confirmed ticket changes over a state channel; preparation-start and completion messages return through the API. The management view reads unresolved cases. Local restaurant operations form a boundary; later central analytics are derived. Internal modules define domain code boundaries; each separate process has its own operational lifecycle.

Starting point Serialise both actions against the same portion version.

Assumptions for the example case

Our fictional example design covers one restaurant with table service, individual ordered portions, explicit kitchen acceptance, cancellation before preparation starts and recorded handover. Quantities and quality goals are illustrative test assumptions. Cash-register regulations, payment processing, automated allergen safety and delivery logistics are outside the scope.

Runtime architecture

Runtime architecture · local operation with state channel

Service terminalLocal queue
Kitchen displayStart + Complete
Management viewCases requiring review

Restaurant operations

Restaurant APIAcceptance + state commands
Portion and ticket databaseTickets · portions · receipts
State channelConfirmed changes
Service Terminal → Restaurant APITicket + Key
Restaurant API → Service terminalAcceptance / Status
Restaurant API → portion and ticket databaseTicket + portions
Portion and Ticket Database → State Channel Confirmed Changes
State channel → kitchen displayTicket states
Kitchen display → Restaurant APIStart + ready
Management view → Restaurant APICases requiring review
Restaurant API → Management viewOpen review list

The service terminal stores pending entries locally; the API and database track portions; the kitchen receives only committed changes.

The restaurant must keep working when central systems fail. The local API and portion database manage the kitchen workflow. Kitchen acceptance depends on a reachable local authority.

Domain modules within the application

Restaurant API open · five domain modules

Order recordingOpen inputs
Kitchen acceptanceAccept portions
PreparationStart + Complete
Cancellation handlingReview work already started
OutputRecord handover once

Order recording and acceptance separate local entries from confirmed orders; preparation, cancellation review and handover advance each portion.

Order entry keeps unconfirmed entries visible. Kitchen acceptance accepts specific portions and instructions. Preparation tracks starts, completion and exceptions. Cancellation handling distinguishes timely cancellation from work already started. Handover records each transfer once.

Operational boundaries

Runtime
Service terminal with a local queue ↔ restaurant API → portion and ticket database. The kitchen display subscribes to confirmed ticket changes over a state channel; preparation-start and completion messages return through the API. The management view reads unresolved cases. Local restaurant operations form a boundary; later central analytics are derived.
Persistence
Transactional store for table order T-131, portions P-131 and P-132, and kitchen ticket K-131. Authoritative domain changes and their retry results are stored together; external effects require their own evidence.

Keep the local processing path short

Keep the local processing path short

The local API and portion database manage the kitchen workflow.

Restaurant has to work in case of central failure.

Kitchen acceptance depends on an available local authority.

Alternative considered
Sending every click through a remote central system increases dependency.
Trade-off
Local operations require maintenance.
Reassess
Several restaurants share mandatory resources.

Terms in this step

Keep the local processing path short
Kitchen acceptance depends on an available local authority.

Try it yourself

The remote central evaluation fails. Which local chain must continue to function?

A hint for your attempt

Use the specific entities and conditions from this step. The two solution parts distinguish the decision from its evidenced outcome.

Compare with a possible solution
First part of the solution
The service terminal, restaurant API, portion database and kitchen display manage the local kitchen workflow.
Second part of the solution
Central analytics are derived. An outage there must not undo a locally confirmed kitchen acceptance.

Apply to your project

Which corresponding assumption in your project would you check first? Consider this trigger: Several restaurants share resources that require binding allocation.

Step 7 resolves response loss.