Edge & Fog Computing · Study deck
Edge, Fog, and Cloud: Device Integration
A freezer probe is replaced with a newer board that reports temperature in hundredths of a degree.
Edge Eddie is your guide for this deck.

After studying this chapter
Learning objectives
You will be able to:
- Select device classes based on task ownership, power source, runtime needs, interfaces, and lifecycle support.
- Draw an integration path from sensor or actuator interface through fog adapter to cloud service.
- Define gateway contracts for protocol translation, record normalization, command validation, buffering, and replay.
- Explain how identity, provisioning, certificates, updates, and health reporting cross edge, fog, and cloud tiers.
Major section
In 60 Seconds
The cloud can hold the fleet history later.
- The local path must keep the food safe now.
- A gateway is a device or service that joins field devices to a wider network.
- The word protocol means an agreed set of rules for how devices exchange data.
- Those details can change the tier boundary.
Major section
In 60 Seconds (continued)
A queue keeps it during a gap.
- The cloud should not parse a private device frame when a stable local adapter can own that work.
- They do not remove the need for a safe local action.
- A sensor sees a change.
- A local rule may act.
Major section
In 60 Seconds (continued)
An adapter keeps its meaning.
- Each boundary keeps an owner.
- Device integration is the work that turns edge hardware, fog gateways, and cloud services into one manageable system.
- The key decision is not "which board is best." The key decision is which tier owns sensing, actuation, protocol adaptation, identity, buffering, command validation, software updates, and evidence.
Major section
Start Simple · Minimum Viable Understanding
The core idea is to hide device-specific details behind stable contracts while keeping identity, buffering, updates, and evidence explicit.
- Everyday IoT integration starts with one device type and one message path, then proves that enrollment, translation, command validation, and retry behavior survive a realistic failure.
Major section
Most Valuable Understanding · Device Integration Map
A device is not integrated when it can send one test message.
- A device integration plan should show what happens before the cloud sees a record and what happens before a device obeys a command.
- Owns fleet identity, long-term records, dashboards, analytics, rollout policy, audit trails, and cross-site coordination.
Major section
Device Class Selection · Interfaces and Drivers
Typical constraints are small memory, limited storage, tight power budget, and simple network stacks.
- It usually has persistent storage and a managed runtime.
- It should not own time-critical physical safety decisions.
- An impossible reading should be rejected or flagged before it becomes operational evidence.
- The link choice defines pairing, addressing, retries, security, and diagnostics.
Major section
Gateway Contract
The gateway contract is the most important maintainability boundary in many edge-fog-cloud systems.
- It lets device protocols change without forcing cloud applications to change.
- The gateway is maintainable only if both sides of its translation boundary have an explicit contract.
- Those labelled hand-offs define exactly what a gateway implementation and its tests must own.

Major section
Gateway Contract (continued)
The Local queue then preserves event time and message ID before the Cloud API applies its schema and acknowledgement.
- That record lets a reviewer distinguish a sensor fault from an adapter, queue, API, or command-validation failure.
- Parse: Decode device-specific frames, validate checksums or signatures, and reject malformed records.
- A useful gateway contract is bidirectional.
Major section
Identity and Provisioning · Store-and-Forward
Every integrated device needs a trustworthy lifecycle record.
- The record should connect a physical asset to credentials, firmware, calibration, adapter compatibility, ownership, and retirement status.
- A field device should not hold cloud-wide privileges.
- A gateway should not accept commands for devices outside its assigned scope.
- Outages are normal in edge deployments.
Major section
Integration Patterns · Update and Management Paths
Many simple devices send regular readings to a local gateway.
- The gateway validates, normalizes, summarizes, and forwards records.
- The device performs local detection, filtering, or control and sends events or compact evidence.
- A local gateway or site server runs models, rules, or correlation across several devices.
Major section
Replace the Freezer Probe without Rewriting the Fleet Service
Its normalized reading is 42 × 0.1 °C = 4.2 °C.
- The replacement reports 420 with scale 0.01 °C per count, which also gives 4.2 °C.
- The driver identifies the hardware and payload version; the gateway adapter applies the matching scale.
- A local alarm still acts on current readings.
Major section
Replace the Freezer Probe without Rewriting the Fleet Service (continued)
The cloud consumes the stable value and unit while retaining enough version evidence to explain the conversion.
- With one record at each minute's end, the queue receives 15 records.
- At an illustrative 96 bytes per normalized record, this is 1,440 bytes before filesystem overhead.
- Commands need the reverse discipline.
Major section
Replace the Freezer Probe without Rewriting the Fleet Service (continued)
Queueing preserves history for later replay; it must not become a dependency of the immediate alarm path.
- The freezer uses the same responsibility split, with a different time requirement.
- The adapter should flag or quarantine it instead of applying the old scale by default.
- Stable message identities should let the receiving service avoid duplicate history while preserving the original event times.
Major section
Summary · Key Takeaway
Device integration connects physical interfaces, gateway adapters, and cloud services through explicit contracts.
- Identity, provisioning, version evidence, updates, rollback, quarantine, and retirement are part of the integration design.
- Device integration succeeds when identity, protocol translation, schemas, command paths, updates, and telemetry are designed together.
- A working data path is not enough without secure management and observable failure handling.
Deck summary
Key takeaways
The cloud can hold the fleet history later.
- A queue keeps it during a gap.
- An adapter keeps its meaning.
- The core idea is to hide device-specific details behind stable contracts while keeping identity, buffering, updates, and evidence explicit.
- A device is not integrated when it can send one test message.
Retrieval practice
Recall check 1 of 5

Edge Eddie says: answer from memory, then check your reasoning.
Q1A sensor can upload readings through a gateway. What other path must be designed before calling it integrated?
Show answer
Answer: A Management and trust flows are part of the device integration contract.
Retrieval practice
Recall check 2 of 5

Edge Eddie says: answer from memory, then check your reasoning.
Q2A battery-powered field node wakes, samples one physical measurement, checks a local threshold, stores a recent reading, and reports through a nearby gateway. Which class is the best starting point?
Show answer
Answer: B The node owns sensing and simple local validation.
Retrieval practice
Recall check 3 of 5

Edge Eddie says: answer from memory, then check your reasoning.
Q3A gateway maps a Modbus register with raw value 214 and documented scale 0.1 C to JSON as {"value": 214}. What is wrong?
Show answer
Answer: A Translation must preserve physical meaning, not only produce valid-looking JSON.
Retrieval practice
Recall check 4 of 5

Edge Eddie says: answer from memory, then check your reasoning.
Q4A site gateway loses WAN connectivity. Devices continue operating and the gateway stores normalized records locally. What must each queued record include so replay is safe when connectivity returns?
Show answer
Answer: D Those fields allow ordering, deduplication, late-arrival handling, and interpretation after replay.
Retrieval practice
Recall check 5 of 5

Edge Eddie says: answer from memory, then check your reasoning.
Q5What defines source evidence through its device driver, signal, actuator and local identity?
Show answer
Answer: C Its driver, signal, actuator, and local identity define the source evidence.
Q6A cloud service requests a valve action through a site gateway. What belongs in the integration path?
Show answer
Answer: D The command and return evidence cross named interfaces and the local safety boundary.
Print reference
Answers
Answer key.
- A · Management and trust flows are part of the device integration contract.
- B · The node owns sensing and simple local validation.
- A · Translation must preserve physical meaning, not only produce valid-looking JSON.
- D · Those fields allow ordering, deduplication, late-arrival handling, and interpretation after replay.
- C · Its driver, signal, actuator, and local identity define the source evidence.
- D · The command and return evidence cross named interfaces and the local safety boundary.