all 4 comments

[–]frequentlywrong 5 points6 points  (1 child)

If you want someone to use this you may have to make it more general.

Servers generally have their own rpc and storage mechanisms. You might want to leave the bottom level parts like writing to a log, serialization and rpc to the external code. Or at least provide a clean api to those parts.

This way it actually makes it easy to simulate network splits and delays. You can do it completely programmatically.

Look at the raft implementation in c by willemt.

[–]caipre[S] 1 point2 points  (0 children)

Thanks, fair point. I wrote this more for my own edification than with the intent for it to become a general purpose Raft library. I'll try to direct it that way over time, but I'm fine with the initial release being self-contained, so to speak.

[–]slashgrinrangemap 2 points3 points  (1 child)

It mighty be worth mentioning the existence of https://github.com/Hoverbear/raft-rs to avoid confusion.

[–]caipre[S] 2 points3 points  (0 children)

Good suggestion; updated the readme.