Chapter 14

Updated 4 Oct 2026

🌫️ Chapter 14 — Edge Computing & Fog Computing Cheat Sheet

Big Picture: As IoT and mobile devices explode, centralizing everything in the cloud creates latency, bandwidth, and privacy bottlenecks. The solution is to push intelligence closer to where data is born — via Edge, Fog, and Mist computing.


🗺️ Part 1 — The Computing Spectrum (Where Does Processing Happen?)

IoT Device / Sensor
       ↓ (Mist Computing — on the device itself)
Edge Node / Gateway / Access Point
       ↓ (Edge Computing — one hop away)
Fog Node / Local Server / Cloudlet
       ↓ (Fog Computing — intermediate layer)
Cloud Data Center
       ↓ (Cloud Computing — centralized, far away)
LayerNameWhereLatency
1Mist ComputingOn the IoT device itselfLowest (µs–ms)
2Edge ComputingNear the device (AP, gateway)Low (ms)
3Fog ComputingIntermediate (local server, cloudlet)Moderate (ms–s)
4Cloud ComputingRemote data centerHigh (100+ ms)

🧑‍🍳 Analogy: Mist = cook at your table; Edge = kitchen on your floor; Fog = restaurant kitchen nearby; Cloud = central factory producing all food.


📡 Part 2 — 5G & 6G: Why Network Speed Matters for Edge

Edge computing unleashes the full potential of 5G by combining ultra-low latency with local processing.

Feature5G6G
Peak Data RateUp to 10 GbpsUp to 1 Tbps (100× faster)
Latency~1 ms< 0.1 ms
Frequency BandSub-6 GHz, mmWave (24–100 GHz)Terahertz (THz) (100 GHz–1 THz)
Spectrum EfficiencyHighUltra-high (AI optimized)
Connection Density~1M devices/km²10M+ devices/km²
ReliabilityUltra-reliable (URLLC)Near-perfect (99.99999%+)

Use Cases by Generation

NetworkUse Cases
5GSmart cities, Autonomous vehicles, Remote surgery, Industrial IoT (IIoT), AR/VR
6GHolographic communication, Tactile Internet (real-time touch feedback), Brain-computer interfaces, Fully immersive Metaverse, Digital twins, Ultra-precision remote control

What 5G + Edge Enables Together

  • VR/AR — instant rendering without cloud round-trip
  • Gamification — real-time interactive games
  • Drone control — sub-millisecond response loops
  • Connected cars — V2X (vehicle-to-everything) low-latency decisions
  • Real-time collaboration — simultaneous multi-user interaction

🖥️ Part 3 — Edge Computing

What is Edge Computing?

  • Processing and computing client data closer to the data source (sensors, gateways, base stations)
  • Goal: minimize latency and bandwidth usage
  • Data stays local → enhances privacy and security

🍱 Analogy: Edge = a mini kitchen on each floor of an office building — food (data) gets prepared right where people work, instead of everyone going to one giant kitchen in the basement (centralized cloud).

Edge Computing Architecture (3 Layers)

Layer 1: Device Layer
  → Sensors & Controllers (data originates here)

Layer 2: Edge Layer (the key addition)
  → Edge Node / Server
  → Data Processing & Reduction
  → Data Caching & Buffering
  → Control Response
  → Virtualization

Layer 3: Cloud Layer
  → Big data processing
  → Data warehousing & long-term storage

The Edge Layer exists to reduce latency — process what you can locally, send only what's necessary to the cloud.

Edge vs. Cloud

EdgeCloud
StrengthsLow latency, reduced backhaul, data localizationScalability, mobility support, light devices
TogetherHybrid IT EnvironmentHybrid IT Environment

Edge Pros & Use Cases

✅ Pros🌍 Real-World Use Cases
Low latencyReal-time video analytics in smart surveillance
Bandwidth-efficientPredictive maintenance in industrial IoT
Privacy (data stays local)AR/VR apps requiring low round-trip times

Key Difference from Fog

Edge = computing happens directly on or physically next to the devices/sensors Fog = computing happens at an intermediate layer (local server, router, cloudlet) between edge and cloud


🌁 Part 4 — Mist Computing (Extreme Edge)

