NTUA Distributed Systems Course 2020-2021
Referenced ShaeBrown chord-flask repo for some initial ideas
pip3 install -r requirements.txt
Must start a bootstrap node (done with argument -m True)
python3 startserver -m True
For startserver arguments
python3 startserver --help
Start as many other nodes (only 1 boostrap) with different ports,or host:ports addresses. Nodes join automaticaly to boostrap node ,must change first hardcoded host:port address of bootstrap node (master_addr variable) in dht_client.py.
For CLI commands run:
python3 cli_dht.py --help
And choose action desired (address of bootstrap node must be changed manualy)
For Frontend commands first run:
python3 front_public2local.py
Change port to desired (or if working in VM's give public ip )
In "client" machine run:
python3 front.py
Change host:port to desired (default localhost:5000)
Back-End
dht_node.py --> Implementation of basic DHT node
dht_master.py--> Boostrap node only endpoints,functions and operations
dht_client.py--> Client node only endpoints,functions and operations
cmn_endpoints--> Common endpoints and operations for both client and boostrap
myglobal.py--> "Hacky" solution for passing global variables between cmn_endpoints.py and dht_client.py or dht_master.py
startserver.py--> Helper function for starting a new node
cli_dht.py--> CLI implementation for actions on our Chord
front_public2local.py--> Front-end intermediate "server" for accepting requests from client and forwarding to the Chord
For the scripts bellow (and for above but have been explained ) caution must be taken about the boostrap address to run properly
exper_1.py,exper_2.py,exper_3.py--> Implementation of 3 experiments asked in exercise
compare.py --> Helper function for comparing true results of experiments with our results
insert_data.py,show_data.py --> Scripts for inserting and showing some dummy data
Frontend
/templates--> HTML files
forms.py --> Forms for insert,delete etc. actions
front.py --> Fron-end "server" for starting a client side browser frontend