Skip to content

High-level Design of Uber

Before diving deep into the design, let’s understand how our application works. The following steps show the workflow of our application:

All the nearby drivers except those already serving rides can be seen when the rider starts our application.

The rider enters the drop-off location and requests a ride.

The application receives the request and finds a suitable driver.

Until a matching driver is found, the status will be “Waiting for the driver to respond.”

The drivers report their location every four seconds. The application finds the trip information and returns it to the driver.

The driver accepts or rejects the request:

The driver accepts the request, and status information is modified on both the rider’s and the driver’s applications. The rider finds that they have successfully matched and obtains the driver’s information.

The driver refuses the ride request. The rider restarts from step 2 and rematches to another driver.

Slide 1 of 5
Slide 2 of 5
Slide 3 of 5
Slide 4 of 5
Slide 5 of 5

At a high level, our system should be able to take requests for a ride from the rider and return the matched driver information and trip information to the rider. It also regularly takes the driver’s location. Additionally, it returns the trip and rider information to the driver when the driver is matched to a rider.

Let’s discuss the design of APIs according to the functionalities we provide. We’ll design APIs to translate our feature set into technical specifications.

We won’t repeat the description of repeating parameters in the following APIs.

| Parameter | Description |
| --- | --- |
| driverID | The ID of the driver |
| oldlat | The previous latitude of the driver |
| oldlong | The previous longitude of the driver |
| newlat | The new latitude of the driver |
| newlong | The new longitude of the driver |
The `updateDriverLocation` API is used to send the driver’s coordinates to the driver location servers. This is where the location of the driver is updated and communicated to the riders.
### Find nearby drivers
`
`
``````
| Parameter | Description |
| --- | --- |
| riderID | The ID of the rider |
| lat | The latitude of the rider |
| long | The longitude of the rider |
The `findNearbyDrivers` API is used to send the location of the rider for whom we want to find the nearby drivers.
### Request a ride
`
`
ParameterDescription
latThe current latitude of the rider
longThe current longitude of the rider
dropOfflatThe latitude of the rider’s drop-off location
dropOfflongThe longitude of the rider’s drop-off location
typeOfVehicleThe type of vehicle required by the rider—for example, business, economy, and so on.

The requestRide API is used to send the location of the rider and the type of vehicle the rider needs.

ParameterDescription
etaThe estimated time of arrival of the driver

The showEta API is used to show the estimated time of arrival to the rider.

ParameterDescription
timestampThe time at which the driver picked up the rider

The confirmPickup API is used to determine when the driver has picked up the rider.

| Parameter | Description |
| --- | --- |
| tripID | The ID of the trip |
| driverlat | The latitude of the driver |
| driverlong | The longitude of the driver |
| time_elapsed | The total time of the trip |
| time_remaining | The time remaining (extract the current time from the ETA) to reach the destination |
The `showTripUpdates` API is used to show the updates of the trip, including the position of the driver and the time remaining to reach the destination.
### End the trip
`
`
The `endTrip` API is used to end the trip.
Requirements of Uber’s DesignDetailed Design of Uber