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.

13 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.

Golden Packers and Movers said...

Vehicle shifting services in lohegaon are specialized car moving services that are meant to provide safe and smoother car moving experience to their customers. Like all services providers in the logistics industry, car transport companies in lohegaon have their own moving vehicle or car carriers for safe transportation of vehicle from lohegaon to other cities in India. Such companies have special packing materials to pack your car and then they load the vehicle in the safe and specialized moving trucks so that your car can be delivered at your doorsteps in a perfect condition. So, hire a suitable and top car relocation services in lohegaon now from Golden Packers and Movers and be assured of a great car relocation experience.
https://goldenmovers.in/packers-and-movers-undri
https://goldenmovers.in

Long Distance Movers said...

At Guardian Van Lines Moving and Storage, our moving specialists know how to get your treasured belongings safe and sound from point A to point B with our recommended interstate movers. With decades of combined relocation experience, we strive to provide excellent service to our customers. Whether it’s an interstate move or cross country move, we’ve got you covered. Our team proudly assists military families and veterans, along with corporations and businesses that are in need of a professional relocation. Long Distance Moving Services

outofstatemoving said...

When packing for a move, sooner or later you’ll get to packing a few cables here and there in the residence. In maximum cases, the ones cables can be electricity cords of digital devices and electric household home equipment but you’ll additionally get to packing connection cables of diverse peripheral devices, and extension cords as nicely. Click Here for more Details:
Long Distance Movers

crosscountrymove said...

Out of State Moving
Out of State Long Distance Moving helps thousands of Americans relocate to a new state each month while utilizing our long distance moving network to help our customers save up to 50% on long distance out of state moves.

waisttrainer said...

Providing the best waist trainers for women across the America and the world!Once known as the corset, waist trainers have taken over the modern world, offering a safe and effective way to curve and squeeze your waist! Get snatched, boost confidence and improve appearnce with a snatch me up waist trainer. click here more details:

Visit official website