<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 19 Mar 2012, at 18:42, Wojciech Knapik wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">On Mon, Mar 19, 2012 at 6:08 PM, Jesse Gumm <span dir="ltr"><<a href="mailto:gumm@sigma-star.com">gumm@sigma-star.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>Have you looked into riak for distributed, master-less data replication?</p></blockquote><div><br></div><div>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.</div>
<div><br></div><div>Would riak be a better fit ? </div></div></blockquote><br></div><div><br></div><div>It depends much on your access patterns.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>(See e.g. <a href="http://www.infoq.com/presentations/Eventually-Consistent-HTTP-with-Statebox-and-Riak">http://www.infoq.com/presentations/Eventually-Consistent-HTTP-with-Statebox-and-Riak</a> 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.)</div><div><br></div><div>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.</div><div><br></div><div>BR,</div><div>Ulf W</div></body></html>