Make the registry the source of truth
Every other feature depends on knowing what a device is and how to reach it. When identity is inferred from whichever connection happens to be open, diagnosing a fleet becomes guesswork.
We make the registry explicit and durable: devices, apps, and backend services are registered endpoints with stable identifiers, and routing is a lookup rather than an inference.
Buffer locally and assume the backend goes away
Backends are redeployed, networks fail, and certificates expire. A gateway that drops data whenever its upstream is unavailable converts routine maintenance into permanent data loss.
Local SQLite storage with a defined retention window and explicit backpressure behaviour means an outage costs a delay and a backfill, which is a recoverable situation.
Build the support tooling into the gateway
The questions support teams ask are always the same: is this device online, what did it last send, and why did that command not arrive. If the gateway cannot answer them, every one of those questions escalates to engineering. Diagnostics endpoints and a fleet status view are cheaper to build than the support load they remove.
Design it to outlive one product
The transport, registry, storage, and diagnostics layers are not product-specific. Building them as a shared core with per-product adapters means the second product line integrates at a fraction of the cost of the first, which is usually where the investment repays itself.