Cross-Platform Desktop Application for Industrial IoT Monitoring
How I built a high-performance C++/Qt monitoring application for an industrial IoT company, running on Windows and Linux.
The Challenge
An industrial IoT company needed a desktop application for their field technicians and operations managers to monitor sensor networks deployed across manufacturing facilities. The existing solution was a web-based dashboard that suffered from:
- High latency: 5-10 second refresh intervals made real-time monitoring impractical
- Limited offline capability: Field technicians often worked in areas with unreliable connectivity
- Resource constraints: Running a browser alongside their other tools consumed excessive memory on the rugged laptops used in the field
- No local data caching: Historical trend analysis required constant server connectivity
The application needed to run on both Windows 10/11 (office staff) and Ubuntu Linux (field technician laptops), handle real-time data streams from up to 500 sensors simultaneously, and work reliably with intermittent connectivity.
My Approach
Phase 1: Requirements & Architecture
I spent the first week defining the technical scope:
- Data protocol: MQTT over WebSocket for real-time sensor data, REST API for historical queries and configuration
- Target performance: <100ms UI response time, <1 second data-to-display latency, 60fps chart rendering
- Offline requirements: 72-hour local data buffer with automatic sync when connectivity resumes
- Platform targets: Windows 10+ (64-bit), Ubuntu 22.04+ (64-bit)
- Deployment: MSI installer for Windows, AppImage for Linux, automatic update mechanism
Architecture decisions:
- Qt 6.7 with C++20: Native performance, cross-platform UI, excellent charting capabilities via Qt Charts
- SQLite: Local data cache with WAL mode for concurrent read/write
- MQTT (Eclipse Paho C++): Lightweight pub/sub for real-time sensor feeds
- CMake: Cross-platform build system with CI/CD on GitHub Actions
Phase 2: Iterative Development
Development followed a modular approach with bi-weekly milestone demos:
Milestone 1: Core framework (Week 2-3)
- Application scaffold with Qt 6, CMake build system
- Cross-platform CI/CD pipeline (Windows MSVC, Linux GCC)
- MQTT connection manager with auto-reconnect and TLS
- Local SQLite data store with schema migrations
Milestone 2: Real-time dashboard (Week 4-5)
- Sensor grid view rendering up to 500 sensors with status indicators
- Real-time line charts using Qt Charts with 60fps rendering
- Configurable alert thresholds with visual and audio notifications
- Data filtering and grouping by facility, zone, and sensor type
Milestone 3: Offline & sync (Week 6-7)
- 72-hour circular buffer in SQLite with configurable retention
- Background sync engine with conflict resolution
- Connection status indicator with queued-message counter
- Data export to CSV for offline reporting
Milestone 4: Polish & platform integration (Week 8-9)
- Windows: MSI installer via WiX, system tray integration, Windows notification center
- Linux: AppImage packaging, desktop file integration, libnotify support
- Auto-update system checking for new versions on startup
- Accessibility: keyboard navigation, high-contrast mode, screen reader support
Phase 3: Testing & Quality Assurance
- Unit tests: 340 tests covering data parsing, sync logic, and alert evaluation (92% code coverage)
- Integration tests: MQTT broker simulation with configurable message rates and patterns
- Performance benchmarks: Validated <100ms UI responsiveness with 500 concurrent sensor streams on target hardware
- Memory profiling: Verified stable memory usage over 72-hour continuous operation (AddressSanitizer, Valgrind)
- Platform testing: Validated on Windows 10, Windows 11, Ubuntu 22.04, and Ubuntu 24.04
Phase 4: Delivery & Support
- Documentation: API integration guide, user manual, build instructions, and architecture decision records
- Source code: Full repository with clean Git history, CI/CD configuration, and README
- Training session: 90-minute walkthrough with the client’s development team
- Bug-fix support: 60-day post-delivery support period
Results
| Metric | Web Dashboard | Desktop Application |
|---|---|---|
| Data-to-display latency | 5-10 seconds | <500ms |
| Offline support | None | 72-hour buffer |
| Memory usage | ~1.2 GB (browser) | ~180 MB |
| Startup time | 8+ seconds | <2 seconds |
| CPU usage (idle monitoring) | 15-25% | 2-4% |
The application has been deployed to 45+ field technicians and 12 operations managers, operating 24/7 across 8 manufacturing facilities.
“The difference in responsiveness compared to the web dashboard is night and day. Our technicians can actually use this in real time on the factory floor.” CTO (paraphrased, anonymized)
Technologies
C++20 Qt 6.7 CMake MQTT SQLite GitHub Actions WiX AppImage Valgrind AddressSanitizer
Ready to Get Started?
Have a similar challenge? Let's discuss how I can help.