playing with grpc and protobuffers + picking apart http://efficient.github.io/epaxos/ instead of integer keys and values it uses strings as keys/values networking with grpc/google protocol buffers
it basically works, still trying to figure out some aspects of epaxos.
the algorithm is exaclty the same as the original (i hope, not established yet) , just refactored a little and changed the whole networking layer it probably runs slower than the code from the research paper and probably has more bugs but it's a start
project created with go1.5.1
- go get
- cd epx-replica
- go install
- cd ..
- cd epx-client
- go install
- cd ..
- ./start.sh
- ctrl Z
- bg
- epx-client (again assumes $GOPATH/bin is on your PATH)
- next you can track what's happening in logclient.log, logreplica_0...x.log the code is still loaded with logging statements -> wip
the start script assumes your $GOPATH/bin is on PATH
WAIT 10 secs (you can track with tail -f on one of the replica logs) before you start the epx-client the replicas take 10 secs to organize the optimal paths they will use to contact each other for the first round ( they update themselves while they are running but if you do not have the paths set on the first run you might see some strange results, i haven't rigged the client yet to trigger multiple rounds)
##Todo
enable command execution
- add local recovery persistence
- add goleveldb as first Store implementation
- further testing and verify i didn't break anything regarding correctness
- fill in some Todo's, less likely (or optimal regarding the algorithm) paths in the code still need some work
- write more tests to run and verify performance/correctness
- optimize
- add listener/ watcher system to monitor key changes
playground
- Fork it!
- 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
- Submit a pull request :D
source : https://github.com/efficient/epaxos
see source