4 ms·
I have to admit, I could see this running for a city the size of SF on a desktop machine under the table at the taxi depot. Uber has 11,000 drivers in SF, but p
by Animats 10y ago
I have to admit, I could see this running for a city the size of SF on a desktop machine under the table at the taxi depot. Uber has 11,000 drivers in SF, but probably only a few thousand are on at any one time. A ride takes a few minutes, so if you figure 3,000 active drivers and 4 rides per hour, that's only about 3 ride transactions per second. You have a transaction at ordering, one at ride start, and one at ride end. Plus you have tracking of where all the active drivers are, pinging maybe once a minute. That adds up to only at 10-20TPS. You can offload the routine web and app stuff to some front end machines. And you want to do some analysis every minute or two to see where there are "surges".
The only non-trivial part of this is assigning drivers to rides.
- dkarapetyan 10y agoIndeed. Most SaaS operations are over-provisioned both in terms of hardware and software.
- goldenkey 10y agoAnd over-provisioned in terms of employees, I'd add.
- mkagenius 10y ago> tracking of where all the active drivers are, pinging maybe once a minute. Once every 5 seconds will be more accurate.
- ambicapter 10y agoAnd will 30x the number of requests...
- dzhiurgis 10y agoDriver app pings central server every 15 seconds. If any ride requests are available, it displays it to driver.
- ricardobeat 10y agoIt's easy to imagine the simplest stack that can serve the core features of any service, and that is well served by a single box. What's missing from the picture is the infrastructure to replicate this 500 times by separate teams, monitoring all of it, backup, auditing, aggregating customer and business metrics, back-office systems, and more. Plus the fact that these things always grow organically and embed a host of imperfect decisions - the imaginary system will always be better designed.
- tlrobinson 10y agoThis. Armchair software architecture is so easy when you can gloss over the details that make a product great. Also routing, ETAs, geocoding/search, etc. WebGL visualizations and such are probably overkill, but if it makes the company more fun to work for then it probably breaks even, at worst.
- danpalmer 10y agoCouldn't agree more. It's all the invisible details that cause the load. It's a much more trivial example, but highlights the point well I think - we have pages in the app I work on that would respond in ~100ms, but might have a single sentence on them that takes another 100ms to generate because of the complex data relationships involved in figuring out what that sentence needs to say. The 'request handler' might be 20 lines of code, with a 50 line util function to generate that line of text. No armchair architect will ever take into account things like that, but the end result is a page that is just a bit more personalised to the user and therefore improves their experience. In an app of any real size, I imagine there are anywhere from hundreds to many thousands of tiny little details like this that all together drastically increase the amount of power needed to run a service.
- orf 10y ago> No armchair architect will ever take into account things like that An armchair architect would say it's not needed. They would question whether spending 50% of your response time generating a single sentence is in any way worth it, and wonder what kind of architectural mistakes led to that.
- karmelapple 10y agoI'm wondering why matching is nontrivial. When I use these services, it doesn't always give me the closest car of the ones shown. It's all about which driver accepted my request first. Isn't it a fairly easy calculation of "all cars within X km or the nearest Y cars", and then whichever driver taps first gets matched with you?