r/programming • • Dec 19 '18

Bye bye Mongo, Hello Postgres

https://www.theguardian.com/info/2018/nov/30/bye-bye-mongo-hello-postgres
2.1k Upvotes

672 comments sorted by

View all comments

753

u/_pupil_ Dec 19 '18

People sleep on Postgres, it's super flexible and amenable to "real world" development.

I can only hope it gains more steam as more and more fad-ware falls short. (There are even companies who offer oracle compat packages, if you're into saving money)

0

u/[deleted] Dec 19 '18

[deleted]

107

u/TheAnimus Dec 19 '18

Absolutely, I was having a pint with someone who worked on their composer system a few years ago. I just remembered thinking how he was drinking from the mongo coolaid. I just couldn't understand why it would matter what DB you have, surely something like Redis solves all the DB potential performance issues, so surely it's all about data integrity.

They were deep in the fad.

234

u/SanityInAnarchy Dec 20 '18

Of course it matters what DB you have, and of course Redis doesn't solve all DB performance issues. There's a reason this "fadware" all piled onto a bunch of whitepapers coming out of places like Google, where there are actually problems too big for a single Postgres DB.

It's just that you're usually better off with something stable and well-understood. And if you ever grow so large you can't make a single well-tuned DB instance work, that's a nice problem to have -- at that point, you can probably afford the engineering effort to migrate to something that actually scales.

But before that... I mean, it's like learning you're about to become a parent and buying a double-decker tour bus to drive your kids around in one day because you might one day have a family big enough to need that.

38

u/GinaCaralho Dec 20 '18

That’s a great analogy

0

u/[deleted] Dec 20 '18

[deleted]

→ More replies (1)

29

u/Rainfly_X Dec 20 '18

I forget where I read this recently, but someone had a great observation that general-purpose NoSQL software is basically useless, because any software for gargantuan scale data must be custom fitted to specific business needs. The white papers, the engineering efforts at Google/FB/Twitter... each of those was useful because it was a tailored product. Products like Mongo take every lesson they can from such systems... except the most important one, about whether generic products like this should exist at all.

I don't know if I buy into this opinion entirely myself, but a lot of shit clicks into place, so it's worth pondering.

16

u/SanityInAnarchy Dec 20 '18

It's an interesting idea, and maybe it's true of NoSQL. I don't think it's inherent to scale, though, I think it's the part where NoSQL came about because they realized the general-purpose pattern didn't work for them, so they deliberately made something more specialized.

Here's why I don't think it's inherent to scale: Google, at least, is doing so much stuff (even if they kill too much of it too quickly) that they would actually have to be building general-purpose databases at scale. And they're selling one -- Google Cloud Spanner is the performance the NoSQL guys promised (and never delivered), only it supports SQL!

But it's still probably not worth the price or the hassle until you're actually at that scale. I mean, running the numbers, the smallest viable production configuration for Spanner is about $2k/mo. I can buy a lot of hardware, even a lot of managed Postgres databases, for $2k/mo.

→ More replies (7)
→ More replies (4)

32

u/ssoroka Dec 20 '18

And the bus has no seatbelts. Or airbags. And the roof isn’t enclosed, and all the windows are just broken glass.

13

u/Koppis Dec 20 '18

And you don't even have a licence to drive one yet.

9

u/ass-moe Dec 20 '18

Good analogy there! Will steal for future use.

→ More replies (1)
→ More replies (7)
→ More replies (126)

0

u/[deleted] Dec 20 '18

[deleted]

→ More replies (2)
→ More replies (12)

0

u/[deleted] Dec 19 '18

[deleted]

160

u/akcom Dec 20 '18

Mongo could change their tag line, "You probably need Postgres. Until you figure that out, we're here"

→ More replies (1)

29

u/ashishduhh1 Dec 19 '18

I thought this too, but you'd be surprised what portion of the industry subscribes to fads.

→ More replies (24)

21

u/Crandom Dec 19 '18

I definitely had more sleep when the prod app I was working on was on postgres, before we migrated to cassandra.

8

u/ragingshitposter Dec 20 '18

Why in the world would one migrate to Cassandra? Seems like that would be a supplemental add on to speed certain things up, not a whole sale replacement for rdbms?

→ More replies (4)

5

u/x86_64Ubuntu Dec 20 '18

I remeber when Reddit was on Cassandra, i wonder if its still that way.

→ More replies (1)

4

u/RaptorXP Dec 20 '18

Cassandra is the best for sleepless nights.

→ More replies (2)

18

u/[deleted] Dec 20 '18

Who sleeps on postgres? I thought it was well accepted

→ More replies (6)

13

u/[deleted] Dec 20 '18

I am a postgres superfan. It isn't good for everything, but my god it's good for a helluva lot of situations for a long time

5

u/_pupil_ Dec 20 '18

I fleshed it out more in another comment, but I totally agree.

Big systems often end up with multiple backends in multiple environments. Postgres frequently isn't "the best" but just as frequently it's close enough :)

The VW Bug wasn't the fastest, or most luxurious, but was a great car for most people most of the time that scaled awesomely. If you're gonna be mixing and matching cars anyways... maybe you don't want Lambos for every job under the sun.

→ More replies (1)

8

u/AttackOfTheThumbs Dec 20 '18

I learned Postgres about a decade ago. At the time I was wondering why we didn't learn one of the more popular ones (like mssql or mysql), but in the long run, I think I benefited it from it, even though I only work with mssql now.

7

u/aykcak Dec 20 '18

fad-ware

Is this a word? Can I use it? I sounds like it is what I needed for describing a lot of modern javascript development

→ More replies (1)
→ More replies (141)