System Design Atlas

Restaurant orders between service and kitchen

07 / 10Worked example

Critical flow

How does the service clear a lost kitchen confirmation without additional dishes?

Trace the failure through the architecture: The kitchen accepts K-131, but the terminal loses the response. The terminal keeps transmission unconfirmed and queries the same order. Pressing Send again creates no additional soup or main-course portions. Consider durable acceptance, the actual effect and the response separately.

Starting point The local API and portion database manage the kitchen workflow.

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.

Failure point in the sequence

Local queue, acceptance commit and repetition

K-131 and both portions are permanently stored while the terminal remains open.

Service terminal
Restaurant API
Portion database
Kitchen display
  1. 01 Service terminal · Local processingLocally store K-131
  2. 02 Service terminal → Restaurant APIP-131 + P-132
  3. 03 Restaurant API → Portion databaseRecord the transmission order permanently
  4. 04 Restaurant API → Kitchen displayShow K-131 for kitchen acceptance
  5. 05 Kitchen display → Restaurant APIexpressly accept both portions
  6. 06 Restaurant API → Portion databaseAtomically commit kitchen acceptance and portions
  7. 07 Restaurant API · Local processingAnswer is lost
  8. 08 Service terminal → Restaurant APIK-131 again / status
  9. 09 Restaurant API → Service terminalhistorically accepted

Result: Two portions, a ticket and a repeatable acceptance response.

Response loss leaves the terminal status pending; the same ticket identity retrieves the stored outcome.

The kitchen already has the ticket. Query the existing K-131; no second preparation order is created.

Effect, response and recovery

Specific error
The kitchen accepts K-131, but the terminal loses the response. The terminal keeps transmission unconfirmed and queries the same order. Pressing Send again creates no additional soup or main-course portions.
Before and after commit
Commit durably completes the local change. Before commit, the old state remains valid; afterwards, an identical retry returns the stored outcome. Reconcile the external effect using its existing reference.
Retry behaviour
Transmit K-131 twice with identical content: The same two portions remain. A third portion under the same key causes a conflict. Repeating the handover record for P-131 results in exactly one handover.

Resolve response loss

Resolve response loss

Query the existing K-131.

The kitchen already has the ticket.

There is no second cooking order.

Alternative considered
Another new ticket duplicates portions.
Trade-off
Terminal shows temporary uncertainty.
Reassess
The kitchen protocol provides no status query.

Terms in this step

Resolve response loss
There is no second cooking order.

Try it yourself

Kitchen takes over K-131, answer is lost. Which message follows and how many portions exist?

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
Terminal queries K-131 or repeats the same content with the same key.
Second part of the solution
Exactly two original portions remain; the send button does not produce any more soup.

Apply to your project

Which corresponding assumption in your project would you check first? Consider this trigger: The kitchen protocol provides no status query.

Step 8 distinguishes workflow backlogs.