Skip to content

beatricebalzarini/TCMS

Repository files navigation

IIoT-TCMS: Distributed Railway Data Collection and Visualization System 🚄

Kubernetes MQTT MongoDB Node-RED License Status


Developed in collaboration with Michael-Bernasconi

🧭 Overview

IIoT-TCMS is a distributed Industrial Internet of Things (IIoT) system designed for the railway domain.
It enables the collection, processing, and visualization of diagnostic data coming from train subsystems.
The architecture combines real-time monitoring through MQTT topics with historical visualization based on MongoDB records.
All services run in a Kubernetes cluster, ensuring modularity, scalability, and secure communication through Secrets and Network Policies.


⚙️ Features

  • Modular microservices architecture:

    • data-extractor → reads and filters CSV-based diagnostic data, defines MQTT topics, and publishes structured JSON messages.
    • data-processor → subscribes to MQTT topics, processes messages, and stores them in MongoDB.
    • data-visualization → dashboard combining real-time MQTT data and historical MongoDB data.
  • Secure and role-based access:

    • MongoDB
      • data-processor: writer role
      • data-visualization: reader role
    • Node-RED
      • admin: full privileges (edit, deploy, view)
      • viewer: read-only dashboard access
  • MQTT (Mosquitto) broker for lightweight, low-latency communication

  • Kubernetes features:

    • Secrets for credentials
    • Network Policies for service isolation
    • Modular manifests for each microservice

🧩 System Architecture

Below is the high-level system architecture showing data flow between services.

System Architecture

The diagram below also highlights the main Kubernetes resources associated with each microservice.

Kubernetes Resources


📊 Performance Metrics

System performance was evaluated under realistic message throughput conditions.
Key metrics such as CPU, RAM, latency, and throughput are visualized below.

Metric Description
CPU usage Average load across microservices
RAM usage Memory consumption in steady state
Latency Mean message delay (≈2 ms, stable)
Throughput 16–22 msg/min observed

Performance Charts

CPU usage chart

RAM usage chart

Latency chart

Throughput chart


🧠 Example Usage

A railway operator can use the Data Visualization Dashboard to:

  • Monitor real-time train subsystem data via MQTT streams
  • Explore historical trends from MongoDB queries
  • Diagnose anomalies or system degradation over time

All internal services (data-extractor and data-processor) operate transparently, while the user interacts only with the visualization interface.

Real-time data - Last incoming message

Real-time data - Recent Activity

Real-time data - System Overview

Historical data - Messages over time

Historical data - Messages per system

Historical data - Messages per location

Interactive query


🤝 Contributing

  1. Fork the repository
  2. Create a new branch → git checkout -b feature-name
  3. Commit your changes → git commit -m "Add feature"
  4. Open a Pull Request

📜 License

MIT License © 2025


💡 Developed as part of a Bachelor’s thesis project in Computer Science, focusing on distributed IIoT systems for the railway domain.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors