System Design Atlas

Household services, appointments and proof of completion

07 / 10Worked example

Critical flow

Allocating the worker resolves contention. Which conditions ensure this outcome?

Two mutually confirmed requests clash.

Starting point The worker sends committed notifications.

Assumptions for the example case

A fictional placement service for household help in fixed two-hour sessions. Service workers confirm appointments themselves; disputed work remains under review. All quantities, thresholds and operational targets in this design are illustrative assumptions.

Concurrent appointment acceptance

Concurrent appointment acceptance

Both sides have agreed to the respective scope.

Household A
Household services API
Appointment data store
Household B
  1. 01 Household A → Household services APIAgree T-48
  2. 02 Household services API → Appointment data storeAllocate the interval atomically
  3. 03 Household B → Household services APIOverlapping appointment
  4. 04 Household services API → Household BConflict

Result: One appointment agreed; no double booking.

Consent from the second party triggers atomic worker allocation.

Two households → API → worker interval; atomic allocation after both parties consent.

Commit, response loss and resumption

D-48 available
Confirm two overlapping appointments with both parties, in both arrival orders → One appointment agreed, the other conflicts.
Consent stored
Replay identical consent, then use a different scopeHash → One consent record; the changed replay conflicts.
Additional approval missing
Confirm 119/120/121 minutes → 119 and 120 allowed; 121 requires renewed consent and remains open.

The worker allocation resolves concurrent bookings.

The worker allocation resolves concurrent bookings.

Check the allocation atomically.

Two mutually confirmed requests clash.

A agreed, B conflicts. B agreed, A conflicts; no double booking.

Alternative considered
Cleaning up afterwards creates two commitments.
Trade-off
One household needs an alternative.
Reassess
Complex availability extends testing.

Try it yourself

Predict both winning orders.

A hint for your attempt

Two mutually confirmed requests clash.

Compare with a possible solution
A first
A agreed, B conflicts.
B first
B agreed, A conflicts; no double booking.

Apply to your project

How does “Allocating the worker resolves contention” apply to your own project?

Step 8: Open reports are not a capacity problem. What conditions ensure the result?