Tuesday, January 24, 2017

Interview Question: How would you architect Uber?

There was recently a thread on hacker news about what questions you would ask a software architect. One of the questions was how you would architect Uber:

I would probably divide up the architecture into the following pieces:

  • Driver App
  • Passenger App
  • Backend Server


Let’s architect out the driver experience first. Drivers need to be onboarded so figure a whole system just for onboarding a driver. Once drivers are in the system we need to be able to track their location whenever they are ready to accept rides. So the app at a bare minimum needs to be able to constantly relay the driver’s current location to the backend server.

This needs to be updated in real time. I may look toward a messaging bus/queue for these types of updates so I can throw location updates out if get too behind. I would look at how multiplayer games like Quake implemented reporting real time location to the server as fast as possible and with as little delay as possible.

Once the backend server has the location we can look to the passenger app to do almost the same thing. The passenger app at a minimum needs to report trips that people want to take. Basically source and destination location.

Once we have both in the system we can now creating a matching algorithm or module. I would base this on how stock markets match and route orders. There are a number of different techniques for this. I would model the drivers as ask orders and the passenger requests as buy orders. Once a driver has been matched to a passenger we can send them both notifications and provide updates along the way.

Keep in mind that this is really only for traditional Ubers with one passenger. With pools the matching algorithm becomes more complex as well as the infrastructure to support it.

8 comments:

Unknown said...

This post is good and nice. custom dissertation writing service I like that you have shared your thoughts and experience with us.

Linda Thomas said...

Once we have both in the system we can now create review of Write my Papers or modules. I would base this on how stock markets match and route orders. There are a number of different techniques for this. I would model the drivers as ask orders and the passenger requests as buy orders.

jackman said...

how to earn swagbucks faster
How to Earn Swagbucks Faster-SB Guide

ASDA said...

android game hacks
Other isometric shooters to look at

robuxword said...

Do you love gaming? Clearly, who doesn't? Be that as it may, would you like to make your own game? Definitely, who wouldn't like to be a maker of a game! Indeed, with Roblox Mod Apk you can do the two things. Fascinating, right?

robux hack

omarsharif635 said...

To improve a picture's resolution, increase Increase Image size in kb online free its size, then make sure it has the optimal pixel density. The result is a larger image, but it may look less sharp than the original picture. The bigger you make an image, the more you'll see a difference in sharpness.

anrold49 said...

Are you looking for Packers and Movers in Pune world-class packers and movers firm in Pune to move any type of your assets to your desired place? If yes then Shiftingexpert.net Packers are movers is here for you. To fulfill your all the needs related to the packing and moving works, we are providing our matchless services. We are helping our clients to stay free from all types of hassles included in the movement and packaging processes. We make this happen with the help of our excellent staff. They are fully aware of each effective technique used to move any item to any place properly.

clift076 said...

If you're on the hunt Cross-Platform Games for the best crossplay games, then you're in the right place. Crossplay games are growing in number by the day, meaning that anyone hoping to play the latest FPS, MMO, or frantic cooking game with their friends online – regardless of the platform they're using – has more avenues to do so than ever. It’s never been easier to play with people all over the world.