Raft implementation for Crystal-Lang
-
Add the dependency to your
shard.yml
:dependencies: raft: github: your-github-user/raft
-
Run
shards install
require "raft"
This shard implements the specification laid out in the raft paper written by Diego Ongaro and John Ousterhout.
+0xAE
Append Entries RPC-0xAE
Append Entries Result+0xF9
Request Vote-0xF9
Request Vote Result
Name | Size |
---|---|
Version | 24 Bits |
Type Indicator | 16 Bits |
Term | 32 Bits |
Candidate ID | 32 Bits |
Last log index | 32 Bits |
Last log term | 32 Bits |
Name | Size |
---|---|
Version | 24 Bits |
Type indicator | 16 Bits |
Term | 32 Bits |
Leader ID | 32 Bits |
Leader Commit | 32 Bits |
Previous Log Index | 32 Bits |
Previous Log Term | 32 Bits |
Size | 8 Bits |
Entries | 0+ Bits |
Name | Size |
---|---|
Version | 24 Bits |
Type Indicator | 32 Bits |
Term | 32 Bits |
Vote Granted | 8 Bits |
Name | Size |
---|---|
Version | 24 Bits |
Type Indicator | 32 Bits |
Term | 32 Bits |
Success | 8 Bits |
- Fork it (https://github.com/your-github-user/raft/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
- Carl Frederick - creator and maintainer