...

/

Detailed Design of Uber

Detailed Design of Uber

Understand the detailed design of the Uber system.

Let’s look at the detailed design of the system and see how the various components work together to offer overall functioning.

Components

Let’s discuss the components in detail.

Location manager

The riders and drivers will be connected to this service. This service will show the nearby drivers to the riders when they open the application. On the other hand, this service will also receive location updates from the drivers every 4 seconds. The location of drivers will then be communicated to Quadtree Map service to determine which segment the driver belongs to on a map. The location manager saves the last location of all drivers in a database and saves the route followed by the drivers on a trip.

Quadtree map service

This service deals with the updating of drivers’ locations. The main problem is how do we deal with finding nearby drivers efficiently.

We will modify the solution discussed in Yelp according to our requirements. We used QuadTreesA quadtree is a tree data structure in which each internal node has exactly four children. Quadtrees are the two-dimensional analog of octrees and are most often used to partition a two-dimensional space by recursively subdividing it into four quadrants or regions. The data associated with a leaf cell varies by application, but the leaf cell represents a “unit of interesting spatial information”. Source: Wikipedia on yelp to find the location. QuadTrees help in dividing the map into segments. If the number of drivers exceeds a certain limit e.g., 500, then we will split that segment into four more child nodes and divide the drivers into them. Each leaf node in QuadTrees will contain segments that cannot be divided further. We can use the same QuadTrees for finding the drivers. The most significant difference we have now is that our QuadTree wasn’t designed with regular upgrades in consideration. So, we have the following issues with our Dynamic segment ...

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy