educative.io

Why distributed search service is placed near to area service?

Why distributed search service is placed near to area service? can it be placed in the same layer as location finder, router finder and navigator service?


Course: Grokking Modern System Design Interview for Engineers & Managers - Learn Interactively
Lesson: Design of Google Maps - Grokking Modern System Design Interview for Engineers & Managers

Hi Gaurav,

The distributed search service is placed near the area service because it plays a crucial role in the functioning of the area service. The area service uses the distributed search to find the latitude/longitude for the source and the destination. Furthermore, it calculates the area on the map spanning the two (source’s and destination’s) latitude/longitude points.

The distributed search service is primarily used to convert place names to latitude/longitude values, which is a specific functionality that is different from the roles of the location finder, route finder, and navigator service. So, placing it in the same layer as the location finder, router finder, and navigator service is possible but might not be optimal.

Thank you.