News for hackers. Stuff that matters.
Re:What MongoDB got right by bryanlarsen on Friday November 13, 2015 @06:34AM (#10559250)
"So while MongoDB today may not be a great database, I think there's a good chance that the MongoDB of 5 or 10 years from now truly will be."

Either MongoDB will be, or other databases that have learned the lessons, both good and bad, of MongoDB.

RethinkDB appears to have captured the "MongoDB done right" mindshare, and PostgreSQL has gained JSON and is gaining better replication in order to cover the same niches.

Re:What MongoDB got right by infomofo on Friday November 13, 2015 @07:26AM (#10559423)
I agree- I was a huge fan of MongoDB when it came out because of the unique data structures it enabled easily. However when it came time to select a new database for my new project, I found that the JSON support that PSQL had added gave me all the flexibility I needed while still in a somewhat relational form, and additionally it is dead simple to spin up postgres RDS instance in AWS, and it's a pain to use Mongo there.
Re:What MongoDB got right by annnnd on Friday November 13, 2015 @07:59AM (#10559550)
> ...instance in AWS, and it's a pain to use Mongo there

Why is that?

Quick google search doesn't hint at problems, but rather at pretty slick marketing pages: (which doesn't mean much, I know) https://aws.amazon.com/blogs/aws/mongodb-on-the-aws-cloud-ne...

Re:What MongoDB got right by cwmma on Friday November 13, 2015 @09:07AM (#10559886)
It's more then Postgres is so easy to use there with RDS which does all the setup for you.
Re:What MongoDB got right by rspeer on Friday November 13, 2015 @02:39PM (#10561936)
Running MongoDB effectively on AWS is very expensive. It's the opposite of what AWS is optimized for. It requires a dedicated amount of RAM that scales with your database, and it requires permanent storage that's about 100x the size of the actual data.

It's very much unlike a nice, bursty, CPU-bound web server.

Also, you can't use the big selling point of AWS, which is that you can scale it "elastically". Okay, you could, but it would be a terrible experience with lots of unavailability.

Re:What MongoDB got right by threeseed on Friday November 13, 2015 @08:13AM (#10559629)
How can MongoDB be a pain in AWS ? It is the easiest database in the world to setup. Download and run ./mongod. I've setup plenty of them in AWS and had zero issues.

And if we are talking about managed databases then it's equally dead simple to spin up a Compose/MongoLab instance in AWS.

Re:What MongoDB got right by damon_c on Friday November 13, 2015 @09:03AM (#10559862)
Last I checked, the recommended production config of mongo, in the simplest case, required at least 3 separate servers configured in a master, slave, and arbitrator cluster. Compared with setting up AWS multi zone replicated RDS SQL servers (push a button), it is very much a pain.

Yes compose.io helps.

Edit: https://docs.mongodb.org/manual/tutorial/deploy-config-serve...

Re:What MongoDB got right by tracker1 on Friday November 13, 2015 @11:53AM (#10560810)
Agreed, and now that RethinkDB supports automagic failover, it's pretty much a no brainer... and while I like Mongo's query interface slightly more for most queries, RethinkDB avoids some of the weirdness when you have more interesting queries. And server-side collation/joins is a really nice feature in a document-centric database.

PostgreSQL really needs a MUCH better replication/sharding/failover story... While I would use PostgreSQL in a situation where all I need/want is a single server, where multiple servers are needed for HA/failover, I'd probably just defer to MS-SQL, only because pg is so convoluted in that regard.

As to MySQL/Maria... I haven't touched it in years, and every time I have some weird behavior drives me nuts. I find it funny that people can love mysql, and bash on JS.

I'd also like to acknowledge ElasticSearch and Cassandra... ES is wonderful to work with for what it does best, search, and C* is a champ when you need a really good distributed table/kv store, though I think that RethinkDB is a better option today, if you don't need more than 10-20 nodes (which is a LOT).

Re:What MongoDB got right by Thaxll on Friday November 13, 2015 @10:44AM (#10560409)
PostgreSQL is nowhere near Clustering / HA / sharding features. Afaik it's only a master / slave architecture by default.
Re:What MongoDB got right by jpgvm on Friday November 13, 2015 @11:25AM (#10560632)
Sure, but the underlying primitives are better. Specifically it supports quite flexible binary replication including the new logical replication features. With this you can build things like Manatee[1] which enable effectively seamless HA. The platform I am currently working on Flynn[2] uses a variant of this state machine to implement an effectively maintenance free Postgres cluster.

In future though there will be support for bi-directional replication in Postgres, i.e true multi-master support.

[1] https://github.com/joyent/manatee [2] https://flynn.io/

Re:What MongoDB got right by threeseed on Friday November 13, 2015 @08:10AM (#10559604)
> RethinkDB appears to have captured the "MongoDB done right" mindshare

Mindshare is irrelevant. MongoDB is killing it in the enterprise right now. They have integration with Oracle, Teradata, Hadoop and countless partnerships with other vendors. You can guarantee MongoDB will still be around in 20 years the way it is positioning itself. Can't say the same about RethinkDB (as great as it is).

> PostgreSQL has gained JSON and is gaining better replication in order to cover the same niches

The PostgreSQL replication story is pretty pathetic given how old/mature it is. And I've seen nothing to suggest that anything is really improving in this area. There are a range of addons none of which are supported or built in. Basic replication is confusing, the documentation non existent in parts and good luck getting any support.

You compare it to MongoDB (or really any of the newer NoSQL databases) and it's like night and day. It takes minutes to setup a replica set and there is plenty of documentation and official support for any issues.

Re:What MongoDB got right by elithrar on Friday November 13, 2015 @08:29AM (#10559708)
> You compare it to MongoDB (or really any of the newer NoSQL databases) and it's like night and day. It takes minutes to setup a replica set and there is plenty of documentation and official support for any issues.

MongoDB makes the operational side of replication easy, but handwaves a safe, functioning implementation: https://aphyr.com/posts/322-call-me-maybe-mongodb-stale-read...

Re:What MongoDB got right by virmundi on Friday November 13, 2015 @10:01AM (#10560138)
It really is killing it in the Enterprise, and I'm trying to do my part to remove it. I'm at a client that wants to use MongoDB. It's on the approved product list. They have little to no experience with it.

Every chance I get, I advocate ArangoDB. It also is Mongo Done Right. You get joins, graphs and a thoughtful future plan from ArangoDB team. To help bridge the gap I've written an ArangoDB Hadoop connector [1]. Unlike the MongoDB one, you can read and write.

I've also added better Clojure support to it: from a driver to a Ragtime migrator.

Sadly as it stands Mongo has a better Ops story than ArangoDB. Until that improves, I don't think that ArangoDB will make it into many Fortune 1000's outside of some small prototype style applications. Maybe micro-services in the enterprise will change this, but I don't think a large insurance company wants to support multiple database standards in general, and definitely not within a family.

1 - https://github.com/deusdat/guacaphant

Re:What MongoDB got right by tracker1 on Friday November 13, 2015 @11:59AM (#10560852)
You should give RethinkDB a look... it has a great ops interface, and now that it has automatic failover, is probably my first pick... I wanted to like Arango, but they tend to lag behind in node support.

I happen to like MongoDB, warts and all.. that said, I would choose other options over it, depending on the need.

Re:What MongoDB got right by virmundi on Friday November 13, 2015 @03:16PM (#10562137)
I did. At the time (haven't looked lately) RethinkDB didn't have GEO support while ArangoDB. Turns out that I don't really need it right now (different project). I stay because it's a great community. The Devs watch StackOverflow for questions. They are respectful and helpful in the user group.

I know that RethinkDB has a good rep in those areas too. It's just that ArangoDB is a good general fit for what I need even now. I guess you could say I came for the GEO, I stayed for the warm hearted underdogs that are the ArangoDB community.

Re:What MongoDB got right by tracker1 on Saturday November 14, 2015 @06:33PM (#10567775)
That's funny, my first production use of MongoDB was because their geo support was better than ElasticSearch, which at the time, I couldn't get working correctly... I'm toying around with RethinkDB today for a hobby projuct, liking it so far.
Re:What MongoDB got right by ownagefool on Friday November 13, 2015 @03:31PM (#10562225)
Distributed databases are hard. If you're suggesting UnknownDB as a solution you haven't learnt the lessons of Mongo. I really do hope CAP isn't going to bite you or the otherDB cheerleaders in the arse.
Re:What MongoDB got right by bryanlarsen on Friday November 13, 2015 @08:18AM (#10559652)
Today's mindshare is tomorrow's market share. It's not assured, but there's a strong correlation. Conversely, lack of mindshare doesn't really hurt sales, but it does hurt growth.

PostgreSQL 9.4, 9.5 and 9.6 all introduce foundational changes to make eventually enable replication, but none of it is really exposed to the end user. They are working on it, but they are being very conservative.

Re:What MongoDB got right by coldtea on Friday November 13, 2015 @03:52PM (#10562328)
>Today's mindshare is tomorrow's market share.

Even if so, you're overestimating RethinkDB's mindshare outside of the HN echo chamber (and I say that even though I'd prefer RethinkDB myself).

If mindshare equals to developers knowing "this product exists", thinking "this product is good, I should use it", or deploying it, then Mongo wins by a factor of 4 or 5.

There's also the mindshare that Mongo has in companies building integrations for it, third party products etc.

And of course millions of CS/IT students today know about Mongo and will use it in this project or another, whereas very few know about RethinkDB. Those will be "tomorrow's market share".

Re:What MongoDB got right by threeseed on Friday November 13, 2015 @08:28AM (#10559703)
> Today's mindshare is tomorrow's market share.

This is just nonsense. There are plenty of hyped startups/products who went nowhere. Unless you understand how to market and execute you're going nowhere. MongoDB has demonstrated they are seriously good at it and given how well 3.0 has been received (write lock gone, extremely fast performance, Call Me Maybe test fixed) they have a lot of momentum.

> They are working on it, but they are being very conservative

Conservative being the operative word. You would think sometime in the last 20 years they would've tackled it.

Re:What MongoDB got right by habitue on Friday November 13, 2015 @01:12PM (#10561323)
I think you're missing the massive technical issues that are impeding postgresql from doing efficient sharding. SQL was not designed with distributed systems in mind, it has numerous features that can't be done efficiently in a distributed system, and even doing them inefficiently is insanely complicated. The language that Postgresql supports is Huge!

The reason nosql databases exist is in recognition of this fact. They jettison features like transactions that can't be done efficiently in a distributed system. If postgresql can implement a fraction of their current functionality in a distributed way, it will be an amazing engineering effort.