What is Mist Computing?

  • Also called "nano-edge" computing
  • Pushes computation to the extreme edge — onto end devices themselves (smart sensors, microcontrollers, embedded systems)
  • Devices perform preprocessing or lightweight analytics entirely on-board
  • Supports autonomous decision-making without any upstream communication

🧠 Analogy: Mist = a person making instant decisions on the spot. Fog = their supervisor nearby for complex decisions. Cloud = HQ far away for strategic decisions.

Characteristics

  • Often battery-powered or resource-constrained devices
  • Computation via microchips or microcontrollers → very limited processing power
  • Supports fail-safe operations — works even with no connectivity

Mist Pros & Use Cases

✅ Pros🌍 Real-World Use Cases
Real-time responsivenessSmart thermostats regulating temperature
No need for constant connectivityWearables filtering health data before sending summaries
Local autonomy (fail-safe)Drones performing on-board obstacle detection

Mist + Fog Relationship

  • Complementary, not competing:
    • Computationally heavy tasks → Fog (gateway)
    • Simple, lightweight tasks → Mist (end device)

🌫️ Part 5 — Fog Computing (Deep Dive)

What is Fog Computing?

  • Term coined by Cisco in 2014
  • The layer below the cloud — manages connections between cloud and network edge
  • Brings cloud capabilities down to the ground (just as fog in nature is closer to earth than clouds)
CloudFog
ArchitectureCentralizedDistributed & decentralized
LocationRemote data centerNear end-users (gateway/server)

🏭 Analogy: Fog = a network of local warehouses spread across a city, handling deliveries close to customers. Cloud = the central factory doing large-scale production.

Key Characteristics of Fog

  • Extends cloud computing to the network edge
  • Low latency + location awareness
  • Handles volume, variety, velocity of IoT data
  • Sends only the right data up to the cloud for big data analytics
  • Wide geographic distribution
  • Strong presence of streaming and real-time applications
  • Heterogeneous connected objects
  • Communicates directly with mobile devices
  • Predominantly wireless access

Fog as a Platform

Fog = the distributed, hierarchically organized platform where the Internet meets the physical world at Machine-to-Machine (M2M) scale.

PropertyDescription
Service MobilityMigrate a running instance from cloud → edge
Mixed ownershipSingle entity or federation of agencies
Multi-tenant fog nodesShared, public, or private (like cloud)
North/South FlowsBetween fog ↔ cloud and fog ↔ devices
East/West FlowsBetween fog nodes laterally (peer-to-peer)
Highly virtualizedSecured & isolated tenants, QoS, workload distribution

🧱 Part 6 — Fog Computing Platform Architecture

FC Software Stack

Business Applications
├── Cloud Infrastructure Software  (Portals, Services, Resources)
├── Fog Management Software        (Lifecycle mgmt, Orchestration, APIs/SDKs)
├── Fog Infrastructure Software    (Execution env, OS, Virtual network functions)
└── Fog Hardware                   (Networking, Compute, Storage)
           ↕
         Things (IoT Devices)

Cross-cutting: Policy/Security | Analytics & Data Models

Technology Components

ComponentWhat's Needed
ComputingHypervisors to virtualize compute and I/O resources
StorageVirtual File System + Virtual Block/Object Store
NetworkingNetwork Virtualization Infrastructure (SDN, NFV)

Fog uses policy-based orchestration on top of the resource virtualization layer + exposes APIs for app development.

Hardware/Software Layers

LayerRole
Heterogeneous Physical ResourcesFCNs (servers, routers, APs, set-top boxes) + multiple wireless access types
Fog Abstraction LayerHides platform heterogeneity; exposes uniform programmable interface; supports multi-tenancy
Fog Service Orchestration LayerDynamic, policy-based lifecycle management of Fog services

Key Software Components

ComponentRole
Foglet (FSA) — Fog Software AgentDistributed orchestration framework; one per node; monitors health + state; performs lifecycle management
Distributed Database (DDB)Fast storage/retrieval of application data and metadata
Policy-Based Service OrchestrationRoutes incoming requests to appropriate service instances based on policies (QoS, power, security, isolation)
Message BUSMessaging infrastructure — allows different systems to communicate through shared interfaces

🌿 Part 7 — Fog Computing Taxonomy

Main branches of fog computing design space:

