Introduction
Fog computing is designed to extend cloud services to the network edge, significantly reducing latency for IoT applications. However, a major challenge lies in the dynamic nature of fog nodes—such as smartphones and vehicles—which join and leave the network unpredictably. Traditional approaches often assume a static or pre-known topology, which is unrealistic in mobile environments. This paper addresses the Online Fog Network Formation problem: how a primary fog node can optimally recruit neighboring nodes for distributed computing without knowing the capabilities or arrival times of future potential partners.
System Architecture and Methodology
The authors propose a hybrid fog-cloud architecture where a task-initiating node (Fog node $i$) can process tasks locally, offload them to recruited neighboring fog nodes, or send them to a remote cloud via a base station.
To model realistic network behavior, the framework employs M/D/1 queueing models for both wireless transmission and hardware computation. This ensures that the time tasks spend waiting in queues is accounted for in the total latency calculation. The core of the recruitment process is an adaptation of the classic Online Secretary Problem, specifically the "k-secretary" variant, which provides a mathematical foundation for making optimal hiring decisions under uncertainty.
The recruitment algorithm operates in two distinct stages:
- Exploration Stage: The initiating node observes the first $\tau$ arriving neighbors to establish a performance baseline (threshold) without recruiting them.
- Exploitation Stage: The node recruits the next $J$ neighbors whose performance metrics exceed the established baseline.
Once nodes are selected, an interior-point method is used to solve the task distribution problem. A key theoretical result (Proposition 1) demonstrates that to minimize maximum latency, the workload should be distributed such that latency is equalized across all participating nodes (local, neighbors, and cloud).
Performance and Key Insights
The framework's effectiveness was evaluated through extensive numerical simulations in a dynamic environment. A critical finding is the "Sweet Spot of Cooperation." While adding more fog nodes reduces pure computational latency, it also increases management overhead—the time cost associated with maintaining multiple queues and coordinating distribution.
As shown in Figure 2, the total cost (latency plus overhead) is typically minimized when a moderate number of neighbors (approximately 4–6) are recruited. Beyond this point, the overhead begins to outweigh the marginal gains in computational speed.
Key Results
- Near-Optimal Efficiency: Despite having no prior knowledge of future node arrivals, the online algorithm's total cost is only 2.7% higher than an ideal offline solution with perfect hindsight.
- Competitive Performance: In 50% of simulated cases, the algorithm achieved at least 94.2% of the optimal value, and in over 16% of cases, it identified the exact same optimal set of nodes as the offline benchmark.
- Adaptive Offloading: The system naturally adapts to environmental changes. For instance, as the distance to the cellular base station increases from 200m to 600m, the framework automatically reduces cloud offloading by 28.8%, shifting more workload to the now-more-efficient local fog network.
Conclusion
This research provides a robust mathematical bridge between online decision theory and fog network formation. By treating node recruitment as a secretary problem, the framework achieves near-optimal latency reduction in highly dynamic environments. Future work will explore dynamically adjusting the target number of neighbors based on real-time traffic and incorporating energy efficiency constraints for battery-powered edge devices.
Summary updated