Project: Holofan Controller (ver 3.1.0)
Tech Stack:
NestJSThingsBoard RPCPostgreSQLTypeScript
- Redesigned and refactored MySQL ERD to eliminate redundancy and enforce Primary/Foreign key constraints.
- Refactored NestJS backend to align with the new database schema, optimizing complex SQL queries and joins.
- Standardized RESTful APIs following strict conventions (HTTP methods, snake_case parameters).
- Re-engineered device control workflows (start/stop/next/prev/play) using ThingsBoard RPC APIs instead of polling attribute loops. Reduced API latency from 3–4s to ~0.5s.
System Architecture & Key Optimization Highlight:
- Push vs. Pull Mechanism: Replaced legacy HTTP polling (which continuously queried status from DB/ThingsBoard) with event-driven ThingsBoard RPC & MQTT streams, eliminating redundant network round-trips and DB overhead.