Live data from Hacker News

Why we lost Uber as a user

postgresql.org

221–230 of 310 posts

Re: Why we lost Uber as a user

#221
post #71

Earlier quoted context omitted.

Without banking technology, a bank can still be a bank and provide its distinctively unique services, just slower. It worked for the Templars, and they didn't even have double-entry bookkeeping. Without Uber technology, Uber would not exist - it would just be Uber Taxi Inc., a perfectly ordinary taxi company indistinguishable from all others.

Well, not really. Their product is really a two-sided market with prices controlled by themselves - matching drivers, unregulated and not employed by Uber, to passengers. They could do that with nothing more than a call center and a spreadsheet of roughly where drivers are if the tech didn't exist, and it'd still be cheaper and avoid the monopoly of the taxi companies. Whether it'd largely avoid the ire of law enforc…

Wouldn't that more or less just make them into a taxi company? That approach just wasn't working well.

The main difference between Uber and taxi companies is that Uber fully utilized modern technology from the ground up to build the platform, and as a result they were able to realize major improvements in terms of speed, reliability, and cost-effectiveness.

Re: Why we lost Uber as a user

#222

Earlier quoted context omitted.

Yes, apparently the limit on 32-bit is 2GB actually. MongoDB has always stated upfront that 32-bit architectures are not recommended for production use for precisely this reason: http://blog.mongodb.org/post/137788967/32-bit-limitations This has also has been stated on their download page for 32-bit binaries as well.

It hasn't always been stated there, and it was a warning on a README somewhere. The server would run happily on 32 bits, and never crash or produce any user-visible errors, it would just silently corrupt data while pretending the insertion went great.

And that's the real issue I would think. If it shut itself down or went into read-only and generated errors it wouldn't be so bad. The limitations 32-bit architectures are why we have 64bit architectures. I think it's fair as a developer to require x64 instead of jumping through hoops to support both architectures. But if you're going to release 32-bit binaries for something like development or testing you should be explicit about the use cases and limitations and avoid failing silently when they're exceeded.

Re: Why we lost Uber as a user

#223
This later comment in the thread (https://www.postgresql.org/message-id/flat/7663dfec-e46a-401...), by Merlin Moncure, describes a set-up that most applications have, and I agree with his assessment of it:

    Taking a step back, from the outside, it looks like uber:
    *) has a very thick middleware, very thin database with respect to
    logic and complexity
    *) has a very high priority on quick and cheap (in terms of bandwidth)
    replication
    *) has decided the database needs to be interchangeable
    *) is not afraid to make weak or erroneous technical justifications as
    a basis of stack selection (the futex vs ipc argument I felt was
    particularly awful -- it ignored the fact we use spinlocks)

    The very fact that they swapped it out so easily suggests that they
    were not utilizing the database as they could have, and a different
    technical team might have come to a different result.   Postgres is a
    very general system and rewards deep knowledge such that it can
    outperform even specialty systems in the hands of a capable developer . . .
It's all the rage to use an object-relational wrapper to abstract away the database brand, so that the database can be "interchangeable." In my 11 years experience with web apps and databases, particularly Postgres, this is a false economy:

- When you use an object-relational wrapper, you are trading one kind of lock-in for another. Instead of locking yourself into Postgres, you are locking yourself into PHP. That seems a good trade to most developers, who know their middleware language better than SQL.

- However I have found that moving your application code from the middle layer, to SQL, results in shorter code and much faster execution. I don't mean moving the Python code into Postgres functions written in PL/Python (which you can do). I mean porting them to SQL. The simplest example is if your first version of your application just used SQL to fetch all the rows from the database and using a Python if-statement to find the rows you need: rewriting the Python if-statement as an SQL where-clause will be much faster. I'm sure few of you are doing something like that, but there are many, more complex examples like that, which I have learned and slowly replaced over the years.

- Furthermore SQL is just like any other language in that there are many ways to do the same thing, and some ways are a thousand times faster than others. People who only know basic SQL likely are writing inefficient apps. I have often rewritten queries to use a fraction of the memory and time they were using.

Moral of the story: Learn more SQL, instead of learning some avant-garde storage engine. Stepping deeper into PostgreSQL (and thereby locking yourself more and more into it) is often better than locking yourself deeper into Python, PHP, or whatever your middle language is. Who knows, you may want to switch out your middle language before you want to switch out Postgres!

I try to make Postgres my "application": put all your business logic in there. It may have an arcane "user-input interface" (SELECT . . . FROM sometable WHERE . . .) and a primitive "user-output interface" (plain tables) but that's where the middleware finally comes in, to cover the queries with checkboxes and buttons, and to decorate the output into various boxes, color, layout, and type, and maybe some nice images, graphs, and so on.

Re: Why we lost Uber as a user

#224

Earlier quoted context omitted.

Yea would be amazing to see an innodb backend for PG! ( I'll let myself out ;)

There _is_ a Foreign Data Wrapper that wraps MySQL[1]. Not exactly the same thing though, and no idea how well it works. [1] https://github.com/EnterpriseDB/mysql_fdw

I can tell you it doesn't work very well for wrapping remote postgres tables... it doesn't even send the where clause to the remote server, instead does a table scan across the network and matches locally.

Re: Why we lost Uber as a user

#225

I see some comments call this a "very specific user case". This is not. Pretty much every major web project is going to have tables like that. User sessions are just one example. Sure, you can design around this, but it is a problem and no design is going to make it completely go away.

Storing sessions in rdbms is a rather poor choice espesially at scale.

On the other hand, sessions are important and if you're only using redis/etc for caching and not as a primary data store, it may not be a very good idea to treat it as a primary store of session data.

Sessions are vital for any product that works better with logged-in users.

Re: Why we lost Uber as a user

#228
post #142
post #115

Earlier quoted context omitted.

Table manners, itsy-bitsy rules for itsy-bitsy people as Robert Pirsig put it.

Or, table stakes to distinguish folks worth spending time on & folks not worth spending time on. Since it's so easy to get the little things right, anyone who doesn't is just a bit suspect. It's like discarding resumés which arrive with large food stains on them. It's just too easy to print off a clean copy, that anyone who doesn't must be a bit off.

Using insignificant details as hints is probably a valid strategy, especially when you have to make quick decisions with limited information. But they are not primary indicators and are hardly worth their own comment. This entire thread is off topic and of dubious value.

Re: Why we lost Uber as a user

#229
post #4

Wow, nice explanation. I was expecting a lengthy post with refuting everything uber said and explaining why pgsql was a better choice and uber was wrong. Nice and clean post showing that acknowledging a weakness isn't a terrible choice. I do wonder whether a different data structure would have mitigated the issue instead of transitioning to a different storage engine.

I think if this was a giant corporation or someone like Mark Zuckerberg, there would be some nice PR post refuting Uber's claims.
Post reply on HN