CategoryOptions
Fog Node ConfigurationsServers, Networking devices, Cloudlets, Base stations, Vehicles
Nodal CollaborationCluster, P2P, Master-slave
Resource MetricsTime (communication, computation, deadline), Data (flow, size), Cost (networking, deployment, execution), Energy
Service Level ObjectivesLatency mgmt, Cost mgmt, Network mgmt, Computation mgmt, Application mgmt, Data & Power management
Applicable NetworksIoT, Mobile/RAN, Vehicular networks, CDN
Security ConcernsAuthentication, Encryption, Privacy, DoS Attack

🌍 Part 8 — Benefits of Fog Computing

Industries Using Fog

Energy | Manufacturing | Construction | Oil & Gas | Transportation | Finance | Telecom | Healthcare | Retail | Smart Cities | Agriculture

What Fog Enables

Fog distributes core functions:

  • Computation, Storage, Communication, Control, Decision Making

Fog helps devices:

  • Measure, Monitor, Process, Analyze, React

Fog Advantages Summary

BenefitWhy It Matters
Ultra-low latencyGeographically closer = instant responses
No bandwidth bottleneckData aggregated at multiple points, not one channel
High availabilityMultiple interconnected channels — harder to lose connection
High securityComplex distributed system; data processed by many nodes
Power-efficiencyEdge nodes use low-power protocols (Bluetooth, Zigbee, Z-Wave)
Location awarenessFog nodes know where data originates
Real-time analyticsProcess at the source, no round-trip to cloud

Fog Disadvantages

❌ ConExplanation
More complex systemAdditional layer in data processing architecture
Additional expenseMust purchase edge devices (routers, hubs, gateways)
Limited scalabilityNot as elastic as cloud

☁️ Part 9 — Cloud vs. Fog Comparison

Performance & Security

RequirementCloudFog
LatencyHighLow
Delay JitterHighVery low
Server LocationWithin InternetAt the network edge
Client–Server DistanceMultiple hopsOne hop
SecurityVaries per providerMore defined and customizable
Attack on Data-in-FlightHigh probabilityLow probability
Location Awareness❌ No✅ Yes

Data at rest = stored in DB/file | Data in transit/motion/flight = being transferred over network

Architecture & Connectivity

RequirementCloudFog
Geographic DistributionCentralizedDistributed
Number of Server NodesFewVery large
Mobility SupportLimitedSupported
Real-Time InteractionsPossible but costlyNatively supported
Last Mile ConnectivityLeased lineWireless

📊 Part 10 — How Fog Helps Cloud (Both Directions)

Pushing Intelligence Up → Cloud Challenges

Cloud ChallengeHow Fog Helps
Critical latency requirementsFewer network hops
Data-rich mobilityData locality & local caches
Geographic diversityIntelligence localized where appropriate
Network bandwidth limitsLocal processing → less core network load
Reliability/robustnessFast failover; local response in emergencies
Analytics challengesAnalytics & storage at the right tier
User data/geo privacyFog aggregates user data (anonymizes before cloud)

Pushing Intelligence Down → Endpoint Challenges

Endpoint ChallengeHow Fog Helps
Physical constraints (energy, space, environment)Fog nodes access more energy; physically larger; better cooling
Functional constraints (processor, storage, reliability)Terabytes → PB storage; more redundant; modular expansion
Security constraintsBetter physical and network security than endpoints

🔄 Part 11 — IoT + Fog: Data Flow Today vs. Tomorrow

IoT with Fog Architecture (3 Layers)

Layer 1: Device
  → Local data collection (sensors, actuators)

Layer 2: FOG (IOx)
  → Local data analysis and filtering
  → Apply: Rules, Patterns, Actions
  → Data Reduction, Control Response, Data Virtualization

Layer 3: Cloud / Data Center
  → Non-real-time action
  → Long-term storage
  → Machine learning, historic/predictive analysis
  → Sends back: Rule and Pattern Updates

Data Flow Evolution

EraData Flow
TodayLarge data volume flows edge → core (refined at each tier)
TomorrowAnalytics algorithms become slimmer at the edge — process more locally, send less

⚖️ Part 12 — Fog Computing vs. MEC vs. Cloudlet

FeatureFog ComputingMEC (Mobile Edge Computing)Cloudlet
Operation ModeConnected to cloudStandaloneStandalone or cloud-connected
Main DriverCisco / OpenFogIndustry consortiumResearch & Development
VirtualizationSupportedVM or any appropriate techVM
Target AppsMobile offloading, spans cloud and edgeMobile offloading, better at edgeMobile offloading

