https://github.com/richardknop/paxos
Golang implentation of paxos consensus algorithm
https://github.com/richardknop/paxos
go golang paxos
Last synced: over 1 year ago
JSON representation
Golang implentation of paxos consensus algorithm
- Host: GitHub
- URL: https://github.com/richardknop/paxos
- Owner: RichardKnop
- License: mpl-2.0
- Created: 2016-08-20T07:00:40.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-07-05T11:12:30.000Z (almost 7 years ago)
- Last Synced: 2025-03-17T21:42:21.057Z (over 1 year ago)
- Topics: go, golang, paxos
- Language: Go
- Size: 132 KB
- Stars: 50
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## paxos
Golang implentation of [Paxos](https://pdos.csail.mit.edu/6.824/papers/paxos-simple.pdf) consensus algorithm.
[](https://travis-ci.org/RichardKnop/paxos)
---
* [First Steps](#first-steps)
### First Steps
This project is still under development. I have tried to keep the algorithm implementation completely decoupled so you can just import from `github.com/RichardKnop/paxos/paxos` and extend `Acceptor`, `Proposer` and `Learner` structs.
In order to provide method of communication best suited for you, implement the `AcceptorClientInterface` interface which is then used by proposers to send request to acceptors.
The communicaton / networking between agents is something which is not relevant for the algorithm. I have written a simple RPC agent system for testing purposes though.
Run multiple test agents in different tabs to test the algorithm:
```
go run cmd/main.go run --port 1234 --peers 127.0.0.1:2345
go run cmd/main.go run --port 2345 --peers 127.0.0.1:1234
```