<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">We have <a href="https://github.com/zotonic/depcache" class="">https://github.com/zotonic/depcache</a><div class=""><br class=""></div><div class="">This is a NON-distributed caching system which:</div><div class=""><br class=""></div><div class=""> - tracks dependencies between keys</div><div class=""> - cache expiration</div><div class=""> - local in process memoization of lookups</div><div class=""> - automatic cleanup with a max memory usage (soft limit)</div><div class=""><br class=""></div><div class="">I have been pondering to make this distributed for a long time….</div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><br class=""></div><div class="">Marc</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On 21 Dec 2021, at 14:57, Roberto Ostinelli <<a href="mailto:ostinelli@gmail.com" class="">ostinelli@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Let’s write a database! Well not really, but I think it’s a little sad that there doesn’t seem to be a simple in-memory distributed KV database in Erlang. Many times all I need is a consistent distributed ETS table.<br class=""><br class="">The two main ones I normally consider are:<br class=""><br class=""><ul class=""><li class=""><b class="">Riak</b> which is great, it handles loads of data and is based on DHTs. This means that when there are cluster changes there is a need for redistribution of data and the process needs to be properly managed, with handoffs and so on. It is really great but it’s eventually consistent and on many occasions it may be overkill when all I’m looking for is a simple in-memory ACI(not D) KV solution which can have 100% of its data replicated on every node.</li><li class=""><b class="">mnesia</b> which could be it, but unfortunately requires special attention when initializing tables and making them distributed (which is tricky), handles net splits very badly, needs hacks to resolve conflicts, and does not really support dynamic clusters (additions can be kind of ok, but for instance you can’t remove nodes unless you stop the app).</li><li class="">…other solutions? In general people end up using Foundation DB or REDIS (which has master-slave replication), so external from the beam. Pity, no?</li></ul><br class="">So… :) Well I don’t plan to write a database (since ETS is <i class="">awesome</i>), rather distributing it in a cluster. I’d simply want a distributed ETS solution after all!<br class=""><br class="">I’ve already started the work and released a version 0.1.0 or ram:<br class=""><a href="https://github.com/ostinelli/ram" class="">https://github.com/ostinelli/ram</a><br class=""><br class="">Docs are here:<br class=""><a href="https://hexdocs.pm/ram" class="">https://hexdocs.pm/ram</a><br class=""><br class="">Please note this is a very early stage. It started as an experiment and it might remain one. So feedback is welcome to decide its future!<br class=""><div class=""><br class=""></div><div class="">Best,</div><div class="">r.</div></div>
</div></blockquote></div><br class=""></div></body></html>