old-raft-rs
old-raft-rs copied to clipboard
capnp-nonblock is deprecated
Authors propose capnp_futures to be used instead
It might actually be useful to use capnp-rpc
, which builds on top of capnp_futures
.
capnp-rpc
also abstracts away it's transport using the VatNetwork
trait, which might be useful for things like #92 and especially #87.
Thanks for raising this, out of curiosity are you using this library for something?
Yes, I wanted to use it inside my tokio-based project. After writing this issue I started do dive into code and found that that the connectivity between the network layer and consensus+log+state machine logic is pretty thin. So maybe it would be much more profit to separate these logic parts totally providing consensus implementation as pure-logic having entry point in form of enums for state changes on timeout or incoming packets. User then can process the enums on his will turning them into packets or anything else.
Here, I've shared what I came so far. The line points how the network-independent function could look like. https://github.com/Albibek/raft-experiment/blob/master/src/consensus.rs#L540 .
Oh, I think I should've written this in #87.
I was looking at how I might structure this to work with Tokio recently.
Anyways, this library is currently in what I'd consider a "code rot" state, and it largely hasn't been touched since pre-1.0. I don't have terribly much use for it myself. :( If you'd be interested in bringing some things up to date I'd be happy to accept those changes (and hopefully get inspired to make my own!)
I'm in early planning stages of a project for which I'd need a consensus protocol for, so I would have a use case for it too.