To Learn more visit this link.
Please Make Sure mongoDB is installed and working correctly.
Clone the Github Repository.
Install Virtualenv
$ pip3 install virtualenv
Find your Python3 Path
import sys
print(sys.executable)
Example Output
/usr/bin/python3
Run setup.sh with first argument as path to repository and second argument as python3 path Example Command:
$ ./setup.sh /home/user/CRDT-DisCS /usr/bin/python3
The setup.sh script will create envCRDT-DisCS environment inside Project Directory and install all the requirements. ( For UNIX based systems only )
Activate the virtual environment by command
$ source <path to repo>/envCRDT-DisCS/bin/activate
Change Directory to /scarf
$ cd <path to repo>/scarf
Initialize Database & Update Migrations
$ python initialize_database.py
This Initilizes databases with random data, all databases have different data, can be viewed using website interface
$ cd python <path to repo>/scarf/crdt/server/run_crdt_servers.py
This step clears the databases and after the flasks servers are started now the consensus will be achieved for the updates, called with functions from /scarf/discs/updateDatabases.py
Note: Currently CRDT_UPDATE is marked as true, make it false to stop using CRDTs for consensus. RAFT_UPDATE variable will we used in future to achive consensus using RAFT, paxos based protocol
Note: CRDT Server Nodes should be started & running in a separate terminal beforehand.
$ cd python <path to repo>/scarf/terminal/interface.py
Currently under development, you can see proof of work by running the following files as :
$ python <path to repo>/Vesper/run_multiple_servers.py
Then in separate terminal -
$ python <path to repo>/Vesper/raft2DB.py
Start the django server in development mode via command
$ python <path to repo>/scarf/manage.py runserver
Visit http://localhost:8000/ in your browser to see the web interface.
Deactivate the virtual environment by command
$ deactivate