Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hjwp/raft
Raft consensus algorithm toy project
https://github.com/hjwp/raft
Last synced: about 2 months ago
JSON representation
Raft consensus algorithm toy project
- Host: GitHub
- URL: https://github.com/hjwp/raft
- Owner: hjwp
- Created: 2020-08-10T11:29:14.000Z (about 4 years ago)
- Default Branch: hjwp
- Last Pushed: 2020-08-10T11:31:29.000Z (about 4 years ago)
- Last Synced: 2024-06-18T08:32:08.955Z (3 months ago)
- Language: Python
- Size: 5 MB
- Stars: 9
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rafting Trip - August 3-7, 2020
This was my code from David Beazley's amazing [Rafting
Trip](https://dabeaz.com/raft.html) training course,
where we tried to implement the
[raft distributed consensus algorithm](https://raft.github.io/)
in a week.I didn't finish, but I got fairly far. Code here for my archive.
* [x] transaction log class with accept/reject logic for append requests
* [x] vaguely ports & adapters architecture, with raft protocol classes as core domain
* [x] optional persistent log storage adapter
* [x] log replication leader -> follower, with backtracking algorithm
* [x] heartbeats + time events
* [x] elections, including timeouts, conversion to candidate, voting, promotion to leader
* [x] `RaftNet` abstraction for transport, with fake version for tests
* [x] `run_server()` and `clock_tick()` abstractions for running the algo over time
* [x] ability to unit test / simulate interaction of multiple nodes in-memory
* [x] end-to-end and integration tests
* [ ] client interactions `<--` this is the big missing piece, which might
have caused me to rethink the architecture. may require some intermediary
piece in between Server objects / `run_server()` and clients.
* [ ] cluster membership changes