99Design the ride-matching system that pairs riders with nearby drivers in real time.▼hardUberAirbnbAmazon2 replies◆ premiumA rider taps request and within seconds a nearby driver is assigned. The interesting problems are geospatial indexing of moving drivers, the matching objective (nearest is not always best), and handling the race where two riders want the same car. Here is how to build it.Open full answer →
106Design a geo-proximity service that finds the nearest places to a user, like Yelp or store locators.▼mediumGoogleUberAirbnb2 replies◆ premiumFind the 20 nearest restaurants within 5km, fast, for millions of users. A naive distance scan over every place is hopeless. The design is about spatial indexing, geohash or quadtree partitioning, and handling dense cities versus empty regions. Here is how proximity search works.Open full answer →