Live data from Hacker News

Bye Bye Mongo, Hello Postgres

theguardian.com

61–70 of 427 posts

Re: Bye Bye Mongo, Hello Postgres

#61
post #48
post #23

Earlier quoted context omitted.

There are bunch of companies behind PG actually. From Fujitsu and EnterpriseDB to smaller ones like 2ndQuadrant, PostgresPro, CitusDB and many others.

Those companies did not create PG, the company behind Mongo did and does not want Google / AWS / MS to make a service using Mongo for free.

That's great there is no one single company behind PostgreSQL in this sense. The model when many companies around PG do their own niche things based on PG, having their own business models, cooperating and collaborating to make PG better, as it is the base of their business, is rather fruitful and stable in the long term.

Re: Bye Bye Mongo, Hello Postgres

#62
post #42
post #30

The Guardian example was heavily used by MongoDB as a case study to pitch their database to others in 2011: https://www.mongodb.com/customers/guardian https://www.mongodb.com/presentations/mongodb-guardian https://www.slideshare.net/tackers/why-we-chose-mongodb-for-... And reupping my previous, three-part series on MongoDB: On MongoDB NoSQL databases were the future. MongoDB was the database for "modern" web engineer…

Fashion driven development and not understanding how to actually make use of SQL.

IMO there is still a place for schema-less document databases. It's just that Postgres's JSON columns mean you can get the best of both worlds, which makes Mongo look weak by comparison.

Re: Bye Bye Mongo, Hello Postgres

#63
post #39

Document DBs are like blockchain projects - overhyped and worse than existing solutions for nearly every use case. Why do ostensibly smart engineers keep falling for this stuff?

They are not overhyped, definitely not as much as old school RDBMS stuff. It's just most engineers can't make good database choices no matter what database they choose. Or more generally they can't make good infrastructure choices, as those are out of their competence and are mostly about things like operations and distributed systems, that take a long time and a lot of experience to get to a level of good decisions.

Re: Bye Bye Mongo, Hello Postgres

#65
post #44

The creator of Envoy had some choice words about Mongo a few days ago. https://twitter.com/mattklein123/status/1074717204224999427 Plenty of people here like to dish on Mongo and the product seems to have been re-architected a few times since I used it seven years ago. By what metrics can we say the product is one worthy of passing a HN smell test? Passing Jepsen was seemingly not enough. https://www.mongodb.com/jeps…

> By what metrics can we say the product is one worthy of passing a HN smell test? Common sense and formal education? I'm sorry, I'm aware of how incredibly snarky and arrogant that sounds, but in this case I always struggled to comprehend how MongoDB, or most of "NoSQL" in general, was considered viable to begin with. "Schemaless" just immediately means that instead of the database keeping consistency, you now essen…

> "Schemaless" just immediately means that instead of the database keeping consistency, you now essentially have to do all your type and constraint checking in the application...

This is so true. Some component has to maintain integrity of the data. Should it be the application developer? Or the database software team?

I know which one I'd choose, and which one is focused on data integrity and not business logic.

Re: Bye Bye Mongo, Hello Postgres

#66
post #35

Specific technology choices aside, this was an incredible write-up of their migration process: thorough, organized, readable prose about a technical topic. It is helpful to read how other teams handle these types of processes in real production systems. Perhaps most refreshing is the description of choices made for the various infrastructure pieces, because it is reasonable and real-world. Blog posts so often describ…

Old versions of mongo were very bad.

We accured lots of downtime due to mongo.

But later versions were rock solid and I've matainer mongo installations at many startup and SMEs once you setup alertd for disk/memory usage, off you go. Works like charm 99% of the times.

Re: Bye Bye Mongo, Hello Postgres

#67
post #49

> “But postgres isn’t a document store!” I hear you cry. Well, no, it isn’t, but it does have a JSONB column type, with support for indexes on fields within the JSON blob. Interesting. I didn't know you could make indexes for things /within/ the JSON.

Yep, you can index any expression on a single row in postgres. The downside is that the optimizer will only use the index if the query contains that exact expression, while it's usually smarter with column indexes.

The only limit that I've run into in comparison with NoSQL databases is that you cannot index fields inside arrays within the column (json -> arrayIndex -> field), you need to normalize the array to a different table.

Re: Bye Bye Mongo, Hello Postgres

#68
post #30

The Guardian example was heavily used by MongoDB as a case study to pitch their database to others in 2011: https://www.mongodb.com/customers/guardian https://www.mongodb.com/presentations/mongodb-guardian https://www.slideshare.net/tackers/why-we-chose-mongodb-for-... And reupping my previous, three-part series on MongoDB: On MongoDB NoSQL databases were the future. MongoDB was the database for "modern" web engineer…

I think you're asking the wrong question. The question should be: How did MongoDB become so successful?

IMO, the reason is that newer developers faced the choice of learning SQL or learning to use something with a Javascript API. MongoDB was the natural choice because they excelled at being accessible to devs who were already familiar with Javascript and JSON.

Not only that, their marketing/outreach efforts were also aimed at younger developers. When was the last time you saw a Postgres rep at a college tech event?

Re: Bye Bye Mongo, Hello Postgres

#69
post #42

Earlier quoted context omitted.

Fashion driven development and not understanding how to actually make use of SQL.

It's amazing how many insurmountable SQL performance problems can be surmounted by putting things in 3rd normal form.

But denormalization is one strategy to improve the performance of a rdbms.

Re: Bye Bye Mongo, Hello Postgres

#70
post #42

Earlier quoted context omitted.

Fashion driven development and not understanding how to actually make use of SQL.

Reminds me of “The computer industry is the only industry that is more fashion-driven than women’s fashion.” — Larry Ellison

This actually resonates with me, maybe not in the way Ellison intended as I’m not familiar with the context he said it in. A bit off the main topic but the more I revert to just using emacs for some task I previously used a .app bundle or web page for, the more I question how much we the computer industry has just been spinning its wheels for the last 30+ years. I honestly can’t really tell what value WIMP-centric GUIs have brought to the table besides fashion, let alone the endless debates in the form of actual implementations about the best way to build one. Possibly the best argument ever made died with Mac OS 9.

I suspect that in a year I’ll be using what is effectively an Elisp machine with an Apple logo paired with an iPhone.

Post reply on HN