Commit Graph

4 Commits

Author SHA1 Message Date
Anthony Dodd 05af50e005
Overhaul the election timeout system.
This uses an interval job instead of juggling a rescheduling processes.
Seems to offer quite a lot more stability. Along with the interval job,
we are using std::time::Instants for performing the comparisons against
the last received heartbeat.

Closes #26
2019-10-03 09:47:47 -05:00
Anthony Dodd b06888eed2
Added the guide mdbook. 2019-08-23 17:33:48 -05:00
Anthony Dodd 3325f6c471 Very large scale refactor based on experience so far.
Very large overhaul to streamline API and interfaces.

Removed protobuf in favor of standard Rust types with serde. Protobuf
and any other serialization types can be added as extensions or very
easily implemented by users of the crate. Serde allows for broad
serialization options as well.

Finally found a solid pattern for being able to remove the need for
allocating application specific errors from the RaftStorage layer. These
are now expressed as generic constraints. Using PhantomData for the
various types to keep track of the type parameter where it is otherwise
not being used.

All of the logic of the Raft system has been cleanly separated into
submodules for more easier reasoning about the system. Previous
implementation of the system overall algorithm has been reinstated.
2019-07-13 23:19:47 -05:00
Anthony Dodd 9593a3f248 Initial commit. 2019-06-12 16:50:48 -05:00