educative.io

Detailed Design of Uber - Grokking Modern System Design Interview for

We must update our data structures to point out that all active drivers update their location every four seconds.
To overcome the above problem, we can use a hash table to store the latest position of the drivers and update our quadtree occasionally, say after 10–15 seconds.

Why not skip using hash-table and instead collect driver location every 15 seconds?

I was wondering the same thing as the usage of hash table is never explained. However, I found out that its purpose is to update broadcast the latest location of a driver to interested users. On the first getNearestDrivers() query, the clients will subscribe to the location of returned driver IDs (as in a pub/sub model). On each update, the location can be broadcasted using this hash table.
None of this is explained in the article . Very poorly written :frowning: