fivenines
1/38
Lesson 0.2

The product: a ride exchange

🎯 Objectives
  • Explain why a ride-hailing product is best modeled as a two-sided real-time exchange.
  • Enumerate the functional requirements we will implement, and the external systems we will buy rather than build.

Uber is an exchange: riders submit bids for transportation (demand orders), drivers stream availability (supply orders), and a matching engine continuously clears the market under latency constraints, with price (surge) as the balancing mechanism. Framing it as an exchange is more than a metaphor — it dictates the architecture. Like a financial exchange, the core loop (order in → match → execution) must be extremely fast and extremely available, while everything around it (settlement, reporting, analytics) can be slower and more forgiving. That asymmetry is the seed of Parts 2 and 3.

The system in context

flowchart LR
  R["📱 Rider app"] --> X
  D["🚗 Driver app"] --> X
  OPS["🖥️ City ops and support staff"] --> X
  subgraph X ["RideX — the ride exchange"]
    CORE["Exchange core: presence, matching, trips, pricing"]
    SUPPORTING["Supporting: identity, payments, comms, ratings"]
    PLATFORM["Platform: infra, observability, data and BI"]
  end
  X --> MAPS["🗺️ Map and routing provider"]
  X --> PSP["💳 Payment service provider"]
  X --> KYCV["🪪 Identity and background-check vendor"]
  X --> TEL["📞 Telephony, SMS and push vendors"]
  X --> REG["🏛️ Regulators and tax authorities"]
Context diagram. We build the exchange; we buy maps, payment processing, background checks and telephony.

Functional requirements

We will cover a deliberately broad slice of the real product. Grouped by who they serve:

GroupRequirementsBuilt in
IdentityRider signup/login; driver onboarding with document + background checks; profiles; devices1.2
SupplyDriver goes online/offline; continuous location ingestion; nearby-driver queries; rider sees cars moving on the map1.4
DemandFare quote with ETA before requesting; ride request; scheduled rides; ride tiers (economy / XL / premium)1.3, 1.5
MatchingDispatch: candidate selection, ranked offers to drivers, accept/decline/timeout, re-dispatch1.6
TripsFull lifecycle: assigned → arriving → in progress → completed / cancelled; live tracking; route recording; cancellation fees1.7
MoneyCard auth and capture; wallets and promo credits; tips; a double-entry ledger; weekly driver payouts; receipts and invoices1.8
CommsPush/SMS notifications; rider–driver in-app chat; phone-number-masked calls1.9
TrustTwo-way ratings; trip history; support tickets; safety features (share trip, SOS); fraud detection1.10, 2.11
BusinessCity-ops dashboards; driver earnings statements; financial and regulatory reporting; experimentation and BI1.13, 2.10
🧠 Load note

Pooled rides (UberPool-style shared trips), food delivery, and multi-modal transport reuse this exact architecture with a more complex matcher; we name where they would plug in but do not design them. This keeps the matching lessons at one level of complexity.

Next step

See what actually stuck.

Take the practice scenarios now.