How varun2871/network-congestion-system works
This repository is a live network congestion prediction and adaptive traffic-management system. Its main workflow collects network and Wi-Fi telemetry, derives features, predicts congestion, applies safety validation and a traffic policy, then measures the network again for feedback. A Flask dashboard exposes live metrics, controller state, events, and reports. Controlled iPerf3 experiments and before/after comparisons are a separate capability. The README documents the overall loop; sampled source confirms key file flows. Some controller internals and experiment wiring were not sampled, so those links are documented or left unasserted.
Main entry points: closed_loop_controller.py Closed-loop controller · app.py Dashboard API · collector.py Telemetry collector · live_network_metrics.csv Network metrics
Components 21
Telemetry and features
- Telemetry collector
monitoring/collector.py - Wi-Fi monitor
monitoring/wifi_monitor.py - Network metrics
data/live_network_metrics.csv - Feature engineering
prediction/feature_engine.py - Live features
data/live_features.csv
Prediction and control
- Closed-loop controller
prediction/closed_loop_controller.py - ML prediction
prediction/closed_loop_controller.py - Safety validation
prediction/closed_loop_controller.py - Adaptive policy
prediction/closed_loop_controller.py - Traffic control
traffic_management/traffic_manager.py - Controller state
data/controller_state.json - Controller events
data/controller_events.jsonl
Dashboard
- Dashboard API
dashboard/app.py - Dashboard UI
dashboard/templates/dashboard.html
Experiments and evaluation
- iPerf3 tests
experiments/run-wsl-experiments.py - Experiment results
data/controlled_experiments.csv - Result comparison
experiments/compare_results.py - Before/after results
data/before_after_comparison.csv
Other components
- Live network
- Linux traffic control
- Operator
Connections 23
- Live network → Telemetry collector: measures
README.md - Telemetry collector → Wi-Fi monitor: queries
monitoring/collector.py - Telemetry collector → Network metrics: writes telemetry
monitoring/collector.py - Network metrics → Feature engineering: provides measurements
prediction/feature_engine.py - Feature engineering → Live features: writes features
prediction/feature_engine.py - Closed-loop controller → Live features: reads features
- Closed-loop controller → ML prediction: runs model
README.md - ML prediction → Safety validation: validates prediction
README.md - Safety validation → Adaptive policy: selects state
README.md - Closed-loop controller → Traffic control: applies policy
- Traffic control → Linux traffic control: configures classes
traffic_management/traffic_manager.py - Linux traffic control → Live network: shapes traffic
README.md - Closed-loop controller → Controller state: records state
- Closed-loop controller → Controller events: records events
- Operator → Dashboard UI: views
README.md - Dashboard UI → Dashboard API: requests dashboard data
- Dashboard API → Network metrics: reads telemetry
dashboard/app.py - Dashboard API → Controller state: reads controller state
dashboard/app.py - Dashboard API → Controller events: reads events
dashboard/app.py - Live network → iPerf3 tests: generates test traffic
- iPerf3 tests → Experiment results: writes results
experiments/run-wsl-experiments.py - Experiment results → Result comparison: supplies measurements
- Result comparison → Before/after results: writes comparison
experiments/compare_results.py