Common to all three: Computing at the edge + virtualization supported

⚠️ Intra-node offloading is also possible — a single node can have multiple internal compute units, requiring internal load balancing and scheduling too. (Final Exam topic!)

OpenFog Consortium

Founded by: ARM, Cisco, Dell, Intel, Microsoft, Princeton University
Mission: Drive industry and academic leadership in fog computing architecture, testbed development, and interoperability deliverables that seamlessly leverage cloud and edge for end-to-end IoT.


🔁 Part 13 — Offloading: F2F and F2C ⚠️ Final Exam Topic!

Overview

When a fog node gets overloaded (e.g., >80% utilization), it offloads to:

TypeRouteViaBest For
F2F (Fog-to-Fog)Primary fog node → Assistive fog nodeWired linkReal-time, low-latency tasks
F2C (Fog-to-Cloud)Primary fog node → CloudWireless linkGlobal data needs, heavy ML training

🚦 Rule of thumb: Real-time response → F2F first. Global scale or heavy compute → F2C.

Load Monitoring: Utilization Formula

ρi=LiCi\boxed{\rho_i = \frac{L_i}{C_i}}

  • LiL_i = Current load of fog node FiF_i
  • CiC_i = Capacity of fog node FiF_i
  • ρi\rho_i = Utilization ratio (like CPU usage %)

Load Status:

  • Overloaded: ρi>τhigh\rho_i > \tau_{\text{high}}
  • Underloaded: ρi<τlow\rho_i < \tau_{\text{low}}

💻 Analogy: ρi\rho_i = CPU usage % in your Mac Activity Monitor. If it spikes past a threshold, delegate tasks to a less busy neighbor.


📐 Part 14 — F2F Load Sharing: 4-Step Mechanism ⚠️ Final Exam!

Step 1: Load Monitoring

  • Each fog node periodically computes its own utilization: ρi=LiCi\rho_i = \frac{L_i}{C_i}
  • Enables real-time system-wide awareness

Step 2: Neighbor Discovery

  • Define the neighbor set (only low-latency neighbors considered): Ni=Fj∣latency(i,j)<δ\mathcal{N}_i = {F_j \mid \text{latency}(i,j) < \delta}
  • δ\delta = maximum acceptable latency threshold

Step 3: Decision Rule

  • If FiF_i is overloaded → find a neighbor that is underloaded: ∃Fj∈Ni such that ρj<τlow\exists F_j \in \mathcal{N}_i \text{ such that } \rho_j < \tau_{\text{low}}

Step 4: Optimal Target Selection

Fj∗=arg⁡min⁡Fj∈Ni(α⋅ρj+β⋅latencyi,j)\boxed{F_j^* = \arg\min_{F_j \in \mathcal{N}_i} \left(\alpha \cdot \rho_j + \beta \cdot \text{latency}_{i,j}\right)}

  • α\alpha = weight for load balancing (how much you care about CPU balance)
  • β\beta = weight for latency minimization (how much you care about speed)
  • Choose the neighbor that minimizes the combined weighted cost

Task Offloading

T:Fi→Fj∗\boxed{\mathcal{T}: F_i \rightarrow F_j^*}

Task T\mathcal{T} is migrated from overloaded FiF_i to optimal neighbor Fj∗F_j^*.

⚠️ Load is redistributed within the fog layer first — not sent to the cloud immediately.

F2F Load Sharing Strategies

StrategyHow It Works
Threshold-basedTrigger offloading when utilization exceeds a set threshold
Queue-basedOffload based on queue length at each node
Prediction-basedProactively offload before overload occurs
Load-awareContinuously monitor and redistribute
Priority-awareHigh-priority tasks get preferential routing

🔐 Part 15 — Secure Task Offloading: Blockchain-Based (F2F) ⚠️ Final Exam: Design Algorithm as Sequence Diagram / Pseudocode!

Source: R. Roshan et al., GLOBECOM 2020

Why Blockchain for Fog Security?

Standard fog offloading has a trust problem — how does one fog node know another is legitimate before offloading sensitive tasks to it?
Solution: Use blockchain + smart contracts as a decentralized trust layer.


