Continue where you left off ×
Google Maps, the case study
Everything · Open board
Boards
Before you start. A website that makes you wait for an answer is showing you latency, the time between asking and getting a reply. That’s the only idea this lesson needs already in your head. Every other word it uses, it explains the moment that word shows up.
The idea in 30 seconds
Almost everything Google Maps shows you was worked out long before you tapped anything. Answering you is mostly a lookup, not a live calculation.
A continent-sized road network doesn’t get searched fresh each time, shortcuts are built once, so crossing it becomes a handful of hops.
Roads barely change. Travel times change by the minute. Only the numbers on the shortcuts get refreshed, not the shortcuts themselves.
The map picture you scroll through is a stack of pictures drawn once and handed to you, not painted live for your phone.
“Nearby” is cheap because the globe was pre-divided into small patches. You only ever check your own patch and its neighbours.
An arrival time is a prediction about the future, not a sum of the present, the one thing here that has to be worked out live, because the future can’t be precomputed.
Read the story
Lesson 90 of 115 in System Design
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year .
See plans Already a member? Sign in
Or start free : a free account opens lessons 2 and 3 of every track.
In this lesson Sydney, 2004: a map that didn’t reload the page The question that doesn’t scale by asking harder The trick: work it out once, before anyone asks The wrinkle: the numbers on the shortcuts keep changing The same trick, for the picture itself The same trick, for “coffee near me” The one thing you cannot work out ahead of time The number you’re actually judged on 01 · Road Graph & Routing 02 · Traffic-Aware & Alt Routes 03 · Serving the Map (Tiles) 04 · Geospatial Index & Places 05 · Real-Time Traffic 06 · ETA & Prediction (ML) 07 · Map Data Pipeline & Scale The numbers, by hand Retrieval (cold, no peeking) Terms it explains: shortcuts, tile, cell, ping, chain, Dijkstra's algorithm, A\, Contraction Hierarchies, node, contract, hierarchy, meets in the middle, Customizable Route Planning, quadtree, Web Mercator, vector tiles, S2, Geohash, R-tree, hidden Markov model, Waze, supersegments, Graph Neural Network, Ground Truth.
Review System Design
Mark as read Saved in this browser, and to your account when you sign in.