Skip to content

Cyber-Tracer/DFL_PeerBasedMixing

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

229 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI React Docker SphinxMix Scikit-learn Uvicorn

Peer Based Mixing for Decentralized Federated Learning

Peer-based decentralized federated learning (DFL) over a stateless mixnet, with full control via FastAPI and a React frontend.


Table of Contents


Features

  • Peer-based DFL simulation using Docker
  • Stateless mixnet communication based on
  • Federated learning over encrypted transport
  • FastAPI backend for node management
  • React frontend for UI control
  • Inline acknowledgments and message tracking

Main Technologies Used

  • FastAPI — Python async web framework for backend management
  • React.js — Frontend JavaScript library for building user interfaces
  • Docker — Containerization for node simulation
  • SphinxMix — Mixnet packet format used for anonymous routing
  • Scikit-learn — For machine learning models
  • Uvicorn — ASGI server used to run FastAPI apps

Quickstart

1. Clone the repository

git clone 
cd DFL_PeerBasedMixing

2. Build the Docker image for nodes

docker build -t dfl_node ./node

or for debugging purposes

docker build -t dfl_node ./node --progress=plain --no-cache

3. Install Python requirements

pip install -r requirements.txt

4. Start the FastAPI backend

uvicorn manager.app:app --host 0.0.0.0 --port 8000

Backend runs at http://localhost:8000.

5. Install Node.js and set up the React frontend

sudo apt install npm
npm install --prefix frontend

6. Start the React frontend

npm start --prefix frontend

Frontend runs at http://localhost:3000.


Project Structure

DFL_PeerBasedMixing/
├── node/        # Dockerized node logic
├── manager/     # FastAPI backend for node control
├── experiments/ # Jupyter Notebooks and figures
├── metrics/     # Automatically recorded time-series
└── frontend/    # React frontend interface

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 91.5%
  • Python 5.6%
  • JavaScript 2.0%
  • Other 0.9%