Ride hailing has two kinds of data with opposite rules. A ride changes a few times in 20 minutes, and no change may be lost. Positions change every 4 seconds, and losing one update does no harm. So both the API and the stores split along this line: rides go through strict calls and a replicated database, positions through a stream of messages and memory.
In this lesson
- The rider's calls
- The driver's calls
- The WebSocket stream
- The ride in the database
- A driver's live state
- History
- Common mistake
- Key points