Edge Computing
- Definition: Processing and computing client data closer to the data source rather than on a centralized server or cloud-based location
- Brings computing resources, data storage, and enterprise applications closer to where people consume information
- Has the ability to unleash the full potential of 5G
- Enables data localization and ultra-low latency
- Addresses security and privacy concerns
- Reduces the load on networks
- When combined with 5G, edge enables: VR/AR, gamification, drone control, connected cars, real-time collaboration
Think of Edge Computing like 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).
5G vs 6G Comparison
| Feature | 5G | 6G |
|---|---|---|
| Peak Data Rate | Up to 10 Gbps | Up to 1 Tbps (100× faster) |
| Latency | ~1 ms | < 0.1 ms |
| Frequency Band | Sub-6 GHz, mmWave (24–100 GHz) | Terahertz (THz) (100 GHz – 1 THz) |
| Spectrum Efficiency | High | Ultra-high (AI optimized) |
| Connection Density | ~1M devices/km² | 10M+ devices/km² |
| Reliability | Ultra-reliable (URLLC) | Near-perfect (99.99999%+) |
Use Cases
- 5G: Smart cities, Autonomous vehicles, Remote surgery, Industrial IoT (IIoT), AR/VR
- 6G: Holographic communication, Tactile Internet (real-time touch feedback), Brain-computer interfaces, Fully immersive Metaverse, Digital twins, Ultra-precision remote control
Edge Computing (Detailed)
- Deploys compute resources (processing, storage) at or near the data source
- e.g., smart sensors, gateways, base stations
- Goal: minimize latency and bandwidth usage
- Pros:
- Low latency
- Bandwidth-efficient
- Enhances privacy (data stays local)
- Use Cases:
- Real-time video analytics in smart surveillance
- Predictive maintenance in industrial IoT
- AR/VR applications with low round-trip times
- Key Difference from Fog: Edge computing occurs directly on the devices where sensors are placed, or on a gateway physically close to sensors
- Advantages: Optimizes connection, improves response time; security is enhanced with data encryption closer to the core of the network
Edge Computing Architecture (3 Layers)

- Device Layer — Sensors & Controllers (data origination)
- Edge Layer — Edge Node/Server
- Data processing & Reduction
- Data caching & buffering
- Control response
- Virtualization
- Cloud Layer — Cloud Server
- Big data processing
- Data warehousing
มี Edge layer (node) ไว้ลด latency
EDGE vs. Cloud

| Edge | Cloud | |
|---|---|---|
| Strengths | Low latency, Reduce backhaul, Data localisation | Scalability, Mobility, Light Device |
| Together | Hybrid IT Environment | Hybrid IT Environment |
Mist Computing
- Definition: Pushes computation to the extreme edge — to the end devices themselves (smart sensors, microcontrollers, embedded systems)
- Also called "nano-edge" computing
- Characteristics:
- Devices perform preprocessing or lightweight analytics
- Supports actuation and autonomous decision-making without upstream communication
- Often coupled with battery-powered or constrained devices
- Pros:
- Real-time responsiveness
- No need for constant connectivity
- Local autonomy (fail-safe operations)
- Use Cases:
- Smart thermostats performing temperature regulation
- Wearables filtering health data before sending summaries
- Drones performing on-board obstacle detection
- Relationship with Fog: Complementary — computationally intensive tasks → Fog (gateway); less intensive tasks → Mist (end devices)
- Hardware: Processing capability comes from microchips or microcontrollers embedded on the device → very limited processing
Mist is like a person making quick decisions on the spot (edge of the edge), while Fog is the supervisor nearby who handles more complex decisions, and Cloud is HQ far away.
It’s resource constrained device, computed on device, limitation on computation power!
Fog Computing
- Term coined by Cisco in 2014
- Fog and cloud computing are interconnected
- In nature: fog is closer to the earth than clouds
- In tech: fog is closer to end-users, bringing cloud capabilities down to the ground
- Fog = the layer below the cloud layer, managing connections between cloud and network edge
- Key Difference vs Cloud:
- Cloud = centralized system
- Fog = distributed decentralized infrastructure
Fog is like a network of local warehouses (fog nodes) spread across a city, handling deliveries close to customers, while the central factory (cloud) handles large-scale production and long-term storage.

