What does HackerNews think of ra?
A Raft implementation for Erlang and Elixir that strives to be efficient and make it easier to use multiple Raft clusters in a single system.
- "The Onion Layer Theory" https://learnyousomeerlang.com/building-applications-with-ot...
- "On Erlang, State and Crashes" http://jlouisramblings.blogspot.com/2010/11/on-erlang-state-...
- "Why Restarting Works" https://ferd.ca/the-zen-of-erlang.html (search for "Heisenbug")
> you should store the state in the external system
Disk works too, but if you're multi-node this means you now have a distributed database embedded in your system, which may or may not be your goal :)
RabbitMQ does this, they developed a library for "persistent, fault-tolerant and replicated state machines" based on Raft: https://github.com/rabbitmq/ra.
A couple of years ago the RabbitMQ team has published a raft library[1] which they use in their implementation of persistent queues. It has a flexible API and implementing your own state machines is quite straightforward, as it follows the OTP gen_* behaviour paradigm.
And by now, I'd say it's pretty well battle-tested.
Rust: https://github.com/pingcap/raft-rs LOC: 15417
Erlang: https://github.com/rabbitmq/ra LOC: 18012
Lines of code is not the only metric. I'm actually really curious about Erlang and Elixir but to be honest I do like type systems a lot. I also like the idea of idk...having one language for my os, db, front-end.