Intro to Riak with Bryan Fink
Intro to Riak with Bryan Fink - Video Code Chat hosted by Ben Ahlan
Suggested Background:
Slides of the presentation by Bryan at NoSQL NYC
Video of Bryan presenting at NoSQL NYC
Understanding Consistent Hashing which is behind Riak ( as well as Amazon Dynamo )
A More In-Depth Explanation of Consistent Hashing
The Original Theoretical Paper that Introduced Consistent Hashing Back in 1997
The Actual Erlang Code Implementing Consistent Hashing on Riak
A Discussion of the CAP Theorem ( which is the context of N R W values )
Personal Remarks:In contrast to CouchDB, Riak does not store map reduce function results in a url view that is accessible with an HTTP GET. This may seem strange to some CouchDB users. But, actually, it fits more with the functional programming approach. After receiving a message that the function has been executed, you can possibly launch a separate function to store the results. This makes for cleaner more maintainable code. And maintenance becomes really important when you are talking about a db.
In fact, I think DD (or distributed dictionaries) becomes a more appropriate term. The data is distributed and there is no base. Personally, I will be very curious to see some benchmark results, perhaps using Tsung, that compares the responsiveness of these two different design decisions. This is not to get into the minutiae of nanosecond latency which gets irksome. Rather, the behavior under the stress tests could perhaps render the rationale behind the decisions more explicit.
Investigating alternatives to CouchDB, I did not want to compromise on two principles I thought were a sine qua non for a DD: HTTP ( the web communications protocol ) and JSON ( the defacto web data protocol ). I respect the opinions of the CouchDB team in those regards. However, in other regards, merely claiming that CouchDB is opinionated ( so deal with it being the subtext ) hints at a lack of any real justification for the design decisions.
Having an opinion in and of itself is not a bad thing. But there should be an opinion where it matters and none where it does not. The design decisions made by the Riak team respects this point. For example:
1 - the ability to configure the N / R / W values
2 - the ability to enforce schema standards if desired
3 - constraining the response of map reduce functions
I would even venture to say that these decisions reflect a genuine understanding of the underlying principles of the web.
In conclusion, to stoke the flames of rivalry that make NoSQL watching such an endearing sport for us all, CouchDB, you should not be worried about MongoDB. Your real competition is Riak. Be afraid. Be very afraid. :-)