Offline-first Runtime
A Gateway must not become unusable just because the cloud connection is temporarily unavailable.
What should continue
When valid local cache/configuration exists:
- manufacturer control logic
- native bus polling
- Driver execution
- local UI/control
- Child communication
- cached Analyzer execution
- supported Local APIs
What must not happen
- reboot loop because MQTT failed
- erase valid credentials
- erase Child association cache merely because cloud is offline
- replay an unbounded history of old commands
- block the native bus while waiting for cloud
Boot
load local configuration/cache
→ initialize Driver/Bus
→ localRuntimeReady
→ start MQTT/HTTP connection asynchronously
→ sync newer server state when available
localRuntimeReady is independent from mqttConnected.
Reconnect
Reconnect restores subscriptions, synchronizes current state/revisions, and avoids blind historical command replay.