educative.io

Educative

Location Finder Service Does NOT Make Sense To Me

Why do we need a location finder service? The user’s current location is determined by the user’s GPS, NOT by a server. For the server to get the user’s current location, an efficient way is user sends his/her location (from his/her GPS) to the server every 3 or 4 seconds.

Please help me understand what this is talking about. Thanks.

  • Location finder: The location finder is a service used to find the user’s current location and show it on the map since we can’t possibly personally remember the latitude and longitude for every place in the world.

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

1 Like

Feels like the Forum is dead? No answer to a question since 2 weeks!

That’s one of the opportunities educative.io should improve. The courses are a paid service, the users deserve a moderated forum for questions. Even for a free forum like stackoverflow, it’s moderated.

To answer your question… We don’t hit location finder service every 3 or 4 seconds. We get the coordinates from GPS and if that’s already in cache, we reuse it. If its a new location altogether, it hits location service. I think, its necessary for us to hit location service as local cache can’t just fit all the GPS coordinates to location mapping data. Its a simple Get call. Also, we won’t be directly hitting location finder service, we definitely be having that data in distributed cache or a CDN service.
What do you think? My answer makes sense?


Course: https://www.educative.io/collection/10370001/4941429335392256
Lesson: https://www.educative.io/collection/page/10370001/4941429335392256/4552284171665408

@kalyan, thanks for sharing your input. What I am asking here is that when will we need to query the location finder service. To find the user’s own location, it should be the user’s GPS. Thus, the following statement does NOT make sense to me:

  • Location finder: The location finder is a service used to find the user’s current location and show it on the map since we can’t possibly personally remember the latitude and longitude for every place in the world.

Now in order for the server compute a route, the server actually need to know where the user is. So I believe the client (user) needs to update his/her location to the server. Therefore, it sounds to me that the location finder service is for collecting user’s locations, NOT serving.

I think, what they mean by location is… “Name of the location” not just the coordinates. Let’s say, they renamed a location name to a particular GPS coordinates… this location service will give the new name. GPS will always give the coordinates. Location service will give the name of the place


Course: https://www.educative.io/collection/10370001/4941429335392256
Lesson: https://www.educative.io/collection/page/10370001/4941429335392256/6683135341494272

Thanks @kalyan for the answer. That’s helpful. I believe the location finder service probably serves not only coordinates to location name, but also location name to coordinates, as it says “The location finder is a service used to find the user’s current location and show it on the map since we can’t possibly personally remember the latitude and longitude for every place in the world”