Coder Social home page Coder Social logo

simonacca / zatt Goto Github PK

View Code? Open in Web Editor NEW
153.0 10.0 44.0 167 KB

Python implementation of the Raft algorithm for distributed consensus

License: GNU Affero General Public License v3.0

Python 99.31% Shell 0.39% Dockerfile 0.30%
raft distributed-systems consensus dictionaries

zatt's People

Contributors

simonacca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zatt's Issues

unrecognized arguments: --id

the master branch does not contain the --id argument:

zattd -c zatt.conf --id 0 -s zatt.0.persist --debug
zattd: error: unrecognized arguments: --id 0

however the feature/pickle seems to work. maybe you can upmerge to master?

zattd command does not take --id flag as input!

Hello there! I'm trying to use Zatt for a project and noticed that when running
zattd -c zatt.conf --id 0 -s zatt.0.persist --debug
zattd throws an error that --id is an unrecognized argument. Turns out, "--id" is not even a flag recognized in server/config.py.

I'm currently looking into workarounds. One that didn't work was providing a node (from zatt.conf) IP addr and port in the --address and --port directories. I got the following error stacktrace for command zattd -c zatt.conf --address "127.0.0.1" --port 5254 -s zatt.persist --debug:

  File "/usr/local/bin/zattd", line 11, in <module>
    load_entry_point('Zatt==1.0', 'console_scripts', 'zattd')()
  File "/usr/local/lib/python3.6/site-packages/Zatt-1.0-py3.6.egg/zatt/server/main.py", line 31, in run
  File "/usr/local/lib/python3.6/site-packages/Zatt-1.0-py3.6.egg/zatt/server/main.py", line 10, in setup
  File "/usr/local/lib/python3.6/site-packages/Zatt-1.0-py3.6.egg/zatt/server/config.py", line 40, in __init__
  File "/usr/local/lib/python3.6/site-packages/Zatt-1.0-py3.6.egg/zatt/server/config.py", line 72, in _get
  File "/usr/local/lib/python3.6/site-packages/Zatt-1.0-py3.6.egg/zatt/server/config.py", line 72, in <setcomp>
ValueError: not enough values to unpack (expected 2, got 1) 

I'm going to look at the config.py file and see if there are any changes that could remedy this usage error. Wanted to give you a heads up in case you know anything about the problem.

Resetting timeout unconditionally on AppendEntries request

Hi!

I've been reading some of zatt's code as I implement a toy in-memory key-value store with raft. Thank you for writing very readable code -- this has been a very helpful resource!

I notice that in zatt/server/states.py, you reset the election timer when the node is in a follower state before checking if the leader was up-to-date. This probably doesn't make much of a difference in practice, but wouldn't it be better to wait to reset the timer until we know that the leader was up-to-date? That way, if it isn't (i.e. the node has a more up-to-date term than the current leader) the node doesn't postpone starting an election.

It looks to me that this is how it is handled in Ongaro's pseudocode,

screen shot 2018-06-17 at 5 01 14 pm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.