How abdelkaderbenhmida/industrial-data-space-for-predictive-maintenance works
This prototype lets factories generate local sensor telemetry, negotiate governed data exchange, and collaboratively train a predictive-maintenance model without pooling raw data; operators monitor the system through a dashboard. The principal workflow runs from per-factory simulation through local model training and Flower aggregation to persisted metrics and dashboard views. EDC contract and policy management is a distinct governance capability, while the FastAPI backend and Streamlit views form the monitoring layer. The README documents the overall service flow; some runtime wiring, especially between EDC and learning, is not established by the sampled source.
Main entry points: contract_negotiation.py Contract negotiation · main.py Dashboard API · simulator.py CSV simulator · server.py Flower aggregator
Components 18
Factory telemetry
- Sensor generator
iot-simulation/data_generator.py - CSV simulator
iot-simulation/simulator.py - MQTT publisher
iot-simulation/mqtt_publisher.py
Data governance
- Contract negotiation
data-space/contract_negotiation.py - Access policies
data-space/policy_manager.py - Exchange audit
data-space/exchange_logger.py - EDC connectors
data-space/edc-connector
Federated learning
- Factory FL client
federated-learning/client.py - Predictive model
federated-learning/model.py - Flower aggregator
federated-learning/server.py - Federated metrics
runtime/federated_metrics.json
Operations dashboard
- Dashboard API
dashboard/backend/main.py - API data models
dashboard/backend/models.py - Telemetry subscriber
dashboard/backend/telemetry.py - Streamlit dashboard
dashboard/app.py - Dashboard views
dashboard/components
Other components
- Factory operator
- MQTT broker
Connections 18
- Factory operator → CSV simulator: starts simulation
README.md - CSV simulator → Sensor generator: generates readings
iot-simulation/simulator.py - CSV simulator → MQTT publisher: publishes telemetry
README.md - MQTT publisher → MQTT broker: sends MQTT
README.md - MQTT broker → Telemetry subscriber: streams readings
README.md - Telemetry subscriber → Dashboard API: updates telemetry
dashboard/backend/main.py - Factory operator → Contract negotiation: negotiates access
- Contract negotiation → Access policies: checks policies
data-space/contract_negotiation.py - Contract negotiation → Exchange audit: logs exchanges
data-space/contract_negotiation.py - Contract negotiation → EDC connectors: governs exchange
- Factory FL client → Predictive model: trains locally
- Factory FL client → Flower aggregator: sends weights
README.md - Flower aggregator → Federated metrics: persists metrics
README.md - Flower aggregator → Factory FL client: returns global weights
- Dashboard API → API data models: uses schemas
dashboard/backend/main.py - Dashboard API → Federated metrics: reads metrics
README.md - Streamlit dashboard → Dashboard API: polls endpoints
README.md - Streamlit dashboard → Dashboard views: renders views
dashboard/components/__init__.py