Real-Time Tracking: How It Works Behind the Scenes
Most customers never think about the plumbing behind a little dot on a map. But getting that dot to move smoothly, accurately, and in real time is not trivial. Here is how we do it.
The rider's phone
When a rider accepts a delivery, their driver app starts the Fused Location Provider (on Android) or CLLocationManager (on iOS). We poll at between 5–15 seconds depending on battery level and movement speed. Parked riders poll less. Moving riders poll more.
The upload pipeline
Each location ping is a tiny JSON payload: rider_id, lat, lng, heading, speed, accuracy. Payload size stays under 200 bytes so it pushes through even on 2G.
The tracking page
Your browser opens a persistent connection. Every time the rider's location updates, we broadcast the change to all subscribers of that delivery. No refresh needed — the dot glides.
Why a dot glides smoothly
We receive a discrete point every ~10 seconds. But we interpolate between the last two points on the client side. So the rider appears to travel in a fluid line, not teleport from corner to corner.
Privacy
Tracking is enabled only when a delivery is active, and only the customer (and internal team) can see the rider's live position. When the delivery completes, the location feed for that rider–customer pair ends immediately.
It's a lot of engineering for a small glowing dot. We think it's worth it.