每个node是否按顺序编号?如果是的话,它需要先向某个节点询问一共有多少个节点,它是多少号,这可能会引起分歧?还是说node自己起id,然后进行hash
design/design.md
: illustrating psudocodeConfig.py
: saving the universal parameter for the systemhash_ring.py
: provide the hash consistant algorithmnetwork_layer.py
: define the 'Node' data structure, handling its behavioursdata_layer.py
: define the 'Data' data structure, handling its behavioursoperation.py
: list all the behaviour the node will be acting, act as state transition trigger in the state machinemain.py
: currently no 'main.py', it's now in 'operation.py' for convinience
- For the first node:
python operation.py start_root_node
- For other node:
python operation.py start_node ID IP PORT
- First start the client
python client.py
- check node_state:
node_table
- check data_state:
data_table
- store data:
store FILE_PATH
- download data: first
data_table
to know it's sequence, thendownload SEQUENCE