old-raft-rs icon indicating copy to clipboard operation
old-raft-rs copied to clipboard

capnp-nonblock is deprecated

Open Albibek opened this issue 7 years ago • 6 comments

Authors propose capnp_futures to be used instead

Albibek avatar Nov 04 '17 06:11 Albibek

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.

fabianfreyer avatar Nov 29 '17 13:11 fabianfreyer

Thanks for raising this, out of curiosity are you using this library for something?

Hoverbear avatar Nov 29 '17 18:11 Hoverbear

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 .

Albibek avatar Nov 29 '17 18:11 Albibek

Oh, I think I should've written this in #87.

Albibek avatar Nov 29 '17 18:11 Albibek

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!)

Hoverbear avatar Nov 29 '17 18:11 Hoverbear

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.

fabianfreyer avatar Nov 30 '17 01:11 fabianfreyer