Phase 1: Joining & Registration on Blockchain

New Fog Node Joins Network
        ↓
Registers with unique credentials on the Blockchain
        ↓
Identity + Registration Timestamp stored as a transaction
        ↓
Smart Contracts used to:
   • Authenticate fog nodes
   • Handle communication between fog nodes
  • Every node that joins the fog network also joins the blockchain
  • Smart Contracts = programmable policies stored on blockchain → automate authentication + communication rules

Phase 2: Secure Fog Node Selection (Rank System)

When a fog node needs to offload, it selects a secondary node based on rank:

ConceptDefinition
RankNumber of unique successful peer relations a fog node has established
Rank = 0Brand new node — no authenticated peer relations yet
Rank incrementsEach time a node successfully authenticates to a peer AND a transaction is carried out
Stored on blockchainRank value is a transaction on the blockchain

Selection Logic:

1. All new nodes start at rank 0
2. N_i (high rank) wants to offload to N_k (new node, rank 0)
   → Mutual verification depends on whether rank meets threshold
3. N_i verifies N_k via cloud token system
4. N_k verifies N_i directly via rank from smart contract
5. On success → both ranks updated on blockchain

Phase 3: Token-Based Cloud Verification (PKI)

Used when a fog node does NOT meet the required rank threshold for direct verification.

N_k (unverified node)  →  Request token from Cloud at time t_req
Cloud                  →  Compute token:

tokenreq=[treq, Nk] Pukey−cloud\boxed{token_{req} = [t_{req},\ N_k]\ Pu_{key-cloud}}

token_req  →  Presented to N_i
N_i        →  Verifies token via cloud (checks authenticity + freshness)
           →  If valid: trust established, offloading proceeds
  • Uses Public Key Infrastructure (PKI)
  • Token includes timestamp treqt_{req} → prevents replay attacks (freshness check)
  • Cloud acts as trusted third-party verifier for unknown nodes

Full Blockchain F2F Flow (Sequence Summary)

Fog Node N_i (overloaded)
  │ 1. Check own ρ_i > τ_high
  │ 2. Discover neighbors N(i)
  │ 3. Select candidate N_k
  │
  ├── If N_k rank ≥ threshold:
  │       N_k verifies N_i via smart contract rank
  │       N_i verifies N_k via smart contract rank
  │       → Both pass → offload task → update both ranks on blockchain
  │
  └── If N_k rank < threshold:
          N_k requests token from Cloud
          Cloud issues: token = [t_req, N_k] Pu_key-cloud
          N_k presents token to N_i
          N_i verifies token via cloud
          → Verified → offload task → update both ranks on blockchain

📅 Part 16 — Multi-Objective Task Scheduling in Fog

Source: Movahedi et al., J Cloud Comp 10, 53 (2021)

Hierarchical Architecture

IoT Layer:  Sensor/actuator devices (ZigBee, Bluetooth, WiFi, LAN)
    ↓
Fog Layer:  Fog Cluster Managers + Fog Nodes (MAN network, WiFi)
    ↓
Cloud Layer: Cloud Manager + WAN + Compute / Storage / Task Queue

Scheduling Flow (Task Request Handling)

IoT Applications
  → Send task requests to Initial Fog Cluster Manager (FCM)
        ↓
Initial FCM → forwards to Scheduler FCM → tasks enqueued
        ↓
Scheduler FCM:
  1. Get state info from fog/cloud nodes AND IoT devices
  2. Run scheduling algorithm
  3. Offload IoT tasks to selected fog/cloud nodes

Task Execution Flow

Scheduler FCM → Selected Fog/Cloud Node
  1. Offload task
  2. Node fetches data FROM IoT devices
  3. IoT devices send data back
  4. Task executes (may span multiple time slots)
  5. Output result → back to Scheduler FCM → back to IoT

🔒 Part 17 — Security Challenges in Fog Computing

  • Trust — hard to establish in distributed, heterogeneous systems
  • Authentication — verifying identity across many fog nodes
  • Wireless Security — vulnerable last-mile connections
  • End-User Privacy — location and behavioral data exposed
  • Malicious Attacks — fog nodes exposed at the edge
  • Model Privacy — ML models at the edge may be extracted
  • Volume & Variety — diverse data types complicate security policies
  • Flexibility vs. Security — tension between open APIs and strict access control
  • Detection Methodology — anomaly detection across distributed nodes is hard
  • Cryptography Issues — resource-constrained devices limit crypto options