Characteristics of Fog Computing
- A paradigm that extends Cloud computing to the edge of the network
- Low latency & location awareness
- Sends the right data to the cloud for big data analytics and storage
- Wide-spread geographical distribution
- Strong presence of streaming and real-time applications
- Handles an unprecedented volume, variety, and velocity of data
- Heterogeneity of connected objects
- Fog applications communicate directly with mobile devices
- Predominant role of wireless access
Fog as a Platform
- Fog = the distributed, hierarchically organized platform where the Internet meets the physical world at the Machine-to-Machine (M2M) scale
- Properties:
- Service Mobility — ability to migrate a running instance from cloud to edge
- Mixed ownership & operation — single entity or federation of agencies
- Fog Nodes can be multi-tenant — shared, public or private (like cloud)
- North/South Flows — between fog and cloud/devices
- East/West Flows — between fog nodes laterally
- Highly virtualized environment — secured & isolated tenants, QoS, workload distribution
Taxonomy of Fog Computing
[Image: Taxonomy of Fog Computing tree diagram]
Main branches:
- Fog Nodes Configuration: Servers, Networking devices, Cloudlets, Base stations, Vehicles
- Nodal Collaboration: Cluster, P2P, Master-slave
- Resource/Service Provisioning Metrics: Time (Communication, Computation, Deadline), Data (Flow, Size), Cost (Networking, Deployment, Execution), Context (User, Application), Energy & Carbon footprint
- Service Level Objectives: Latency Mgmt, Cost Mgmt, Network Mgmt (Congestion, Virtualization, Connectivity), Computation Mgmt (Resource Estimation, Workload Allocation, Coordination), Application Mgmt (Programming Platform, Scaling, Offloading), Data Management, Power Management
- Applicable Networking System: IoT, Mobile network/RAN, LRPON/PLC, Vehicular Network, CDN
- Security Concern: Authentication, Encryption, Privacy, DoS Attack
Benefits of Fog Computing
- Industries using fog: Energy, Manufacturing, Construction, Oil and Gas, Transportation, Finance, Telecommunication, Healthcare, Retail, Smart Cities, Agriculture
- Fog Benefits:
- Ultra-low latency
- Location awareness
- Efficiency in network load
- High bandwidth
- Security
- Real-time analytics
- Agility
- Fog distributes core functions: Computation, Storage, Communication, Control, Decision Making
- Fog helps devices: Measure, Monitor, Process, Analyze, React
Components of Fog Computing Platform
[Image: Fog Computing Platform architecture diagram]
FC Software Stack (Simplified)
Business Applications
├── Cloud Infrastructure Software (Portals, Services, Resources/tools)
├── Fog Management Software (Life cycle mgmt, Orchestration, APIs/SDKs)
├── Fog Infrastructure Software (Execution env, Operating system, Virtual network functions)
└── Fog Hardware (Networking, Compute, Storage)
↕
Things
Cross-cutting concerns: Policy/Security | Analytics and data models
Technology Components for Scalable Virtualisation
- Computing — requires selection of hypervisors to virtualise both computing and I/O resources
- Storage — needs a Virtual File System and a Virtual Block and/or Object Store
- Networking — needs a Network Virtualisation Infrastructure (e.g., SDN, NFV)
- Fog leverages policy-based orchestration and provisioning mechanism on top of the resource virtualisation layer
- Fog architecture should expose APIs for application development and deployment
HW/SW Components
Heterogeneous Physical Resources
- Fog = heterogeneous infrastructure of FCNs (servers, routers, APs, set-top boxes) + multiple wireless access technologies
- Needs an abstraction layer on top
Fog Abstraction Layer
- Hides platform heterogeneity
- Exposes a uniform and programmable interface for seamless resource M&C
- Provides generic APIs and virtualisation support
- Supports multi-tenancy
Fog Service Orchestration Layer
- Provides dynamic, policy-based life-cycle management of Fog services
- As distributed as the underlying Fog infrastructure and services
Management of Services — Components
- A SW agent, Foglet (FSA) — bears the orchestration function and performance requirements
- A distributed, persistent storage to store policies and resource meta-data (capability, performance, etc.)
- A scalable messaging bus for service orchestration and resource management
- A distributed policy engine with a single global view and local enforcement
Foglet Software Agent (FSA)
- The distributed Fog orchestration framework — implemented by several FSAs, one running on every node
- Uses abstraction layer APIs to monitor health and state associated with the PHY machine and services deployed on it
- Performs life-cycle management activities
Distributed Database (DDB)
- Fast storage and retrieval of data
- Stores both application data and meta-data to aid in Fog service orchestration
Policy-Based Service Orchestration
- e.g., policy-based service routing — routing an incoming service request to the appropriate service instance
- Examples of policies: thresholds, QoS requirements, config policies, power management, security, isolation, privacy
- The policy manager = central element
- Business policies are pushed to a distributed policy database
Message BUS
- Messaging infrastructure that allows different systems to communicate through a shared set of interfaces
Pushing Intelligence Up Toward The Cloud
| Cloud Challenges | How Fog Can Help |
|---|---|
| Critical Latency Req. | Fewer Network hops |
| Data Rich Mobility | Data locality & Local Caches |
| Geographic Diversity | Intelligence localized as appropriate |
| Network Bandwidth limit. | Local processing / less core Net. Load |
| Reliability/Robustness | Fast Failover; local resp. in Emergency |
| Analytics Challenges | Analytics & Storage at the Right Tier |
| User Data/Geo. Privacy | Fog can Aggregate User Data |
Pushing Intelligence Downward to the Endpoints
| Intelligent Endpoint Challenges | How Fog Can Help |
|---|---|
| Physical Constraints (Energy/Power, Space, Environment) | Fog nodes can access more energy; Fog Nodes can be physically larger; Better cooling systems |
| Functional Constraints (Processor throughput, Storage, Reliability, Modularity) | Terabytes > PB storage cap.; Fog capabilities can be more redundant; Modules can be added as needed |
| Security Constraints | Fog has better physical/network security |
IoT with Fog Computing
Architecture (bottom to top):
- Device → Local data collection
- FOG (IOx) → Local data analysis and filtering
- Data Center/Cloud → Non-real-time data action, storage
What You Can Do:
- Analyze and act on data right at the network edge
- Use bandwidth and storage capacity more efficiently — sending only relevant information to the cloud
- Connect any protocol or device through an open platform
Data Flow: Today vs Tomorrow
- Today: Large data volume flows from edge to core (data refining at each tier)
- Tomorrow: Analytics algorithms become slimmer as we move to edge
Fog Data Services
- Coordinates the movement of data from Fog to Cloud
- Fog Nodes receive: Large Volume of Data, Wide Variety of Things, High Velocity of Data Generation
- Fog Data Services apply: Rules, Patterns, Actions
- Data Reduction
- Control Response
- Data Virtualization/Standardization
- Sends up to Cloud: Virtualized Data, Historic/Predictive Analysis, Machine Learning
- Cloud sends back: Rule and Pattern Updates
Computing Paradigms Comparison
[Image: Comparison of infrastructure of fog computing and related computing paradigms from the networking perspective]
Paradigms shown: Mobile Computing, Mist Computing, Mobile Cloud Computing, Mobile Edge Computing (Cloudlet), Fog Computing, Cloud Computing, Mobile ad hoc Cloud Computing
Comparative Summary: Mist vs Edge vs Fog
| Feature | Mist Computing | Edge Computing | Fog Computing |
|---|---|---|---|
| Location | On the IoT device | Near the device (e.g., AP) | Intermediate (gateway/server) |
| Latency | Lowest (µs–ms) | Low (ms) | Moderate (ms–s) |
| Resources | Very limited | Moderate | High |
| Connectivity | Intermittent | Localized | Aggregated/distributed |
| Ideal for | Autonomy, fail-safe ops | Local processing | Contextual orchestration |
Offloading: F2F and F2C

