GlucoRAFT (Now a part of the official RAFT implementations list: https://raft.github.io) is a Python implementation of the RAFT algorithm for running servers that connect Type 1 Diabetes (T1D) patient records with their endocrinologists, providing real-time Continuous Glucose Monitoring (CGM) updates. This is simple usecase demonstration to implement Raft and NOT INTENDED FOR USAGE IN REAL LIFE. The project aims to simplify the implementation of RAFT's properties such as leader election, heartbeats, log updation, and replication, making it accessible for those interested in distributed systems and open-source contributions.
-
Clone the repository:
git clone https://github.com/your_username/GlucoRAFT.git
-
Navigate to the project directory:
cd GlucoRAFT/src/
-
Run servers in different terminal windows:
python3 server.py 0 servers.txt python3 server.py 1 servers.txt python3 server.py 2 servers.txt python3 server.py 3 servers.txt python3 server.py 4 servers.txt
-
Run the automated script to simulate CGM updates:
python3 random_cgm.py
-
Use
client.py
to submit GET or PUT requests:python3 client.py <ip> <key> python3 client.py <ip> <key> <value>
Contributions to GlucoRAFT are welcomed! Here are some ideas for contributions:
- Implement websockets to livestream data and visualize it in a dashboard using HTML and Flask.
- Extend
client.py
to support additional value fields such as percentage of hypo/hyper/in-range values, patient age, and other relevant patient information. - Propose and implement your own optimizations or improvements to the codebase.
This project is licensed under the MIT License - see the LICENSE file for details.