Security Issues Inherited from Cloud

Threat CategorySpecific Threats
DataData Breaches, Data Loss
Fog/Cloud LayerAdvanced Persistent Threats, Access control issues, Account Hijacking, Denial of Service
PlatformInsecure APIs, System/App vulnerabilities, Malicious Insiders, Abuse of shared technology

🎯 Part 18 — F2F vs. F2C Decision Scenarios

ScenarioDecisionWhy
Aggregate data from multiple cities globally → generate global insights→ F2CRequires cloud-scale resources
Multiple fog nodes processing real-time CCTV streams; one overloaded; nearby nodes have spare capacity→ F2FReal-time object detection needs low latency
Manufacturing system training a deep learning model from weeks of sensor data→ F2CMassive compute beyond fog capacity

🧭 Rule of thumb:

  • Real-time response needed → prefer F2F
  • Global data or heavy compute → escalate to F2C

🧩 Quick Reference Summary

ConceptWhat It Is
Edge ComputingProcessing at/near data source devices; one hop; low latency
Mist ComputingComputation ON the IoT device itself; nano-edge; most constrained
Fog ComputingDistributed intermediate layer between devices and cloud (Cisco, 2014)
FCNFog Computing Node (server, router, AP, set-top box, etc.)
Foglet (FSA)Software agent running on every fog node; orchestrates lifecycle
F2F OffloadingFog-to-Fog: redistribute task to neighboring fog node
F2C OffloadingFog-to-Cloud: escalate task to cloud when fog is insufficient
ρi=Li/Ci\rho_i = L_i / C_iUtilization ratio of fog node ii
Fj∗F_j^* formulaOptimal offload target: minimize weighted load + latency
Rank (Blockchain)Trust score of fog node = # of successful authenticated peer transactions
Smart ContractProgrammable policy on blockchain; automates node authentication
Token (PKI)Cloud-issued credential for low-rank node verification
North/South FlowFog ↔ Cloud or Fog ↔ Device (vertical)
East/West FlowFog ↔ Fog (lateral, peer-to-peer)
OpenFog ConsortiumARM + Cisco + Dell + Intel + Microsoft + Princeton; fog standards body
MECMobile Edge Computing — standalone edge; driven by industry consortium
CloudletMicro-cloud at edge; standalone or cloud-connected; research-driven
5G + EdgeEnables VR/AR, drones, connected cars, real-time collaboration
6GTerahertz band; < 0.1 ms latency; holographic + brain-computer interfaces

🧮 Part 19 — Worked Examples ⚠️ Final Exam Practice!


📝 Problem 1: Identify Overloaded / Underloaded Nodes

Given:

NodeLoad (LiL_i)Capacity (CiC_i)
F1F_17280
F2F_220100
F3F_350100
F4F_43060

Assume: τhigh=0.8\tau_{high} = 0.8, τlow=0.4\tau_{low} = 0.4

Formula: ρi=LiCi\boxed{\rho_i = \frac{L_i}{C_i}}

Classification:

  • ρi>τhigh\rho_i > \tau_{high} → Overloaded
  • ρi<τlow\rho_i < \tau_{low} → Underloaded
  • τlow≤ρi≤τhigh\tau_{low} \leq \rho_i \leq \tau_{high} → Normal

Step-by-Step Solution:

F1F_1: ρ1=7280=0.90⇒0.90>0.8⇒Overloaded✅\rho_1 = \frac{72}{80} = 0.90 \quad \Rightarrow \quad 0.90 > 0.8 \quad \Rightarrow \quad \textbf{Overloaded} ✅

F2F_2: ρ2=20100=0.20⇒0.20<0.4⇒Underloaded✅\rho_2 = \frac{20}{100} = 0.20 \quad \Rightarrow \quad 0.20 < 0.4 \quad \Rightarrow \quad \textbf{Underloaded} ✅

F3F_3: ρ3=50100=0.50⇒0.4≤0.50≤0.8⇒Normal\rho_3 = \frac{50}{100} = 0.50 \quad \Rightarrow \quad 0.4 \leq 0.50 \leq 0.8 \quad \Rightarrow \quad \textbf{Normal}

