Conversation
ganeshkumarm1
commented
Mar 3, 2026
- Completed Intro, Requirements, Rendering, and Routing sections
- To work on Search and Dive Deep Insights
- Added TK place holder for sections that has to be updated
1. Completed Intro, Requirements, Rendering, and Routing sections 2. To work on Search and Dive Deep Insights 3. Added TK place holder for sections that has to be updated
15. Design Google Maps/GoogleMaps.md
Outdated
| * **Low Latency** – Search, tile loading, and routing responses must be with in 100 ms. | ||
| * **High Availability** – Core features should remain 99.99% during peak usage. | ||
| * **Scalability** – System must handle millions of concurrent users. | ||
| * **Geospatial Accuracy** – Location tracking and routing must be precise with an acceptable error of + or - 100 meters. |
There was a problem hiding this comment.
100m might be a lot of distance. Can we reduce it to 40m?
|
|
||
| --- | ||
|
|
||
| ## API Design |
There was a problem hiding this comment.
Can we add an explanation about why we use protobuf here? One to two line explanation is also fine.
|
|
||
| The response will be binary data (pbf - Protocolbuffer Binary Format) containing layers such as roads, buildings, water, and places. Since it is binary, we cannot visualize the response. But after decoding, it looks something like below: | ||
|
|
||
| ```json |
There was a problem hiding this comment.
I'm failing to understand the response in simple language. Could it be possible to explain it a bit? 2-3 lines explanation is also fine.
There was a problem hiding this comment.
Yes. will ad it
15. Design Google Maps/GoogleMaps.md
Outdated
|
|
||
| ### Routing | ||
|
|
||
| Routing finds the fastest possible route from source to destination and provides turn by turn instructions to reach the destination. This is the core "Point A to Point B" service. It uses algorithms on the static road graph to return a polyline (a compressed string of coordinates). |
There was a problem hiding this comment.
Can we simplify the language here? Especially 3rd line seems to be rather complex.
15. Design Google Maps/GoogleMaps.md
Outdated
|
|
||
| **HTTP Response** | ||
|
|
||
| The response contains an array consisting of multiple routes sorted in the order of durationSeconds (ETA) ascending. |
There was a problem hiding this comment.
The response still seems confusing. Can you explain in one to two more lines?
| ``` | ||
|
|
||
| ## High Level Design | ||
| Below are some of the terms we frequently come across in the upcoming sections of the document. |
There was a problem hiding this comment.
Can we add images or diagrams for each of the below? Even small images or diagrams are fine.
|
|
||
| Because this work happens ahead of time, opening the map does not require image processing. The client simply requests the tiles needed for the current viewport. | ||
|
|
||
|  |
There was a problem hiding this comment.
Didn't understand much from this image and the above steps. Can you try relating those steps to this image? That could help in better understanding.
15. Design Google Maps/GoogleMaps.md
Outdated
|
|
||
|  | ||
|
|
||
| Vector geometry is typically stored in spatial databases such as PostgreSQL with the PostGIS extension. During preprocessing, this geometry is organized into vector tiles, where each tile contains only the features that intersect that region and zoom level. These tiles are stored in object storage and served through CDNs, making them highly cacheable and efficient to distribute. |
There was a problem hiding this comment.
Didn't understand this part: 'PostgreSQL with the PostGIS extension'
|
|
||
| #### End-to-End Rendering Flow | ||
|
|
||
|  |
There was a problem hiding this comment.
Why do we have two API gateways?
There was a problem hiding this comment.
Good catch. It is not needed. Will fix it
|
|
||
| --- | ||
|
|
||
| ## API Design |
There was a problem hiding this comment.
Requirements had "Real-time Navigation i.e. continuously track user location and re-route." HLD also describes GPS updates every few seconds. But no API is defined for this. Can you work on adding it?
| --- | ||
|
|
||
| ## API Design | ||
| ### Search |
There was a problem hiding this comment.
Can we paginate? Might be needed as we might get 100s of results for search.
| * **Route Calculation** – Compute a path between source and destination. | ||
| * **Real-time Navigation** – Continuously track user location and re-route if needed. | ||
|
|
||
| ### Non-Functional Requirements |
There was a problem hiding this comment.
Each NFR states a number but doesn't explain why it matters for a maps system specifically. Can we add one sentence per NFR explaining the consequence? E.g., "If tiles load slowly, the map feels laggy when users pan or zoom."
|
|
||
|  | ||
|
|
||
| 1. User enters a query (e.g., "coffee shops") and the client sends a `GET /v1/places/search` request with query text, and user's GPS location |
There was a problem hiding this comment.
GPS coordinates are sensitive PII. Consider a brief note about encryption in transit and retention policies.
15. Design Google Maps/GoogleMaps.md
Outdated
| #### 1. How does the system translate text into geographic coordinates | ||
| When a user searches for a specific location (for example **"Marina Beach"**), the system needs to convert that text into geographic coordinates. This process is called **Forward Geocoding**. Forward geocoding simply means converting human-readable text into **latitude and longitude**. For example, *"Marina Beach"* is translated into "13.0500° N, 80.2824° E" | ||
|
|
||
| > Similar to Forward Geocoding, there exists **Reverse Geocoing** where user taps a location on a map and get the place details. |
There was a problem hiding this comment.
nit: "Reverse Geocoing" → "Reverse Geocoding" (typo)
15. Design Google Maps/GoogleMaps.md
Outdated
|
|
||
| **A\* (A-Star)** | ||
|
|
||
| Assume you are driving from Chennai Airport to Marina Beach. The road network includes small residential streets, arterial roads, and highways. If we ran Dijsktra, it would expand in all directions even though Marina Beach lies northeast of the airport. |
There was a problem hiding this comment.
nit: "Dijsktra" is misspelled. It should be "Dijkstra". More such typos are there
15. Design Google Maps/GoogleMaps.md
Outdated
|
|
||
| **Contraction Hierarchies** | ||
|
|
||
| Assume another scenario, where you are driving from Chennai to Bengaluru. The road netwrok includes thousands of local streets, city arterial roads, and national highways. In reality, long-distance travel looks like: `local road → city arterial → National highway → city arterial → local road`. So, you do not evaluate every residential street between the two cities. |
There was a problem hiding this comment.
nit: "road netwrok" → "road network". More such typos are there
15. Design Google Maps/GoogleMaps.md
Outdated
|
|
||
| #### 3. How does navigation adjust in real time | ||
|
|
||
| Consider a scenario where you are driving from Chennai Airport to T Nagar during evening traffic. The initial route is `Airport → GST Road → Kathipara → Anna Salai → T Nagar` and the estimated time is **40 mins**. While you drive, your phone sends location updates every few seconds via GPS (Global Positioning System). Each update contains atitude, longitude, speed, and direction. |