COE 558Lecture 02Part 02
Roles of the edge, fog and cloud layers
What each layer of the continuum provides, why the fog helps, and two worked architectures (IoT hierarchy and a vehicle platoon).
- Concepts
- 5
- Slides
- 10-14
- Reading
- 30 min
Why this part matters
Part 01 named the layers. This part says what each layer is for.
In the exam, in the system designs of your research, and in real IoT or vehicular deployments, you justify where a task runs by the role of the layer: the edge serves the client, the fog aggregates many edges, the cloud gives scale. Two worked architectures, an IoT tree and a vehicle platoon, close the part. They are the templates you will reuse whenever someone asks you to place a system on the continuum.
By the end you can
- Explain the three benefits of a fog layer that serves many edges, and quantify the bandwidth saving in a concrete scenario.
- Describe the four roles of the edge layer, including why it hides the fog from clients.
- List the cloud's big compute, big storage and big networking, with a real service for each.
- Map the devices of an IoT hierarchy and of a vehicle platoon to edge, fog and cloud, and justify each placement with latency.
- Recognise how NIST SP 500-325 and this course draw the edge and fog boundary differently.
A city installs 200 traffic cameras, and each one streams video at 4 Mbps. If every stream goes straight to the cloud, 800 Mbps of raw video crosses the wide-area network every second, around the clock, mostly showing empty roads.
Now put one small server room in the district, between the cameras and the cloud. It runs vehicle detection on all 200 streams and forwards only the events: one 2 kB record per camera per second saying what passed and how fast.
Worked example
Camera bandwidth at the fog
Raw traffic without a fog
200 × 4 Mbps = 800 Mbps into the cloud.Event traffic after the fog
Each camera now sends 2 kB × 8 = 16 kbit per second, so the whole district sends 200 × 16 kbit/s = 3.2 Mbps.Result
About 800 / 3.2 = 250× less traffic leaves the district, and the cloud still learns everything it needs for city-wide planning.
The numbers are not a toy. Satyanarayanan estimates that only 12,000 users streaming 1080p video would already need a 100 Gbps link into the cloud, and a million users would need 8.5 Tbps. His cloudlets exist largely to “reduce ingress bandwidth into the cloud”.
The rule: a shared layer between edges and cloud
The server room is what this course calls the Fog layer: a layer that provides compute, storage and networking at critical points closer to the client on the Edge-to-cloud (E2C) continuum. Physically it is usually a Mini data center, the "cloud close to the ground" that part 01 introduced with Bonomi's definition. Part 01 asked what the fog is; this concept asks what it is for.
The defining fact is that one Fog node serves many edges. Everything useful about the fog follows from that sharing:
- Less edge-to-cloud transfer. The fog filters, aggregates and answers locally, so less data crosses the long, expensive path. That lowers Latency for the requests it answers and frees bandwidth for everything else, as the camera example showed.
- Data geo-restriction. Because the fog sits inside a region, personal data can be processed there and never leave. This is Data geo-restriction, and it exists for legal and privacy compliance.
- Shorter edge-to-edge paths. Two edges under the same fog can talk through it. Their traffic turns around in the district instead of travelling to a distant data center and back.
Why geo-restriction is a legal requirement, not a preference
Data protection laws restrict where personal data may go. The EU GDPR, Chapter V, Article 44, allows a transfer to a third country only under the conditions that chapter lays down. Saudi Arabia's Personal Data Protection Law, Article 29, governs transfer outside the Kingdom, and SDAIA publishes standard contractual clauses for such transfers. A Riyadh hospital can therefore keep raw scans on a fog node inside the Kingdom and send only anonymised aggregates onward to a cloud region elsewhere.
Satyanarayanan adds two related benefits. A cloudlet can enforce its owner's privacy policy before any data is released to the cloud, and it can mask a transient cloud outage by keeping local services running until the link returns.
Recall
Name three benefits the fog gets from serving many edges.
Quick check
A Riyadh hospital's raw scans may not leave Saudi Arabia, yet it wants cloud analytics. Which fog benefit makes this possible?
A robot arm on a factory floor must recognise the part in front of it. Its own processor is too weak for the detection model, so it sends each frame to a gateway box on the factory LAN and gets back a label. The robot knows one address. It never learns whether the gateway answered by itself or passed the hard frames to a fog server two buildings away.
The rule: four roles at the boundary
That gateway box is the Edge layer. In this course the edge has four roles:
- WAN boundary. It sits on the physical boundary of the wide-area network that extends the cloud, the last stop before the client's own network.
- Offload target. The client can hand it compute jobs it cannot or should not run itself, such as the robot's detection model.
- Fast small-data processing. It handles small amounts of data at reasonable speed, close enough that the round trip stays short.
- Gateway that hides the fog. It is the client's single door into the rest of the continuum, and the fog behind it stays invisible.
The last role has a precise parallel in HTTP. RFC 9110, §3.7, defines a gateway, also called a reverse proxy, as an intermediary that “acts as an origin server for the outbound connection but translates received requests and forwards them inbound to another server or servers”. The client believes it is talking to the server. The edge plays exactly that part for the fog.
Hiding matters because the fog changes. Operators add nodes, fail over to a spare, or move a service to a less loaded server. If clients addressed fog nodes directly, every such change would have to be pushed to every robot, sensor and phone. With the edge in front, only the edge's forwarding changes and the clients never notice.
Real products follow this shape. AWS IoT Greengrass runs on a local gateway and lets devices “act locally on the data that they generate”, “filter and aggregate device data” and “react autonomously to local events”, while staying connected to AWS for the rest.
| Question | This course | NIST SP 500-325 |
|---|---|---|
| What “edge” names | The layer on the physical boundary of the WAN | The layer of end devices and their users |
| Where a gateway sits | In the edge layer (slide 13) | Among the fog nodes |
| What the client talks to | The edge, which hides the fog | A nearby fog node, often a gateway |
| When to use it | Exam answers for this course | Papers and standards that cite NIST |
Recall
What does “the edge hides the fog from the client” mean, and why is it useful?
A city wants to predict tomorrow's traffic from two years of data from every intersection. Training that model needs thousands of GPUs for days and petabytes of history in one place. No district fog room or edge gateway has either, and no single district has all the data.
The rule: scale in three forms
That job belongs to the Cloud layer, which provides compute, storage and networking at a much bigger scale:
- Big compute means high-performance computing. AWS advertises that you can “scale HPC applications to thousands of CPUs and GPUs with Elastic Fabric Adapter”.
- Big storage means big data that lives for a long time. Bonomi describes the cloud as the “repository for data that has a permanence of months and years”, and Amazon S3 is a real service built for that kind of long-lived data at petabyte scale.
- Big networking means connectivity between clouds. Google Cross-Cloud Interconnect gives dedicated links from Google Cloud to AWS, Azure, OCI and Alibaba Cloud at 10 Gbps, 100 Gbps or 400 Gbps (the 400 Gbps option only to AWS and OCI).
Putting the three layers side by side
With all three roles in hand, the layers line up along two axes at once. Going up from edge to fog to cloud, the area served grows, and so does how long the data is kept and acted on. Bonomi summarises the interplay as “Fog localization, and Cloud globalization”.
| Layer | Primary role | Scope served | Data horizon | Example |
|---|---|---|---|---|
| Edge | Immediate processing near the client | One client or one site | Milliseconds (act and discard) | Wake-word detection on a smart speaker |
| Fog | Intermediate layer for a local region | Many edges in a district | Seconds to days | Traffic management over nearby vehicle data |
| Cloud | Centralized, large-scale processing | Everyone, globally | Months to years (long-term retention) | Training an AI model in a data center |
The price of the cloud's reach is distance, and distance is Latency. Use the simulator to feel it: switch from the “all edge” preset to the “all cloud” preset, then set single tasks to fog, and watch how much of the response time becomes network rather than computation.
- T1Image resizePT 8 ms
- T2Object detectionPT 40 ms
- T3Draw boxesPT 8 ms
Formula
RT = Σ one-way hops + Σ PT
RT = (5 + 15 + 15 + 5) + (8 + 40 + 8) = 96 ms
Client→Edge 5 · Edge→Fog 15 · Fog→Edge 15 · Edge→Client 5
Each hop costs the difference between the one-way latencies of the two layers: Device 0, Edge 5, Fog 20, Cloud 70 ms from the client.
Recall
Give the cloud's three “bigs” with an example of each.
Quick check
Which task belongs in the cloud layer rather than the fog?
Follow one temperature reading through a cold-storage company. The rule for frozen goods is that the room must stay at or below 8 °C, and one thermometer has just read 9 °C.
Worked example
One reading's journey up the tree
Sense
The thermometer, an end device, measures 9 °C and sends it to the warehouse gateway.Process locally
The Edge gateway compares the reading with the 8 °C threshold and switches on the backup cooler at once. No message has left the building yet.Coordinate regionally
The gateway forwards a short alarm, not the raw stream, to the regional fog node. The fog node sees alarms from every warehouse in the region and reroutes today's deliveries away from the warm one.Analyse globally
The fog node passes a daily summary to the cloud, which keeps a year of history from every region and learns which compressors are about to fail.Result
Each level acted on its own time scale and passed up something smaller than it received: a reading, then an alarm, then a summary.
The rule: sense, process, coordinate, analyse
Slide 13 compresses this into one sentence: edge devices sense, edge gateways provide local processing, fog nodes coordinate regionally, and the cloud analyses globally. In this course's model the devices and gateways belong to the Edge layer, the coordinators to the fog layer, and the analytics to the Cloud layer.
The shape is a tree. Many devices hang off each gateway, several gateways off each fog node, and a few fog nodes off the cloud. NIST describes the same structure when it says fog nodes can be clustered “vertically (to support isolation), horizontally (to support federation)”. Data flows up the tree and shrinks at every level, while decisions are taken at the lowest level that has enough information.
Bonomi's fog tiers from part 01 give the time scales, here in his Smart Grid example. The first fog tier runs control loops “from milliseconds to sub seconds”, and it “filters the data to be consumed locally, and sends the rest to the higher tiers”. Higher fog tiers work on “seconds to minutes”, and even days. The cloud keeps data for months to years.
Recall
State the one-line slogan for what each layer serves, and the four verbs of the IoT hierarchy.
Quick check
In the slide 13 hierarchy, which element hides the fog nodes from a smart thermostat?
A platoon of trucks drives at 108 km/h, which is 30 m/s, with gaps of about 10 m. The front truck brakes hard. How far does the next truck travel before it even starts to react? That depends on where the brake decision is computed.
Worked example
Metres travelled while waiting
Decision in the cloud
Assume a 60 ms round trip. d = 30 × 0.06 = 1.8 m, almost a fifth of the gap.Decision through a roadside unit
Assume a 5 ms round trip. d = 30 × 0.005 = 0.15 m.Decision on the car or over V2V
Assume about 1 ms. d = 30 × 0.001 = 0.03 m.Result
The roadside unit gives the truck about 1.65 m more margin than the cloud, and the car itself loses only centimetres. If both trucks brake equally hard, this waiting distance is exactly how much of the gap is lost by the time both stop. These latencies are illustrative assumptions, but the ratio is the point: distance in the network becomes distance on the road.
The rule: map each element to a layer by how fast it must act
- Cars are edge nodes. Each vehicle processes its own sensor data in real time, in the Edge layer. Cars also talk directly to each other over the vehicle-to-vehicle (V2V) network, which skips every piece of infrastructure.
- Roadside units are fog nodes. An Roadside unit (RSU) along the road sees the vehicles near it and can, for example, warn them about a traffic jam ahead. In the paper behind slide 14's figure, “RSUs are managed by the RSUC which has more resources for computing, storage, and communication through Internet to the cloud.” The RSU controller (RSUC) is therefore the fog aggregator that links the roadside units to the cloud.
- The cloud coordinates globally. The Cloud layer offers global coordination, long-term storage and HPC, but at a higher Latency.
The figure comes from Wang, Guo, Gao, Fang, Li and Sun, “Fog-Based Distributed Networked Control for Connected Autonomous Vehicles” (2020). In their connected cruise control case study the RSU calculates control coefficients and sends them to each vehicle, and the car's on-board controller computes the real-time control signals from them. The split mirrors the time scales: the fog tunes the controller, the car closes the loop.
This is not an exotic case. NIST uses it to illustrate the fog's geographical distribution: “streaming services to moving vehicles, through proxies and access points geographically positioned along highways”. Bonomi lists cars talking to roadside units and smart traffic lights as a core fog use case.
Recall
In the platoon, map each element to a layer and give one job for each.
Quick check
Why does a platoon's emergency brake warning travel car to car instead of through the cloud?
Recap
If you remember nothing else
- The fog gives compute, storage and networking close to clients, and serves many edges.
- Fog benefits: less edge-to-cloud traffic, geo-restricted data for compliance, and shorter edge-to-edge paths.
- The edge sits at the WAN boundary. It takes offloaded jobs, processes small data fast, and is the gateway that hides the fog.
- The cloud gives big compute (HPC), big storage (big data) and big networking (multi-cloud).
- Edge serves the client, fog serves many edges, cloud serves everyone.
- In an IoT tree, devices sense, gateways process locally, fog nodes coordinate regionally, and the cloud analyses globally.
- In a platoon, cars are edge nodes, RSUs and the RSUC are fog, and the cloud gives global coordination at higher latency.
- Sources draw the boundary differently: NIST puts gateways in the fog and end devices in the edge.
Sources
- NIST SP 500-325: Fog Computing Conceptual Model (Iorga et al., March 2018)PaperNISTFog and fog node definitions, six essential characteristics, Annex A on fog against edge, vertical and horizontal clustering.(opens in a new tab)
- Fog Computing and Its Role in the Internet of Things (Bonomi, Milito, Zhu, Addepalli, MCC 2012)PaperACMFog definition, Smart Grid tiers and time scales, fog localization and cloud globalization, traffic lights.(opens in a new tab)
- The Emergence of Edge Computing (Satyanarayanan, IEEE Computer, 2017)PaperIEEE Computer SocietyCloudlets reduce ingress bandwidth, the 100 Gbps and 8.5 Tbps video estimates, privacy policy, masking outages.(opens in a new tab)
- Fog-Based Distributed Networked Control for Connected Autonomous Vehicles (Wang et al., 2020)PaperWireless Communications and Mobile Computing, WileySource of slide 14's figure: RSUs, RSUC and connected cruise control. RSU/RSUC roles and the RSU-computed control coefficients are from Sections 3 and 4 of the full text.(opens in a new tab)
- RFC 9110: HTTP Semantics, §3.7 IntermediariesRFCIETFGateway (reverse proxy) definition, the parallel to an edge that hides the fog.(opens in a new tab)
- What is AWS IoT Greengrass?DocsAWSDevices act locally, filter and aggregate data, and react autonomously to local events.(opens in a new tab)
- Amazon S3DocsAWSObject storage for long-lived data at petabyte scale: the cloud's big storage.(opens in a new tab)
- High Performance Computing on AWSDocsAWSScaling HPC applications to thousands of CPUs and GPUs: the cloud's big compute.(opens in a new tab)
- Cross-Cloud Interconnect overviewDocsGoogle CloudDedicated links to other clouds at 10, 100 or 400 Gbps: the cloud's big networking.(opens in a new tab)
- Regulation (EU) 2016/679 (GDPR), Chapter V and Article 44DocsEUR-LexConditions for transferring personal data to third countries.(opens in a new tab)
- Standard Contractual Clauses for Personal Data TransferDocsSDAIAClauses for transferring personal data outside the Kingdom under the PDPL.(opens in a new tab)
- Amazon Alexa's new wake word research at InterspeechArticleAmazon ScienceOn-device wake word detection, cloud confirmation and recognition.(opens in a new tab)
- IEEE 1934-2018: OpenFog Reference ArchitectureDocsIEEEOptional further reading on fog architecture as a standard.(opens in a new tab)