Design a system matching riders to nearby drivers, estimating pickup ETAs, and handling trip lifecycle (accept, en route, complete). Location updates are frequent; matching must stay fast under city-scale concurrency.
Functional requirements
- Match riders to nearby available drivers
- Support trip states: requested, accepted, in-progress, completed
- Stream driver and rider locations for live map updates
- Handle payments or fare estimates (integration boundary)
Non-functional requirements
- Sub-second matching and ETA freshness in dense areas
- High write throughput for GPS pings
- Fault tolerance if dispatch or payment services degrade