Skip to content

GlucoRAFT uses the RAFT algorithm to run servers for interactions between the CGM users and a analytics application that displays statistics to the user about their blood glucose values that streams live to the application.

License

Notifications You must be signed in to change notification settings

nicehoplite/GlucoRAFT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GlucoRAFT

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.

System Design

Getting Started

  1. Clone the repository:

    git clone https://github.com/your_username/GlucoRAFT.git
  2. Navigate to the project directory:

    cd GlucoRAFT/src/
  3. 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
  4. Run the automated script to simulate CGM updates:

    python3 random_cgm.py
  5. Use client.py to submit GET or PUT requests:

    python3 client.py <ip> <key>
    python3 client.py <ip> <key> <value>

Live Output

Contributing

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.

References

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

GlucoRAFT uses the RAFT algorithm to run servers for interactions between the CGM users and a analytics application that displays statistics to the user about their blood glucose values that streams live to the application.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages