Putting It All Together
Integrate all components into the complete transit monitoring application
This final module brings all the components together into a complete transit monitoring application with a live console dashboard.
The Application Architecture
Review the complete architecture of the transit monitoring system:
This architecture demonstrates several design principles:
Component Separation: Each class has a focused responsibility
Clean Integration: Components interact through well-defined interfaces
Central Coordination: The main application orchestrates all components
Configuration Management: External configuration keeps credentials secure
Resource Lifecycle: Components are properly started and stopped
The Monitoring Process Workflow
The monitoring system follows a specific workflow to detect potential service disruptions:
This workflow shows how the monitoring service runs queries at specified intervals, each targeting a specific disruption condition. Detected issues generate alerts that are stored and tracked. The dashboard regularly updates with the latest statistics.
Exploring the Main Application
Open the TransitMonitorApp class:
The class defines key components and configuration:
The constructor initializes all services:
This loads and validates configuration, creates service instances, sets up a dashboard scheduler, and configures the monitoring service to suppress individual alert messages (the dashboard displays aggregate counts instead).
Starting and Stopping the Application
The start() method initializes and starts all services:
The stop() method performs an orderly shutdown:
The shutdown sequence stops the dashboard, monitoring service, and ingestion service in order, then closes the database connection.
The Dashboard System
The startDashboard() method sets up periodic console updates:
The dashboard has three views that rotate automatically:
The three views are:
Summary View: Active vehicles by route, status distribution, and ingestion statistics
Alerts View: Service alerts and alert statistics
Details View: System-wide statistics, monitoring thresholds, and connection status
The summary view implementation:
The Main Method
The main() method ties everything together:
Running the Complete Application
Run the transit monitoring application:
When the application starts, you see a welcome banner, status messages as each component initializes, the dashboard updating every few seconds, and a prompt to press Enter to exit.
The dashboard output:
What You Built
This tutorial built a complete transit monitoring system using Apache Ignite 3:
Real-time data acquisition from GTFS-realtime feeds
Distributed storage with schema annotations and batch transactions
SQL-based monitoring for detecting service disruptions
Live dashboard with rotating views and system metrics
Full lifecycle management of all application components
The architecture patterns demonstrated here apply to many domains beyond transit monitoring, including IoT systems, financial transaction monitoring, logistics tracking, and real-time analytics.
Further Learning
This page is: Copyright © 2026 MariaDB. All rights reserved.
Last updated
Was this helpful?

