A
Google Maps is a system that helps you find the best possible routes between the two locations.
Before jumping into the design of Google Maps, let’s first collect the requirements by assuming yourself as a person who wants to travel from one place to another and doesn’t know the paths. Possibly, you will have the following question in your mind:
- There could be multiple paths that take me to my destination, so which path should I follow?
The decision depends on the following two parameters:
- Distance
- Time
We can think of designing a system that uses
distance
andspeed
to calculate thetimeOfArrival
and to find the bestroutes
The above system is assuming an ideal situation. But in reality, there are factors like traffic jams at a specific time of the day, broken roads, road blockage due to protests, accidents, and weather conditions. These factors can badly affect the
timeOfArrival
. So, we need to design our system in such a way that can have the potential to add intelligence without a major change in the design.
Service Level Agreements
- The service should be 24/7 available.
- It shouldn’t take more than two or three seconds to calculate the
and the route, given the source and the destination points.ETA Estimated Time of Arrival - It should be scalable as there are over one billion users per month and even a lot of companies like Uber, Cream, etc are using Google Maps to find their routes.
- It should have good accuracy.
Challenges
- Modeling roads data: There are plenty of roads and paths in the whole world and we don’t know which roads connect to which road. So, it is difficult to model this data.
- ETA computation: In an ideal situation with empty roads, it’s straightforward to compute ETA using the distance and the speed of the vehicle you want to ride on. But, the traffic is obvious on the roads and we also don’t know the road conditions that directly affect the ETA so we can’t ignore these factors. Also, we know there is no scale to measure these parameters. Besides traffic jams and road conditions, there are other unpredictable things like accidents and weather conditions and we can’t measure them too. So, it becomes very challenging to compute ETA keeping in mind all these
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy