News for hackers. Stuff that matters.
Re:MongoDB Is Raising Another $100M by tracker1 on Friday January 09, 2015 @06:42PM (#8865188)
MongoDB does master-slave replication with an election protocol to automagically promote a slave on failure. The use of this in practice is pretty good.

It really depends on what you need... there are situations where I would recommend MongoDB, RethinkDB, ElasticSearch or Cassandra... The farther you get from traditional RDBMS, the more you have to consider your needs and any trade offs.

Re:MongoDB Is Raising Another $100M by nawitus on Friday January 09, 2015 @06:52PM (#8865221)
What I find interesting is that every single time I bring up MongoDB's lack of master-master architecture/replication on Hacker News the response I get is related to the fact that MongoDB has a master-slave architecture. Sure, it might work for some applications well, but master-master is a better choice for typical NoSQL uses.

The whole point of master-master is not dealing with failure situations or trying to scale out performance (even though master-master handles those situations naturally), the point is that it's a different philosophy. The idea is that there's no single official true state of the database. Reality happens to map that idea very well. The data doesn't exist in a centralized official place, it exists in multiple places which may not be perfectly connected in real time all the time.

The data exists at multiple servers at multiple databases. It exists on your mobile device, sometimes disconnected from the server. It exists on thousands of browsers on the same time. There's no single master.

The best mapping of this reality is the master-master ideology. Yes, it requires application-level merges of data, but the benefits you get from implementing this can be tremendous. And that's why I'm excited about using CouchDB. Or rather I'm excited about master-master databases. CouchDB happens to be one of those, and I hope future databases will be built around that too.

Re:MongoDB Is Raising Another $100M by willholley on Saturday January 10, 2015 @04:40AM (#8866396)
That's fine for scaling reads - writes, not so much. The leader election in MongoDB has been problematic in the past (https://aphyr.com/posts/284-call-me-maybe-mongodb) but I think they have made recent moves to address this.
Re:MongoDB Is Raising Another $100M by TheAceOfHearts on Saturday January 10, 2015 @04:11AM (#8866357)
Can you expand upon that? When would you recommend MongoDB, RethinkDB, ElasticSearch, or Cassandra?
Re:MongoDB Is Raising Another $100M by tracker1 on Sunday January 11, 2015 @12:26AM (#8869139)
If you need massive reads or writes... I'm talking hundreds of thousands of simultaneous users, then Cassandra is probably your best bet, the tooling around your use will be a bit more difficult, you may need to shard/replicate portions of your data anyway depending on use. You reach for Cassandra when your use is going to get complicated. I wouldn't look at Cassandra if I needed less than say a dozen nodes to start with.

ElasticSearch is fairly close, but I'm unsure if it will scale as well in practice. ElasticSearch handles the middle-to-high ground very well. I'm not sure I would use it for authorative data... It works incredibly well for logging (with logstash) and the front end utilities (kibana, etc) are nice too. It's primary use is as a search, if you are very read heavy for searches, or write heavy for analytical data it works well. You can tune your use to separate the storage and reads in interesting ways.

MongoDB works incredibly well when your core data is composed of mostly self-contained documents and in need of certain flexibility. A typical classifieds website is a great use case. It's also a very natural fit in a lot of programming languages, js (node) in particular is a natural fit. There's much less disconnect between the data and your application models.

RethinkDB is very similar to MongoDB, but has a more traditional mindset when it comes to it's use. I think the programming interfaces are a little better thought out, consistency and data security is at the forefront here.

In general it comes down to... very large loads, use cassandra... easiest use is mongo... rethinkdb I've been waiting on the replication story to get better, and the geosearch support is fairly recent... ElasticSearch search or for logging (write heavy). In many scenarios where I would use ElasticSearch, it would be along with an RDBMS as an authoratative data source.