Abstract
Internet of Things (IoT) deployments face increasing challenges in meeting strict latency and cost requirements while ensuring efficient resource utilization in distributed environments. Traditional offloading often overlooks the role of intermediate regional layers and mobility, resulting in inefficiencies in real-world deployments. To address this gap, we propose Public Edge as a Service (PEaaS) as an intermediate tier and develop RegionalEdgeSimPy, a Python simulator to model and evaluate this framework. It uses a Proximal Policy Optimization (PPO) scheduler that models mobility and considers multiple input parameters (e.g., network latency, cost, congestion, and energy). Tasks are first evaluated at the serving (Wireless Access Point (WAP)) for feasibility under utilization thresholds. This decision uses action masking to restrict invalid options, and a reward function that integrates latency, cost, congestion, and energy to guide optimal offloading. Simulations conducted with 10 to 3000 devices in a 10 × 10 Kilometers smart city area. Results show that PPo prioritizes Edge processing until over-utilization, after which workloads are offloaded to the nearest PEaaS, with Cloud used sparingly. On average, Edge achieves 75.8% utilization, PEaaS stabilizes near 52.9%, and Cloud remains under 1.2% when active. These findings demonstrate that the PPO scheduling significantly reduces delay, cost, and task failures, providing improved scalability for mobility in IoT big data processing.