F4F_4: ρ4=3060=0.50⇒0.4≤0.50≤0.8⇒Normal\rho_4 = \frac{30}{60} = 0.50 \quad \Rightarrow \quad 0.4 \leq 0.50 \leq 0.8 \quad \Rightarrow \quad \textbf{Normal}

Summary Table:

Nodeρi\rho_iStatus
F1F_10.90🔴 Overloaded
F2F_20.20🟢 Underloaded
F3F_30.50🟡 Normal
F4F_40.50🟡 Normal

F1F_1 needs to offload tasks. F2F_2 is a good candidate to receive them (lowest utilization).


📝 Problem 2: Choose the Best F2F Offload Target

Given: F1F_1 is overloaded. Neighbor set: N1=F2,F3,F4\mathcal{N}_1 = {F_2, F_3, F_4}

NodeUtilization ρj\rho_jLatency from F1F_1 (ms)
F2F_20.2512
F3F_30.505
F4F_40.358

Score formula (lower = better): Score(Fj)=α⋅ρj+β⋅latency1,j\boxed{\text{Score}(F_j) = \alpha \cdot \rho_j + \beta \cdot \text{latency}_{1,j}}

Assume: α=1\alpha = 1, β=0.05\beta = 0.05

α\alpha weights how much you care about load balancing; β\beta weights how much you care about latency. Pick the node with the lowest score.


Step-by-Step Solution:

Score(F2F_2): =1×0.25+0.05×12=0.25+0.60=0.85= 1 \times 0.25 + 0.05 \times 12 = 0.25 + 0.60 = \mathbf{0.85}

Score(F3F_3): =1×0.50+0.05×5=0.50+0.25=0.75= 1 \times 0.50 + 0.05 \times 5 = 0.50 + 0.25 = \mathbf{0.75}

Score(F4F_4): =1×0.35+0.05×8=0.35+0.40=0.75= 1 \times 0.35 + 0.05 \times 8 = 0.35 + 0.40 = \mathbf{0.75}

Summary Table:

Nodeα⋅ρj\alpha \cdot \rho_jβ⋅latency\beta \cdot \text{latency}ScoreResult
F2F_20.250.600.85❌
F3F_30.500.250.75✅ Winner (tie → lowest latency)
F4F_40.350.400.75✅ Tie

Answer: F3∗=F3F_3^* = F_3 and F4F_4 are tied at 0.75.

Tiebreaker: When scores are equal, prefer the node with lower latency → F3F_3 wins (5 ms vs. 8 ms). Alternatively, if the tiebreaker is lower utilization → F4F_4 wins (0.35 vs. 0.50). Depends on system policy.

Fj∗=F3 (lowest latency tiebreaker)\boxed{F_j^* = F_3 \text{ (lowest latency tiebreaker)}}


🔑 How to Solve These Problems (General Template)

Problem 1 — Overload/Underload:

1. Compute ρ_i = L_i / C_i for each node
2. Compare against τ_high and τ_low
   - ρ_i > τ_high  → Overloaded
   - ρ_i < τ_low   → Underloaded
   - otherwise     → Normal

Problem 2 — Best F2F Target:

1. Identify overloaded node (from Problem 1)
2. Get its neighbor set N_i (only nodes within latency threshold δ)
3. Filter: only consider underloaded candidates (ρ_j < τ_low) — optional pre-filter
4. Compute Score(F_j) = α·ρ_j + β·latency_{i,j} for each neighbor
5. Select F_j* = argmin Score(F_j)
6. In case of tie → use secondary criterion (lower latency OR lower utilization)
7. Offload: T: F_i → F_j*

⚠️ Final Exam Reminders

  1. F2F Offloading Algorithm — be able to write it as a sequence diagram or pseudocode:
    • Load monitoring → Neighbor discovery → Decision rule → Optimal selection → Offload
  2. Blockchain-based secure F2F — design the 3-phase algorithm (Registration → Rank-based Selection → Token-based Cloud Verification)
  3. Intra-node offloading — within a single fog node that has multiple internal compute units, internal load balancing and scheduling is also required
  4. Overload/Underload threshold problem — given ρi\rho_i, τhigh\tau_{\text{high}}, τlow\tau_{\text{low}}, determine node status and which neighbor to offload to