Requirements of the Google Maps API

Learn about the requirements for the API design of Google Maps.

Introduction to Google Maps API

Google Maps is the most popular map application that users use on a daily basis for travel. Traveling from one location to another requires some essential information, such as the distance to be traveled in miles, an estimation of travel time, an optimal path based on traffic conditions, and driving directions. All these requirements can be achieved by interacting with different APIs of Google Maps. Designing an API like Google Maps requires an understanding of the internal working of its system because an API is a reflection of the backend system design. In this chapter, we'll first learn about the design of the API by going over the different services and interactions between them.

Note: An optimal path is not always the shortest one, but rather the one that works well in real-world and considers things like time, road closures, business needs, and so on.

Requirements

Let's understand the functional and non-functional requirements for designing the Google Maps API.

Functional requirements

The functional requirements are as follows:

  • Map: The API should be able to return a specific map area as a snapshot based on the user's location.

  • Route finder: The API should return the optimal path(s) with distance and the estimated time of arrival (ETA) based on the source, destination, and mode of transportation.

  • Navigation: When the user starts navigating toward the destination. The navigation service takes the user's location from the global positioning system (GPS) and helps users to make correct decisions along the route. At the same time, the navigation service updates the ETA and distance.

How does the GPS identify the user’s location?

  • Search place: The API should find and return the information of the searched location/entity.

Functional and non-functional requirements of the Google Maps API
Functional and non-functional requirements of the Google Maps API

Non-functional requirements

The non-functional requirements of the Google Maps API are as follows:

  • Availability: The API should have high availability, allowing users to perform desired operations.

  • Accuracy: The API should return the optimal route(s) with an accurate ETA.

  • Scalability: The API should be scalable to handle a large number of user requests.

  • Low latency: The API should return the response of all services in real time. Although different functional requirements may have different latency requirements, our service should be able to provide responses or updates as the service demands. For instance, a service like navigation will have stringent latency requirements.

Prerequisites

We have designed some other APIs in this course that will benefit us in the creation of the Google Maps API. They will act as building blocks for our design and are listed below:

  • Search APIThis API allows users to find any place on a map.

  • Pub-sub APIThis API is required to achieve inter-services communication. For example, if the user deviates from the suggested path, then the navigation service pings the route finder service for re-routing via a pub-sub service.

How will we design the Google Maps API?

This chapter is structured as follows:

Let's start with design decisions in the next lesson.