Detailed Design of Google Maps

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

In this lesson, we’ll discuss our detailed design by answering the following 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 storage schema, we discuss how the segments are added and hosted on the servers and also how the user requests are processed.

Storage schema

We store the following information for each segment:

Key-value store:

  • The segment’s ID.
  • The serverID on which the segment is hosted.
  • In reality, each segment is a polygon, so we store boundary coordinates (latitude/longitude), possibly as a list.
  • A list of segment IDs of the neighbors segments.

Graph database

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

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.