News for hackers. Stuff that matters.
Re:MongoDB has filed to go public by smt88 on Thursday September 21, 2017 @10:42PM (#15309067)
Your entire response seems to be about why you chose document storage instead of relational data. Relational data makes sense most of the time, but not always.

The question, again, is why you'd use MongoDB even for document storage when there are so many alternatives that are safer and better-engineered. Even Postgres has a JSON data type that, by some reports, works better than Mongo and is much safer to use.

Another thread here[1] has gone into some detail about alternatives.

1. https://news.ycombinator.com/item?id=15308214

Re:MongoDB has filed to go public by jakereps on Thursday September 21, 2017 @11:06PM (#15309144)
If that's the case, then it's probably purely marketing. I had no idea PostgreSQL offered a comparable option.
Re:MongoDB has filed to go public by btown on Friday September 22, 2017 @01:23AM (#15309586)
JSON wasn't stable in Postgres until 2012, whereas the "web scale" memes for Mongo started after its initial release in 2009. Mongo indeed had better marketing and a first mover advantage, and it never let go.
Re:MongoDB has filed to go public by cervo on Friday September 22, 2017 @11:01AM (#15312779)
Early versions of mongodb locked the entire database server for every single write. Later versions locked the entire database for every single write. Only since Mongo 3.0 does MMAP only lock a single collection for a write and is WiredTiger available to offer you MVCC. And even in the MongoDB world materials it advertised now you can use more of your hardware.... Granted you could always shard, though that gets very expensive very quickly. Meanwhile postgresql had MVCC all along and its write speed was always faster than mongo on a single server basis. And you always could serialize data that changed into text fields as xml/json/csv/some other format. Mongo was mostly great marketing and a lousy product. Over time it has gotten much better. Mongo 3.2 is a way way way better product than mongo 1.x. But marketing did capitalize on a lot of hype which made no sense. Developers enjoyed just serializing their objects (the ones who didn't think of doing this into a text column in a relational db) and for the ones who did not need 'web scale' they had no idea about the severe concurrency issues introduced by mongo's writes. And for the rest there are plenty of posts about hacking around it or switching from Mongo to something else.
Re:MongoDB has filed to go public by chx on Friday September 22, 2017 @04:21AM (#15310274)
And it wasn't usable until practically 2015 (2014-12-18 if you so want).
Re:MongoDB has filed to go public by smt88 on Thursday September 21, 2017 @11:23PM (#15309193)
Something I don't think is mentioned elsewhere: other databases have shipped with Mongo compatibility. This means you can migrate from Mongo to something better without changing your code.

The most mainstream and interesting of these is Cosmos:

https://docs.microsoft.com/en-us/azure/cosmos-db/connect-mon...

(Cosmos is actually one of the most interesting DB products available for production right now, in my opinion.)

Re:MongoDB has filed to go public by cervo on Friday September 22, 2017 @10:15AM (#15312334)
Even prior to the JSON type you always could have serialized the data for the sample to some kind of string JSON/XML/CSV and put it in the column. But I think the one thing NOSQL data stores e.g. HBase/Cassandra and to a lesser Degree MongoDB has taught me is to pay attention to the tradeoffs number of rows, size of index, etc...
Re:MongoDB has filed to go public by deepsun on Friday September 22, 2017 @12:19AM (#15309370)
Yep, I benchmarked it myself, JSONB column type in PostgreSQL worked faster for me than same data in MongoDB (both reads and writes).