The Guardian on migrating from Mongo to Postgres

The Guardian’s Digital blog have posted an excellent write up on their recent migration from MongoDB to PostgreSQL. For the uninformed, the former is a so-called ‘NoSQL’ database that allows developed to treat persisted data and queries as pure JavaScript objects (JSON). The latter is a traditional SQL database, developed by a global community of open source hackers. The article is great as it gives concrete examples of why PostgreSQL would have been a better choice (scale, stability, maturity), the challenge of live migration in a very large environment, and how to deal with it.

Postgres has existed for more than 22 years. Their community claims it is the world’s most advanced open source database. Having worked extensively on Postgres for almost 10 years I can testify that is a true statement.

Mongo, on the other hand, emerged in the late 2000s as the pinnacle of the ‘NoSQL’ movement — developers who were thirsty for easier, more lightweight approaches to databases without the need to learn SQL. It worked, and today MongoDB is backed by a NASDAQ-listed company with $4.5b market cap and 1000+ employees. Mongo was touted as the future of databases for start-ups and full stack engineers that wish to move fast without the cruft and constraints of an orthodox SQL database like MSSQL or Oracle. Therefore when The Guardian decided to build their next generation CMS on top of this technology it was a big deal for the technology and its commercial potential.

I’m not saying Mongo is a poor choice – it was / is successful because it allows developers to move very fast from concept to production using a familiar technology stack (JavaScript). No need to learn SQL or complex relational algebra. It applied the necessary competitive pressure to prompt other vendors to add similar ease of use and speed to their own stacks (e.g. jsonb support in Postgres), creating much needed innovation in a market that had been dominated for too long by a duopoly (MS and Oracle) resting on its laurels.

A biased comparison of Free- and OpenBSD

I have been a longtime avid user of BSD Unix for almost 17 years. I started my career with a small BSD-focused consultancy hacking away on Perl and Postgres. One of my first tasks was building a distributed, scalable network monitoring tool that could monitor very large network with thousands of endpoints. I use FreeBSD and OpenBSD at home and enjoy their elegance and simplicity.

I stumbled upon an article that compares the two operating systems along key technical dimensions. It is written in an interview style/ conversational format with a developer from each team, so it’s an easy read. Find the article here.