[erlang-questions] Support for newcomers and the popularity of Erlang

Ulf Wiger <>
Mon Mar 19 18:54:35 CET 2012


On 19 Mar 2012, at 18:42, Wojciech Knapik wrote:

> 
> 
> On Mon, Mar 19, 2012 at 6:08 PM, Jesse Gumm <> wrote:
> Have you looked into riak for distributed, master-less data replication?
> 
> 
> From what I've read on github, I can't tell what the benefits would be and I was hoping to familiarize myself with mnesia.
> 
> Would riak be a better fit ?  


It depends much on your access patterns.

Mnesia offers transaction consistency, meaning that you can run fairly complex update transactions and let mnesia worry about consistency across your data set. This is a wonderful feature, but it tends to become troublesome in very large clusters, since the increasing cost of ensuring consistency puts a limit on scalability, and netsplits become increasingly likely as your clusters go. Netsplits and transaction consistency make poor bedfellows.

Riak is a key-value database with no transaction concept whatsoever (although individual writes are of course atomic). Thus, if you have concurrent read-write patterns against the same data, you will find the results …arm, interesting for any but the simplest of update patterns.

(See e.g. http://www.infoq.com/presentations/Eventually-Consistent-HTTP-with-Statebox-and-Riak for an example of roughly how far you can push concurrent updates in riak. It should also give you an idea of how riak works.)

OTOH, if all you do is simple get/put, and you need high throughput and excellent fault tolerance, riak will let you scale to levels way beyond what any sane person would attempt with mnesia.

BR,
Ulf W
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120319/5e54d9c0/attachment.html>


More information about the erlang-questions mailing list