Criteria ในการจะ offload ก็คือ load ไง ถ้า 80% ก็ส่งไปให้อีกอันทำงานแทน
ออก #FinalExam เรื่องนี้!!!!!!!
F2F (Fog-to-Fog) and F2C (Fog-to-Cloud) Offloading
- End-users upload task to primary fog node (ith fog node)
- If overloaded → offload to:
- F2F: assistive jth fog node via wired link
- F2C: the Cloud via wireless link
Fog2Fog Load Sharing
Fog Nodes: — collection of all fog nodes in the system
Node Parameters:
- → Current load of node
- → Capacity of node
Utilization:
Load Status:
- Overloaded:
- Underloaded:
Think of like CPU usage percentage — if it goes above a high threshold, the node is "overloaded" and needs to delegate tasks to a less busy neighbor.
Load Sharing Mechanism (4 Steps)
Step 1: Load Monitoring
- Each fog node periodically computes:
- Enables real-time system awareness
Step 2: Neighbor Discovery
- Define neighbor set:
- Only low-latency neighbors are considered
Step 3: Decision Rule
- If node is overloaded, find:
- Select candidate nodes with low utilization and acceptable latency
Step 4: Optimal Target Selection
- → weight for load balancing
- → weight for latency minimization
Task Offloading:
Load Sharing Strategies

