Driver delivery system design 1 question in 2 chapters
Driver workflow and location tracking
1.1 How would you design a delivery system from the driver's perspective? Hard 6 min
I model a delivery as a guarded workflow: assignment, acceptance, pickup and completion. A driver can have only one active job in the first version. I keep assignment changes durable and transactional, but handle frequent location updates separately. Arrival estimates combine travel time, remaining preparation and handoff time. I would implement the state transitions first, then test retries, competing assignments and out-of-order location updates before adding more services.
Read the full answer
Sources
Source: PostgreSQL 18: Explicit locking Source: Transactional outbox Source: W3C Geolocation Source: Routes API traffic options