This repository contains code that is based on the RAFT Algorithm for a Primary-Backup System. We have provided a way to interact with the system via terminal or using a Flask app. Please see the instructions below to run the system:
- Clone this repository locally using
git clone https://github.com/joudelshawa/RAFT_implementation_CS4459.git - In your local location, run
pip install -r requirements.txt - Ensure redis is on using
redis-server - Then run
python server_manager.pyand play around with the system! You can add servers usingstart server 1, where 1 can be replaced with any positive integer, remove servers usingstop server 1orstop all, and input (write) data usinginput key value, where key and value can be any strings.
Do NOT force shut down the Flask App before killing all active servers!
- Clone this repository locally using
git clone https://github.com/joudelshawa/RAFT_implementation_CS4459.git - In your local location, run
pip install -r requirements.txt - Ensure redis is on using
redis-server - Run
cd flask - Run
python app.pyand open the corresponding localhost link (e.g.,http://127.0.0.1:5000) and start playing around with the system! You can add servers using theadd serverbutton, which will automatically add new servers without needing server IDs (they will monotonically increase), remove servers using thekill serverbutton on each server card, and input (write) data using theinputbar by providingkey valueand pressing enter, where key and value can be any strings.
Happy logging!
Authors:
- Joud El-Shawa
- Samuel Catania
- Meg Zhang
- Ian Prentice