Load is not sent to the cloud first — it is redistributed intelligently within the fog layer
- Threshold-based — trigger offloading when utilization exceeds a threshold
- Queue-based — based on queue length at each node
- Prediction-based — proactively offload before overload occurs
- Load-aware — continuously monitor and redistribute
- Priority-aware — high-priority tasks get preferential routing
Secure Task-Offloading Framework for Cooperative Fog (Blockchain-based)
Source: R. Roshan et al., GLOBECOM 2020
ออก #FinalExam ให้ ออกแบบ (design) algorithm เขียนเป็นแบบ sequence diagram F2F
เขียนเป็น Pseudocode ไรงี้

Phase 1: Joining and Registration on the Blockchain
- A node joining the fog network joins the blockchain
- Registered using unique credentials
- A registered fog node has its identity and registration timestamp as a transaction on the blockchain
- Uses Smart Contracts (programmable object/policy) in BC to:
- Authenticate fog nodes
- Handle communication between fog nodes
Phase 2: Secure Fog Node Selection
- Offloading decision is made when a fog-node lacks enough resources
- Choice of secondary fog node is based on rank of each fog node
- Rank = number of unique successful peer relations a fog node has established
- Rank increments whenever a fog-node successfully authenticates itself to a peer and a transaction is carried out
Rank Calculation:
- All new nodes begin with rank 0
- joining the network has rank 0 — no authenticated peer-relations yet
- If (rank > threshold) needs to offload to → mutual verification depends on the threshold
- verifies through the cloud token system; verifies directly via rank from smart contract → on success, both ranks are updated
- Rank value of a fog node is stored on the blockchain as a transaction
Phase 3: Token-Based Cloud Verification
- Used when a fog-node does not meet the required threshold for direct verification
- Uses Public Key Infrastructure (PKI)
- A fog-node verifies and validates the identity of a peer fog-node through the cloud, using a token
Verification Procedure:
- Every fog node obtains a pair of keys (public/private) through the PKI
- Let be the peer fog-node that must authenticate itself to via cloud
- requests a token from cloud at time
- Token computed by the cloud:
- is presented to and verified via the cloud for authenticity and freshness
Multi-Objective Task Scheduling in Fog (Movahedi et al., 2021)
Source: J Cloud Comp 10, 53 (2021)
Hierarchical Fog-Based Architecture
[Image: Hierarchical fog-based architecture model — IoT layer → Fog layer → Cloud layer]
Layers:
- IoT Layer: Sensor/actuator devices (ZigBee, Bluetooth, WiFi, LAN)
- Fog Layer: Fog cluster managers with fog nodes (MAN network, WiFi)
- Cloud Layer: Cloud manager + WAN network + compute/storage/task queue
Process of Handling IoT Task Requests (Scheduling)
[Image: Sequence diagram — IoT applications → initial fog cluster manager → scheduler fog cluster manager → fog/cloud nodes → IoT devices]
Flow:
- IoT applications send requests for IoT tasks execution to initial fog cluster manager
- Initial FCM forwards requests to scheduler FCM → tasks enqueued
- Scheduler FCM gets state info from fog/cloud nodes and IoT devices
- Scheduling process runs
- IoT tasks offloaded to selected fog/cloud nodes
Process of Task Execution
[Image: Sequence diagram — scheduler fog cluster manager → selected fog/cloud node → IoT devices]
Steps:
- IoT task offloading (scheduler → selected fog/cloud node)
- Get data (selected node → IoT devices)
- IoT devices send data back
- Task execution (may take more than one slot time)
- Output result of task execution → back to scheduler
Security Challenges in Fog Computing
[Image: Security challenges tree diagram]
Challenges Related to Architecture
- Trust
- Authentication
- Wireless Security
- End User's Privacy
- Malicious Attacks
Challenges Related to Techniques
- Models Privacy
- Volume and Variety
- Flexible
- Detection Methodology
- Cryptography Issue
Security Issues Inherited from Cloud
Potential security issues fog inherits:
- Data threats: Data Breaches, Data Loss
- Fog/Cloud layer threats: Advanced Persistent Threats, Access control issues, Account Hijacking, Denial of Service
- Platform threats: Insecure APIs, System and Application Vulnerabilities, Malicious Insiders, Insufficient Due Diligence, Abuse and Nefarious Use, Shared Technology Issues
Cloud vs. Fog — Comparison Tables
Data State Definitions
- Data at rest — stored in db/file
- Data in transit/motion/flight — data being transferred in the network
Table 1: Performance & Security
| Requirements | Cloud Computing | Fog Computing |
|---|---|---|
| Latency | High | Low |
| Delay Jitter | High | Very low |
| Location of Servers | Within Internet | At the edge close to Nodes |
| Distance (client & server) | Multiple hops | One hop |
| Security | Varies amongst providers | Can be more defined and customized |
| Attack on Data-in-Flight | High probability | Limited with less probability |
| Location awareness | No | Yes |
Table 2: Architecture & Connectivity
| Requirements | Cloud Computing | Fog Computing |
|---|---|---|
| Geo. Distribution | Centralized | Distributed |
| No. of Server Nodes | Few | Very large |
| Support for Mobility | Limited | Supported |
| Real Time Interactions | Supported but may be difficult & Costly | Supported |
| Type of last mile connectivity | Leased line | Wireless |
Relationship: Fog Computing, Cloudlet, and MEC

