Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

mnesia is great in isolation with bounded datasets. erlang is great for operational observability of both the data flow and your application. they go great together, sometimes, if you know all your requirements up front.

It's always good to keep in mind erlang+mensia were designed to run in a "network" consisting of a unified blade chassis (each blade is a new node, and the network is a physical backplane). So, things like network partitions around erlang distribution and remote mensia tables don't have easy/proper error recovery strategies.

Even with unbounded datasets, mensia is great if you devote an engineering team to managing the scaling of it because amnesia can't do simple things like move a DB from one node to another without semi-advanced erlang+mnesia knowledge. But, whatsapp was (is?) 100% mensia last I recall, even though they had to reengineer some of it: http://www.erlang-factory.com/upload/presentations/558/efsf2...

But, mensia still relies on dets and dets still, in 2015, has a 2 GB max file size. If your data grows beyond 2 GB, you have to do mnesia fragmentation which is just an operational burden.

My scaling thoughts tend towards: sqlite -> postgres -> riak



If you can fit all your data in ram, you can use disk_copies, which doesn't use sets. schema is always disk_only_copies, but if it gets to be 2gb, wow!

Edit to add: Adding nodes isn't that hard? Connect to dist, add to extra copies of schema table, then the tables that you want. More complex if you're trying to merge together different sets of tables into one schema though.


Edit to add: Adding nodes isn't that hard?

Adding nodes isn't hard, but try restoring a mnesia table from service@node1 to service@node2. You have to do something like http://stackoverflow.com/questions/463400/how-to-rename-the-...

It's not a great solution for modern AWS-style API-driven-deployment operational models.


Oh yeah... I would handle that by having node1 and node2 running at the same time, add copies to node2, delete copies from node1, and done; but that requires both nodes to be able to run at the time (which sounds like it wasn't really an option in the stack overflow post)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: