<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 11 Oct 2015, at 23:44, Jesper Louis Andersen <<a href="mailto:jesper.louis.andersen@gmail.com" class="">jesper.louis.andersen@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="gmail_extra" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Were I to start, I'd definitely do the API modularity split as well, but I'd probably pick postgresql as a backing store over mnesia, perhaps with mnesia as an in-memory cache for active users. The assumption is user data is not changing that often, and postgresql have the added value of being a system I *know* how to operate and handle. There is much to be said for picking technology which is tried and proven and you know how to operate.</div></div></blockquote><br class=""></div><div>FWIW, while playing around* with the extended mnesia version at Klarna, we also experimented with a pgsql backend to mnesia.</div><div><br class=""></div><div>It worked pretty well, although there were some bootstrapping challenges esp. during testing**, but ultimately, the leveldb backend was a better fit for their needs.</div><div><br class=""></div><div>* They stopped playing around and are now using ‘mnesia_ext’ with a leveldb backend</div><div>** You could either create a pgsql instance inside the mnesia directory, or connect to a running pgsql, in which case consistency checks where needed</div><div><br class=""></div><div>As I understand it, Klarna will publish the leveldb backend (the pgsql backend was an experiment, so I don’t know about that).</div><div><br class=""></div><div>For those who want to experiment with *some* backend, there’s</div><div><br class=""></div><div><a href="https://github.com/klarna/otp/blob/OTP-17.5.6-mnesia_ext/lib/mnesia/test/mnesia_ext_filesystem.erl" class="">https://github.com/klarna/otp/blob/OTP-17.5.6-mnesia_ext/lib/mnesia/test/mnesia_ext_filesystem.erl</a></div><div><br class=""></div><div>which is used in the test suite.</div><div><br class=""></div><div>A very simple example of how to get started with it can be found here:</div><div><a href="https://github.com/klarna/otp/blob/OTP-17.5.6-mnesia_ext/lib/mnesia/test/mnesia_ext_test.erl" class="">https://github.com/klarna/otp/blob/OTP-17.5.6-mnesia_ext/lib/mnesia/test/mnesia_ext_test.erl</a></div><div><br class=""></div><div>BR,</div><div>Ulf W</div><br class=""><div apple-content-edited="true" class="">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;"><div class=""><div class="">Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.</div><div class=""><a href="http://feuerlabs.com" class="">http://feuerlabs.com</a></div></div><div class=""><br class=""></div></span><br class="Apple-interchange-newline">
</div>
<br class=""></body></html>