GitHub user PDGGK created a discussion: GSOC-304: ThingsBoard IoTDB 2.x Table Model Integration — Design and PoC
Hi, I've been working on a design for GSOC-304 and wanted to share my progress publicly. ## Design The integration uses two tables in the IoTDB 2.x Table Model: - A `telemetry` table (4 TAGs: tenant_id, entity_type, entity_id, key + 5 typed FIELD columns) - An `entity_attributes` table (adding scope TAG for client/shared/server attributes) This maps directly to ThingsBoard's `TimeseriesDao`, `TimeseriesLatestDao`, and `AttributesDao` interfaces. ## PoC Working proof of concept validated against IoTDB 2.0.5: **https://github.com/PDGGK/thingsboard-iotdb-table-poc** The PoC runs 12 verified steps with assertions covering: - Multi-type Tablet writes (bool, long, double, string, JSON) - Same-timestamp type-change detection + delete-then-insert fix - SQL range queries, latest-value (`ORDER BY time DESC LIMIT 1`), and findAllLatest (N-parallel queries) - Aggregation with `date_bin()` + `COALESCE` mixed-type promotion - TTL-based retention via `ALTER TABLE SET PROPERTIES` - Entity attributes table with scope-based filtering All steps include assertions that verify expected behavior. ## Prior contributions - Merged: [#17212](https://github.com/apache/iotdb/pull/17212) (Process resource leak fix) - Open: [#17180](https://github.com/apache/iotdb/pull/17180) (GROUP BY inclusive end time) - 14 merged PRs total across 6 open-source projects I've discussed the schema design with the mentor and incorporated feedback on the single-table vs per-entity-table tradeoff. I also opened a cross-community discussion with the ThingsBoard project: https://github.com/thingsboard/thingsboard/discussions/15296 Happy to discuss the design with anyone interested. Zihan Dai GitHub: @PDGGK GitHub link: https://github.com/apache/iotdb/discussions/17352 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
