5 ms·
Mongo has been related to "perpetual irritation" up to "major production issue" at all three of my last companies. For as easy as it is to use jsonb in Postgre
by lllr_finger 6y ago
Mongo has been related to "perpetual irritation" up to "major production issue" at all three of my last companies.
For as easy as it is to use jsonb in Postgres, or Redis, or RocksDB/SQLite, or whatever else depending on your use case - I can't find any reason to advocate its use these days. In my anecdotal experience, the success stories never happen, and nearly developer I know has an unpleasant experience they can share.
Big thanks to aphyr and the Jepsen suite (and unrelated blog posts like Hexing the Interview) for inspiring me to do thorough engineering.
- StavrosK 6y agoI find that using JSON for things you don't need to query/validate (like big blobs you just want to store) and breaking the rest out to columns works well enough. Plus, you can always migrate the data out to a field anyway.
- emerongi 6y agoPostgres 12 has generated columns, so you can throw your data in a jsonb column and have Postgres pull data out of it into separate columns for indexing for example.
- magnushiie 6y agoGenerated columns are not necessary for indexing in Postgres, you can create an index on any expression based on the record (supported by many versions now).
- mtrycz2 6y ago> I can't find any reason to advocate its use these days. Don't you know? It's web-scale.
- rmdashrfstar 6y agoIf I was a moderator on HN, I would instantly ban commenters who continue to make these asinine posts. Is this Reddit, or is HN striving to be Reddit?
- reese_john 6y agohttps://news.ycombinator.com/newsfaq.html https://news.ycombinator.com/newsfaq.html "Please don't post comments saying that HN is turning into Reddit. It's a semi-noob illusion, as old as the hills."
- rmdashrfstar 6y agoInteresting taste of my own medicine. Will do, thanks for the reminder!
- ep103 6y agoIs Postgres what most people would suggest as a MongoDB replacement? Anyone have any suggestions for a true non-MongoDB jsonDocument based noSql option?
- zozbot234 6y agoIt depends what you're using it for. Postgres is a very good all-around choice these days (compared to when the whole 'noSql' thing got started) and also supports document-based scenarios quite well via JSON/JSONB columns and its support for these datatypes in queries, updates, indexing etc. Sharding and replication can also be set up via fairly general mechanisms, as described in pgSQL documentation. (For instance, the FDW facility is often used to set up sharding, but it could also support e.g. aggregation.)
- threeseed 6y agoNote that there is no Jepsen test for those sharding/replication features.
- jfkebwjsbx 6y agoThe first question you must ask yourself is: do I really need a document store? Because the answer is "no" in the overwhelmingly majority of cases, specially if your product is mature.
- ep103 6y agoOr trust me, I'm aware. But inevitably I will be in a design meeting where they will want a non-sql alternative, and I'd be nice to know what I can suggest besides Mongo
- threeseed 6y agoAs has been mentioned above PostgreSQL does not come out of the box with a supported, tested clustering solution. Given that is a pretty popular part of MongoDB seems like an important thing for people to continuously fail to mention.