Has anyone used Mnesia with RA consensus?

I’m still learning Elixir as hobby and I’ve was interested about mnesia, but then I read that it won’t handle some network problems that well. Has anyone used (Raft-consensus based mnesia transactions) https://github.com/rabbitmq/mnevis that might fix these problems?


Interesting to see that. I’m working on my own raft implementation (for myself) so I’ll check it out.

It’s using https://github.com/rabbitmq/ra Raft implementation

Videos about Ra
https://youtu.be/7NNjjTrBZtw Karl Nilsson - Ra: a Raft implementation - Code BEAM Lite Berlin 18
https://youtu.be/wHpNfCeX_Vk Karl Nilsson - Make a distributed toolbox with Ra | Code BEAM STO 19

1 Like

Any updates on this?

So, I wrote it once, probably about 95% correct, used it in an R&D demo to great success. However, I didn’t open source it and the place I worked at was not that great about open source. I rewrote it, at my next place of employment with the plan of open sourcing it, and then i got mugged (san francisco for ya), my laptop was stolen and it was literally the one library I hadn’t put up on github yet. I’m kind of burnt out on the idea of working on a raft. It’s also somewhat wrong in the paper’s spec as-is (see https://twitter.com/heidiann360/status/1338564664523943936), though one nice thing is that Jeppsen provides a library “maelstrom” that you can use to check the validity of your raft implementation. If I were to start over, I wouldn’t do raft, I would rather use one of Heidi Howard’s other consensus algorithms, they sound really cool, and useful for the distributed datacenter case, which is what I would have cared about. But I am not working in datacenters anymore.

If you’re interested in doing it I’m happy to give advice.


I always use Gitlab with private repos to keep my work in progress safe from disaster in my laptop. It’s not only from being stolen or lost, it’s from an accidental rm -rf ~ ;). Yes my fat finger once hit enter as the same time I typed ~ in the rm -rf command. So, I have learned my lesson and commit often to upstream, even when the work is not completed for a proper commit… I use WIP commits and WIP branches in this phase.

It seems the issue of Raft not being correctly implemented is because the missing bits are considered optimizations, not requirements. I see the same happening in a lot of OAuth implementations that are not properly secure, because what prevent them from being attacked is considered optional in the RFC, therefore they are not implemented by the libraries or are made optional and not documented in the docs.

I believe that if they made the optimizations as requirements in the RAFT paper then you would not be seeing this liveness issues in the RAFT implementations.

Need to research on this other consensus algorithms.

Thanks for the offer, I really appreciate it :slight_smile:

I am doing this research more for gathering knowledge about the trade offs in a distributed system, so that I can make a decision about keeping Mnesia or not, but I am leaning heavily towards dropping it and use an append log to just backup :ets and reuse it to rebuild :ets each time I start the application.

Did you already watched the 11 minutes video entitled Paxos vs Raft: Have we reached consensus on distributed consensus? — Heidi Howard?

The short talk of her is based on the paper, with the same title of the above talk, that she wrote in conjunction with Richard Mortier:

Wow, that was fantastic. I hadn’t seen it! Makes me want to implement paxos now :slight_smile:

1 Like

I was with the impression from the video that Paxos was not worth due to the added complexity for almost no benefit, but I am still wrapping my mind around this distributed consensus mechanisms.