| Fog Computing | MEC | Cloudlet | |
|---|---|---|---|
| Operation mode | Connected to cloud | Standalone | Standalone or connected to cloud |
| Main driver | — | Industry consortium | Research and Development |
| Virtualization | Supported | VM or any other appropriate technology | VM |
| Target applications | Mobile offloading, better at edge, spanning cloud and edge | Mobile offloading, better at edge | Mobile offloading |
Common features of all three: Computing at the edge, Virtualization supported
Intranode ก็เป็นไปได้นะ สำหรับ Offloading, ก็แปลว่าใน node ก็จะมี computing node หลายตัวนั่นแหละ ข้างในก็จำเป็นต้องมี load balance, scheduling อีก (depend on nature of task) #FinalExam
Fog Milestone: OpenFog Consortium
- Founded by: ARM, Cisco, Dell, Intel, Microsoft, Princeton University
- Mission: Drive industry and academic leadership in fog computing architecture, testbed development, and a variety of interoperability and composability deliverables that seamlessly leverage cloud and edge architectures to enable end-to-end IoT scenarios
Pros and Cons
Cloud Computing — Pros for IoT
- Improved performance — faster communication between IoT sensors and data processing
- Storage capacities — highly scalable and unlimited storage; integrate, aggregate and share enormous data
- Processing capabilities — remote data centers provide unlimited virtual processing on-demand
- Reduced costs — license fees lower than on-premise equipment and maintenance
Fog Computing — Pros
- Low latency — geographically closer to users → instant responses
- No bandwidth problems — information aggregated at different points instead of one channel
- Loss of connection impossible — due to multiple interconnected channels
- High security — data processed by a huge number of nodes in a complex distributed system
- Improved user experience — instant responses and no downtimes
- Power-efficiency — edge nodes run power-efficient protocols (Bluetooth, Zigbee, Z-Wave)
Fog Computing — Cons
- More complicated system — fog is an additional layer in the data processing and storage system
- Additional expenses — companies must buy edge devices (routers, hubs, gateways)
- Limited scalability — not as scalable as cloud
F2F vs F2C — Decision Scenarios
- → F2C (Fog-to-Cloud): An application requires aggregating data from multiple cities worldwide and generating global insights → requires cloud-scale resources
- → F2F (Fog-to-Fog): Multiple fog nodes are processing real-time CCTV streams; one node is overloaded, nearby fog nodes have spare capacity → real-time object detection needs low latency, use F2F
- → F2C (Fog-to-Cloud): A manufacturing system needs to train a deep learning model using massive sensor data collected over weeks → requires massive cloud compute
Rule of thumb: If it needs real-time response → prefer F2F; if it needs global data or heavy compute → escalate to F2C.