π‘π iot-trace-chain
Hybrid architecture combining IoT, blockchain, and big data for secure traceability of waste data.
---
π§ Overview
This project is part of a Master's Thesis and proposes a scalable architecture to ensure the traceability, integrity, and availability of data generated by IoT devices in waste management scenarios.
The solution combines:
β’
β’
β’
β’
---
π§± Architecture
1[IoT Device] --> MQTT --> Persistence Worker -->
2 [Delta Lake (MinIO)] + [Blockchain (Merkle Root)]
---
π Main Services (Docker Compose)
| Service | Description |
|----------------------|----------------------------------------------------|
| persistence-worker
| Processes, validates, and stores IoT data |
| minio
| S3-compatible storage backend for the Data Lake |
| hardhat-node
| Local blockchain node (Ethereum) |
| mosquitto
| MQTT broker receiving sensor messages |
| duckdb
| Optional tools for data exploration and querying |
---
π¦ Project Structure
1.
2βββ persistence-worker/ # Main worker code (Python, Spark)
3βββ blockchain/ # Smart contracts and Hardhat scripts
4βββ mosquitto/ # MQTT broker configuration
5βββ minio-mirror/ # Local copy for DuckDB querying
6βββ docker-compose.yaml # Service orchestration
7βββ README.md # This file -> Project documentation
---
π Technologies
β’
β’
β’
β’
β’
β’
β’
β’
---
βοΈ Quick Start
π§ Start environment:
1docker compose up --build
π¦ Run a manual service (e.g., MQTT Explorer):
1docker compose --profile manual up mqtt-explorer
π Run the worker manually:
1cd persistence-worker
2poetry install
3poetry run poe start-local
If you want to run the worker with time of function execution, you can use the following command:
1poetry run poe start-local-profiling
Additionally, if you want to send a test MQTT message, you can do so with the following command:
1poetry run poe publish-message
---
π Documentation
TODO
π License
This project is licensed under the MIT License and developed as part of the Master's in Business Intelligence and Big Data in Secure Environments (UBu, ULe, UVa) in Spain.
---
π¨βπ Author
Javier Alonso-NΓΊΓ±ez
LinkedIn β’ GitHub β’ ORCID