← Back to the chapter · Previous detail · Next detail →
Technical detail · Edge, Fog, and Cloud: Architecture
Size replay and preserve its meaning
A regional water-monitoring system uses sensors at remote stations, rugged local gateways, and cloud analytics. A gateway normalizes units, stamps records with local time plus synchronization status, holds raw exceptions for investigation, and rejects commands when safety preconditions fail. The cloud keeps long-term history and rollout policy, but it does not need to approve each immediate pump-protection decision. The architecture succeeds only if translation, command authorization, local fallback, replay, and update rollback are all explicit.
Replay sizing makes those boundaries visible. If 50 stations send one normalized record every 5 seconds, a 20-minute WAN outage produces 50 x 12 x 20 = 12,000 records. At about 300 bytes per record after envelope metadata, the raw backlog is only 3.6 MB, but replaying it at 10 records per second takes another 20 minutes and may arrive out of order with live data unless the gateway marks event time, receive time, replay state, and quality. Commands and policy updates need different treatment: an old pump command should expire instead of replaying blindly, while a failed certificate or model update needs a rollback rule and a visible version boundary. That keeps recovery auditable.