Rebased onto Tokio & Renamed to `async-raft`
I am pleased to announce the release of async-raft
v0.5.0
.
As a special shout-out, I would like to highlight @Diggsey's contribution to this project. Their contribution by way of well crafted, and well written issues describing subtle implementation problems, and areas where the implementation at the time did not align exactly with the Raft spec, has been extremely helpful. @Diggsey thank you for taking the time to review the code and report issues! And thank you to the many other contributors opening issues, opening pull requests and discussing solutions: @Diggsey @GopherJ @raultang @iosmanthus @justinlatimer @kper @joshgev @ryanjackgit @ousado @lionesswardrobe @oronsh
Everything Is Now Based on Tokio
This release has been a great deal of effort, lots of early mornings and late nights. I am VERY pleased with the quality of the code and how things have come together. The Raft API couldn't be more simple, async/await
has absolutely simplified and clarified so many of the interfaces throughout this project, and the many excellent tools available through Tokio have greatly helped with code quality overall.
This project came to life in the futures01 days. Take a look at the diff in #59 for a taste of some of these extreme ergonomics improvements. Brings a tear to my eye.
Singular & Well Defined API
The previous versions of this project were based on the actix framework, and the API for many of the different components in the system were a bit ... roundabout. Now, we have a singular Raft
type which provides the API for a running Raft node.
The RaftStorage
& RaftNetwork
traits are still around, but now exist as more concise traits (async traits, using the async_trait
project).
Automatic Log Compaction
This project has always supported streaming snapshots from leaders to followers. However, they were generated only when a snapshot was needed due to a follower lagging behind or being new to the cluster overall. Now, all nodes will trigger automatic log compaction (per the Raft spec §7) based on a few configurable knobs. The log compaction and snapshotting systems overall have been greatly improved due to async/await in Rust & Tokio as well. Previously, this was certainly one of the most complex components in the system.
Joint Consensus Overhaul
There were a few inaccuracies in the previous implementation of Joint Consensus in this project, which is 100% percent my fault for trying to be fancy. This is one of there areas where @Diggsey's contribution and willingness to discuss really helped out. Joint Consensus, including the process of adding new nodes to the cluster as non-voters has been updated to exactly conform to the Raft spec.
Project Renamed to async-raft
Previously, this project was build directly around the Actix ecosystem. For various unfortunate reasons, that position no longer seemed like a safe bet for the future of this project. So now, everything is built directly around Tokio, with plans to adopt a runtime-agnostic API in the future.
The Future
Long-term, as mentioned above, I think it would be excellent to adopt a runtime-agnostic API for this project. Adding a few RaftStorage
and RaftNetwork
implementation libraries with extensions points for application specific control would be awesome, however I would definitely love to get some community feedback on this first, and we will need to jam on what the APIs will look like.
There are plenty of other goodies to related to this update. The Guide has been updated, the docs have been updated. All in all, I would encourage anyone and everyone interested in distributed systems & Rust to give this project an eye. Any and all feedback is welcome, open an issue or find me somewhere on the internet.