ThingIO¶
Plane: Data Plane
Purpose¶
IoT data processing, analytics, and dashboard API. ThingIO is the platform service that gives developers and operators the tools to query device telemetry, manage data processing pipelines, and register consumer applications — all scoped to the devices enrolled in their account.
ThingIO is built on Apache StreamPipes for pipeline execution. It provides account-scoped REST APIs that wrap StreamPipes with FlexGalaxy access control, and a Data API that consumer apps call to query telemetry and pipeline results.
Service Identity¶
Aspect |
Value |
|---|---|
Namespace |
|
Backend |
Python / FastAPI, PostgreSQL |
Frontend |
React SPA (Vite + Carbon Design) |
Port |
Backend: 8000, Frontend: 80 |
ECR |
|
Responsibilities¶
Provide REST APIs for scopes, telemetry queries, pipeline management, and consumer app registration
Manage three tiers of data processing pipelines (managed, app, platform)
Accept telemetry ingest from ThingsBoard and analytics results from StreamPipes via Integration API
Auto-provision managed pipelines when devices enroll
Sync scope membership when devices are enrolled/removed in TrustMint
How ThingIO Relates to Other Services¶
┌─────────────┐
│ Applications │
│ (WES, CJ) │
└──────┬──────┘
│ call ThingIO Data API
│ render own dashboards
▼
┌──────────────┐ ┌─────────────┐ ┌──────────────┐
│ TrustMint │───►│ ThingIO │◄───│ StreamPipes │
│ (device │ │ │ │ (pipeline │
│ enrollment) │ │ Data API │ │ execution) │
└──────────────┘ │ Pipeline API│ └──────────────┘
└──────┬──────┘
│ reads telemetry
▼
┌─────────────┐
│ ThingsBoard │
│ (via Kafka) │
└─────────────┘
TrustMint handles device enrollment → notifies ThingIO for scope sync and managed pipeline provisioning
ThingIO handles data processing APIs and telemetry queries
StreamPipes executes the actual pipelines; ThingIO wraps it with access control
Consumer apps (WES, ClearJanitor) call ThingIO APIs and render their own dashboards — ThingIO does NOT provide dashboard UI for business apps
API Architecture — Two Tiers¶
Management API (via KrakenD at /thingio/v1/*)¶
Exposed to consumer apps, the ThingIO frontend, and external developers.
Auth: OAuth2 JWT from Keycloak or X-Account-Id header (set by KrakenD).
Resource |
Endpoints |
Description |
|---|---|---|
Scopes |
|
Named device filters |
Things |
|
Devices within a scope (proxied from TrustMint) |
Telemetry |
|
Time-series queries with scope/key/time filters |
Pipelines |
|
Pipeline CRUD, templates, start/stop |
Pipeline Templates |
|
List available managed + configurable templates |
Consumer Apps |
|
App registration, permissions, ownership |
Integration API (ClusterIP only at /internal/v1/*)¶
Never exposed via KrakenD. Auth: internal service token.
Endpoint |
Consumer |
Purpose |
|---|---|---|
|
ThingsBoard, StreamPipes |
Batch telemetry ingest |
|
TrustMint |
Device enrollment changes → update scope counts |
|
TrustMint |
Auto-provision Tier 1 pipelines on enrollment |
Pipeline Tiers¶
Tier 1: Managed Pipelines (ThingIO provides)¶
Pre-defined, zero configuration. Exist the moment a device enrolls.
Template |
Description |
Input |
Output |
|---|---|---|---|
|
Battery trend, connectivity uptime, last-seen |
|
|
|
1min/5min/1hr rollups per device type |
|
|
|
Automatic anomaly scoring on numeric keys |
|
|
Tier 2: Configurable Pipelines (App self-service)¶
Consumer apps create from templates via POST /pipelines with parameters.
Template |
Required Params |
Description |
|---|---|---|
|
|
Alert when telemetry crosses threshold |
|
|
Alert on zone enter/leave |
|
|
Rolling average over time window |
Tier 3: Custom Pipelines (Operator-built)¶
Platform operators build in StreamPipes UI. ThingIO exposes results via the same query API. For complex analytics: ML inference, multi-source correlation, domain-specific pattern detection.
Uniform Consumption¶
All three tiers are queried through the same API. Consumer apps don’t care how a pipeline was created:
GET /thingio/v1/pipelines?tier=managed → Tier 1 results
GET /thingio/v1/pipelines?tier=app → Tier 2 results
GET /thingio/v1/pipelines?tier=platform → Tier 3 results
GET /thingio/v1/pipelines/{id} → Any tier by ID
Account Scoping¶
All ThingIO resources are scoped to the account that creates them.
Resource |
Scope |
Visibility |
|---|---|---|
Scope |
Account |
Only filters account’s devices |
Pipeline |
Account |
Only processes account’s telemetry |
Consumer App |
Account |
Registered per account |
Telemetry |
Account |
Only account’s device data |
Frontend (ThingIO UI)¶
ThingIO provides a platform-level control plane UI — not a business dashboard.
Accessed via Console gateway at /thingio/.
Navigation structure (AdminCenter pattern):
ThingIO
├── Scopes (header tab)
│ └── Things (within selected scope)
├── Telemetry (header tab)
├── Pipelines (header tab)
│ ├── Managed (sidebar, Tier 1)
│ ├── App (sidebar, Tier 2)
│ └── Platform (sidebar, Tier 3)
└── Consumer Apps (header tab)
Business apps (WES, ClearJanitor) build their own dashboards by calling ThingIO Data API. ThingIO UI is for platform operators to monitor scopes, pipelines, telemetry records, and consumer app registrations.
Consumer App Integration Pattern¶
Consumer apps call ThingIO APIs to get data and render their own widgets:
WES app
│
├── reads Tier 1 (managed)
│ GET /thingio/v1/things/{id}/telemetry
│
├── creates Tier 2 (configurable)
│ POST /thingio/v1/pipelines {template: "threshold_alert", ...}
│ GET /thingio/v1/pipelines/{id}
│
└── consumes Tier 3 (custom, operator-built)
GET /thingio/v1/pipelines/{id}
Implementation¶
Aspect |
Technology |
|---|---|
Backend |
Python 3.12, FastAPI, async SQLAlchemy + asyncpg |
Database |
PostgreSQL (in-cluster for dev, RDS for prod) |
Pipeline engine |
Apache StreamPipes (ThingIO delegates execution) |
Message bus |
Kafka (Strimzi) — telemetry ingest, analytics results |
Frontend |
React 18, Vite, IBM Carbon Design, |
Auth |
Keycloak JWT / X-Account-Id header |
Deployment¶
Component |
Namespace |
Replicas |
Image |
|---|---|---|---|
thingio-backend |
|
2 (HPA) |
|
thingio-frontend |
|
1-2 |
|
thingio-postgres |
|
1 |
|
Network Access (NetworkPolicy)¶
Source |
Access |
Purpose |
|---|---|---|
|
Port 8000 |
Management API via KrakenD |
|
Port 8000 |
Integration API (scope sync, pipeline provisioning) |
|
Port 8000 |
Integration API (telemetry ingest) |
|
Port 8000 |
Integration API (analytics results) |
|
Port 8000 |
Kafka consumer connections |
Kafka ACLs (thingio-consumer)¶
Topic Pattern |
Access |
Purpose |
|---|---|---|
|
Read |
Telemetry data |
|
Read |
StreamPipes analytics results |
|
Read |
Device enrollment events |
Dependencies¶
Service |
Relationship |
|---|---|
TrustMint |
Device registry, enrollment events, scope sync |
ThingsBoard |
Telemetry data source (via Kafka) |
StreamPipes |
Pipeline execution engine |
DotID |
Authenticates API calls, account scoping |
Kafka |
Event bus for telemetry and analytics |
Consumed By¶
Consumer |
Usage |
|---|---|
WES |
Fleet telemetry, order throughput, zone utilization (via API) |
ClearJanitor |
Cleaning coverage, robot status (via API) |
StarGate |
Admin views for platform-wide telemetry monitoring |
ThingIO UI |
Platform operator control plane |
Any consumer app |
Register, create scopes/pipelines, query telemetry |