Detailed Design of Google Maps

Let's dig into the detailed design of the maps system.

In this lesson, we will discuss our detailed design by answering the following key questions:

  1. How do user requests benefit from segments?
  2. How do we improve the user experience by increasing the accuracy of ETAs?

Segment setup and request handling

This section will describe how the segment data is stored in the database and how user requests are handled using the already stored data.

Starting with the database schema, we will discuss how the segments are added and hosted on the servers and also how the user requests are processed.

Database schema

We store the following information for each segment.

Key-value store:

  • ID of the segment.
  • ServerID on which the segment is hosted
  • In reality, each segment is a polygon, so we store boundary coordinates (latitude/longitude), possibly a list.
  • A list of segment IDs of the neighbor segments.

Graph DB

  • The road network inside the segment in the form of a graph.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy