Live data from Hacker News

Bye Bye Mongo, Hello Postgres

theguardian.com

241–250 of 427 posts

Re: Bye Bye Mongo, Hello Postgres

#241
post #226

Earlier quoted context omitted.

I’ll try to avoid a flame war, but since you’re using python, SQLAlchemy allows for composing sql strings.

Yes, an ORM, not SQL itself.

Yes? What's the qualitative difference between using a best-of-breed SQL ORM and the Mongo API?

Re: Bye Bye Mongo, Hello Postgres

#242

Earlier quoted context omitted.

This was what was particularly interesting to me - that they went to the effort of writing a purely technical article on the particulars of how parts of their environment operate, and to publish it on their platform even when that's not the sort of content they're known for.

It's not their main platform though: > Digital Blog > A blog by the Guardian's internal Digital team. We build the Guardian website, mobile apps, Editorial tools, revenue products, support our infrastructure and manage all things tech around the Guardian

Hi! Thanks for your comments. I'm one of the authors of this post. It is the same platform at the moment (just not tagged with editorial tags so it stays away from the fronts), though sometimes the team that approves non-editorial posts to the site can be concerned about us writing about outages and things as it might carry a 'reputational risk', so we may end up migrating to a different platform in the future so we can publish more quickly, we'll see!

Re: Bye Bye Mongo, Hello Postgres

#243
post #226

Earlier quoted context omitted.

I’ll try to avoid a flame war, but since you’re using python, SQLAlchemy allows for composing sql strings.

Yes, an ORM, not SQL itself.

SQLAlchemy is not an ORM. There’s a companion ORM project if you want it, but it’s not necessary.

Re: Bye Bye Mongo, Hello Postgres

#244
post #226

Earlier quoted context omitted.

I’ll try to avoid a flame war, but since you’re using python, SQLAlchemy allows for composing sql strings.

Yes, an ORM, not SQL itself.

You can compose queries, using the queryAPI in SQLAlchemy, without touching the ORM.

Re: Bye Bye Mongo, Hello Postgres

#245
post #225

It's not a great article tbh, it's well written but it shows the clear lack of knowledge running a backend. The title should be "we didn't know what we were doing so we switched to a managed DB" I mean yeah who knew that blocking NTP therefore time drifting would break everything... For those criticizing MongoDB, Fortnite generates $3B/year and runs on MongoDB, you should tell them it's a mistake and that they should…

I'm sure mongodb is fine and powers a lot of high-profile sites and services. But I've never had a good experience running it or administering it.

But I'm also one of the the people that still prefers to run MySQL over PostreSQL just because the tooling is still far superior

Re: Bye Bye Mongo, Hello Postgres

#246
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.

does this mean mongo is a liability insofar that there is a lock-in aspect?

Re: Bye Bye Mongo, Hello Postgres

#247

Earlier quoted context omitted.

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.

True, if

1. You start from a normalized schema.

2. You denormalize in a structured way (eg dimensional modelling), rather than any old how.

3. You test the change.

Database query planners work better when they can take logically-safe shortcuts in their work. In large part that comes down to a properly-constructed schema.

Denormalizing makes it harder for the query planner. It also means you will probably lose out on future query planner enhancements.

Generally speaking, if someone wants to denormalize, I want to know the actual business value created and that the business risk is properly understood.

Re: Bye Bye Mongo, Hello Postgres

#248
post #217

Earlier quoted context omitted.

I'm glad that RedHat didn't feel that way when they were sponsoring kernel development, or that Netscape had panicked and locked down Netscape instead of opening it up, or that Sun had given Java a terrible license. Or Google and Kubernetes. LinkedIn and Kafka. Airbnb and Air Flow. I could keep going like this all day. Mongo made a lot of money building a projects that runs on top of many other projects that were rel…

So Redis, HAproxy, MongoDB, ect .. should feel good that nowdays multi-billion $ companies take your product and put more people on it that you do internally, sell it and give you nothing? Explain to me how a startup of 10-20 people can compete against AWS once they grab what you're working on to make an AWS service? Changes Mongo, Redis made to their licence were made to protected against those practices.

thanks for the note about redis... sounds like i should avoid any features that have been locked down (and consider alternatives).

Re: Bye Bye Mongo, Hello Postgres

#249
post #62

Earlier quoted context omitted.

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.

I would rather say, "Postgres's JSONB provides a hybrid compromise that may meet the needs of many users." JSONB feels like it's closer to creating more complex data types that are less primitive than those that SQL currently allows. The real driver of the NoSQL movement, I believe, was that everybody wanted to be the next big social network or content aggregation site. Everybody wanted to be the next Facebook, Insta…

I like the JSONB support. Not for storing data but to query it with shitty drivers.

Some array magic and jsonb_agg and suddenly you can get easy to json decode results instead of having to play with rows in your app. Yes you can also do it with xml_agg but these days people tend to consider anything xml as evil (they're wrong).

Re: Bye Bye Mongo, Hello Postgres

#250

I really don't get this as an indictment of MongoDB, or their OpsManager product really. They used the version of OpsManager that doesn't manage the deployment - is specifically not a deployment manager. Mongo does offer a managed version of this software, which the author mentions - with a justification for why they couldn't use that offering. However, I think this was the main mistake that The Guardian made. As the…

Fair criticisms! It's true if we'd used Mongo Atlas or something similar it would likely have been a different story - often the MongoDB support spent half the time on the phone trying to work out what version of mongo, opsmanager etc. we were running.

Re criticism of OpsManager - I think this is fair, given the sheer number of hoops we had to jump through to get a functioning OpsManager system running in AWS - no provided cloudformation, AMIs etc. £40,000 a year felt like a lot for a system that took 2 or more weeks of dev time to install/upgrade. The authentication schema thing was a bit of a pain as well, though we were going from a very nearly EOL version of Mongo (2.4 I think).

Post reply on HN