Part 8 of 11
Technology stack
Proven, open components chosen for unreliable links, spatial data and explainable AI. Nothing exotic, nothing that locks the operator in.
| Layer | Choice | Why |
|---|---|---|
| Positioning | Multi-band GNSS receiver with QZSS L1/L5/L6, MADOCA-PPP engine, QZNMA | Decimetre accuracy across Asia-Oceania with free corrections and authenticated signals |
| Tracker firmware | C on Zephyr RTOS | Fine-grained power management, secure over-the-air updates, mature GNSS and cellular drivers |
| Device messaging | MQTT 5 over TLS, EMQX broker | Built for intermittent links; acknowledged delivery pairs with store-and-forward |
| Backend services | Python 3.12, FastAPI | Same language as the AI models; asynchronous for thousands of connections |
| Event stream | Redis Streams, moving to Kafka at large fleet sizes | Ordered, replayable events so any service can recover without data loss |
| Database | PostgreSQL 16 with PostGIS and TimescaleDB | Spatial queries for geofences, compressed time-series storage for fixes |
| AI and analytics | scikit-learn, LightGBM, pandas | Isolation forest for anomalies, gradient boosting for return time; explainable and light, no GPUs needed |
| Maps | MapLibre GL with OpenSeaMap nautical layer and custom zone overlays | No per-view map fees; buoys and seamarks shown as on a chart |
| Staff app | Flutter for Android and iOS | One codebase, works through patchy beach connectivity with local caching |
| Control room dashboard | Flutter web, sharing components with the staff app | Consistent screens and faster delivery |
| Notifications | Firebase Cloud Messaging, WhatsApp Business Platform, Malaysian SMS gateway | Channels staff and owners already use |
| Infrastructure | Containers on Malaysia-region cloud, defined in Terraform | Data residency in Malaysia, reproducible environments |
| Observability | Prometheus, Grafana, Sentry | Tracker health, platform health and errors on one screen |
| Delivery | GitHub Actions with automated tests and staged releases | Changes reach the dock safely, one step at a time |
Design principles
Store first, process second
Every fix is written to durable storage before any rule runs. A crashed service replays from where it stopped.
Assume the link will drop
Trackers buffer, the app caches, alerts fall back from push to SMS. Nothing depends on perfect coverage.
Explain every alert
Each alert says why it fired, in words a dock attendant understands, with the track that triggered it.
Configure, don’t code
Zones, rules, thresholds, rota and retention are settings. A new beach is a configuration exercise.
No lock-in
Open standards throughout. The operator can export all of its data at any time in standard formats.
How it scales
A jet ski riding ten hours a day at 10-second reporting sends about 3,800 messages a day including dock heartbeats. That is light work for the platform; the same design handles one beach or a national operator.
Raw storage is shown before compression. TimescaleDB typically compresses position data several times over, and fixes older than 90 days are reduced to trip summaries.
| Fleet | Messages a day | Raw storage a month | Hosting |
|---|---|---|---|
| 20 units | 76,000 | 0.2 GB | Single small server |
| 100 units | 380,000 | 1.1 GB | Single server plus replica |
| 500 units | 1.9 million | 5.7 GB | Small cluster |
| 2,000 units | 7.6 million | 23 GB | Cluster with Kafka |