Mobile Cloud, Edge and Distributed ComputingIntroduction and ContextMobile devices support increasingly demanding applications: augmented reality (AR), autonomous navigation, industrial inspection, collaborative robotics, immersive video, health monitoring and artificial-intelligence (AI) inference. Their processors, batteries, storage and thermal capacity are limited, while wireless links are variable and often shared. Cloud computing provides abundant computation and storage, but a distant cloud data centre may introduce unacceptable delay, backhaul traffic and privacy exposure. Mobile cloud, fog and multi-access edge computing (MEC) address this tension by distributing computation, data and services across device, access network, edge and central-cloud layers. The central engineering question is not simply whether computation should be moved to the cloud. It is where each task should execute, when it should execute, what data should be cached, how services should be placed and how the resulting latency, energy, cost, reliability, privacy and resource utilisation should be balanced. This chapter develops those ideas at postgraduate level and treats offloading as a systems optimisation problem rather than as a single networking technique. Learning ObjectivesAfter studying this chapter, the reader should be able to: 1. Distinguish mobile cloud, fog and MEC architectures and explain their roles. 2. Formulate computation-offloading decisions using latency and energy models. 3. Evaluate service placement, caching and orchestration strategies. 4. Explain containers, microservices and serverless execution in edge environments. 5. Analyse latency–energy–cost–reliability trade-offs. 6. Design and critique an edge-enabled application architecture. 7. Identify security, privacy, governance and research challenges. 1. Architectural Foundations1.1 Mobile cloud computingMobile cloud computing (MCC) enables a mobile device to use remote virtualised resources for computation, storage or application services. In a traditional cloud-centric design, a device communicates through a radio access network and the Internet with a regional or central data centre. The cloud offers elasticity, mature orchestration, high availability and economies of scale. However, round-trip delay, congestion, dependence on wide-area connectivity and data-residency concerns can make full centralisation unsuitable. MCC includes several patterns: - Computation offloading: transferring executable work from a device to a remote server.
- Cloud storage and synchronisation: keeping large or shared data in remote infrastructure.
- Cloud-hosted mobile applications: presenting a mobile interface while processing occurs remotely.
- Cloud-assisted sensing: aggregating and analysing measurements from many devices.
Offloading is beneficial when the communication and waiting overhead is smaller than the local execution burden. It is not automatically beneficial for small tasks, intermittent connectivity or energy-efficient local accelerators. 1.2 Fog computingFog computing extends cloud capabilities toward the network edge through a distributed, hierarchical and often heterogeneous set of nodes. Fog nodes may include routers, gateways, access points, base stations, campus servers, vehicles and local micro-data centres. Fog is a broad architectural paradigm: it may involve multiple administrative domains and supports computation, storage, networking and control close to data sources. Fog is particularly useful for geographically distributed Internet-of-Things (IoT) systems. A local fog node can filter sensor data, detect events and coordinate actuators without sending every raw sample to a distant cloud. The cloud remains valuable for global analytics, model training, archival storage and cross-site optimisation. 1.3 Multi-access edge computingMEC is a standardised network-edge approach associated especially with telecommunications infrastructure. MEC places application platforms and services at or near access networks, including cellular base stations and 5G network sites. The term “multi-access” reflects support for more than mobile cellular access, including Wi-Fi and other access technologies. MEC can expose radio and location information, traffic steering, local breakout and APIs for applications. These capabilities support context-aware services, vehicle coordination, video analytics and low-latency industrial control. MEC does not eliminate the cloud; it creates an intermediate execution tier between devices and larger regional or central clouds. 1.4 A layered continuumA useful model is a computing continuum: 1. Device layer: sensors, smartphones, vehicles, robots and embedded controllers. 2. On-premise or gateway layer: local gateways and industrial computers. 3. Access-edge layer: MEC servers, base-station sites and Wi-Fi edge nodes. 4. Regional fog or cloud layer: metropolitan facilities with greater capacity. 5. Central cloud layer: large-scale data centres for elastic and global workloads. The layers differ in capacity, delay, energy price, mobility, trust, availability and operational control. A robust design permits tasks and data to move among layers according to application requirements. 2. Computation Offloading Models2.1 Task characterisationAn offloading decision begins with a task model. Important attributes include: - input and output data sizes;
- required CPU cycles or accelerator operations;
- precedence relationships with other tasks;
- deadline and tolerable jitter;
- privacy and location constraints;
- mobility and migration requirements;
- tolerance of approximation or stale data;
- communication reliability and security requirements.
A task may be independent, sequential, parallelisable or part of a directed acyclic graph (DAG). A complete application is therefore often better represented as a DAG than as one indivisible job. For example, video capture, decoding, object detection, tracking and display form a pipeline whose stages may be distributed across device and edge. 2.2 Local executionLet a task require C CPU cycles and let the mobile processor operate at frequency f_d cycles per second. Under the simplified constant-frequency model, local execution time is T_local = C / f_d. If the average effective dynamic-energy coefficient is k_d, a commonly used approximation is E_local = k_d C f_d^2. The approximation assumes that dynamic power is proportional to frequency cubed under the selected voltage–frequency relationship and that leakage, memory and peripheral energy are either negligible or absorbed into the model. Real processors may use multiple cores, dynamic voltage and frequency scaling, accelerators and non-negligible static power; measurements should replace this approximation when accuracy matters. 2.3 Remote executionFor a single offloaded task, the total delay can be represented as T_remote = T_up + T_queue + T_exec,e + T_down, where T_up and T_down are uplink and downlink transfer times, T_queue is server or network waiting time, and T_exec,e is execution time at the edge or cloud. If payload size S bits is transmitted at effective rate R bits/s, then T_tx = S/R, provided that protocol overhead, retransmission and scheduling effects are incorporated in the effective rate. Thus, for input size S_in, output size S_out and edge execution requiring C cycles at frequency f_e, T_remote = S_in/R_up + T_queue + C/f_e + S_out/R_down. This expression omits propagation delay and control-plane setup; these should be added when material, especially for wide-area cloud access or connection establishment. The device’s communication energy can be approximated by E_comm = P_tx(S_in/R_up) + P_rx(S_out/R_down), where P_tx and P_rx are average transmit and receive powers. Idle, radio-tail and cryptographic processing energy may also be significant. Offloading is attractive for delay when T_remote < T_local and for device energy when E_comm plus any local coordination energy is less than E_local. A task can therefore be faster but not more energy efficient, or more energy efficient but not faster. 2.4 Binary, partial and cooperative offloadingIn binary offloading, the complete task executes either locally or remotely. It is simple and suitable for indivisible workloads. In partial offloading, a task is divided into components. Independent or parallel components may be placed at different tiers, while precedence constraints determine feasible schedules. In cooperative offloading, several edge nodes or devices share execution, storage or intermediate results. For a DAG, the completion time is determined by critical-path dependencies, not merely by the sum of individual execution times. Data transfer between differently placed components introduces additional edges. Excessive fragmentation can therefore increase overhead and reduce the benefit of parallelism. 2.5 Multi-objective optimisationA simplified utility objective may be written as J = w_T T + w_E E + w_C Cost + w_R Risk, where weights express application priorities and all terms are normalised to comparable scales. The formulation is useful for design exploration, but weights are not universal truths. A safety-critical control loop may impose a hard deadline and reliability constraint instead of merely assigning a high latency weight. A constrained formulation is often more defensible: minimise Cost or energy, subject to T ≤ D, availability ≥ A_min, privacy requirements, capacity limits and placement constraints. The decision variables may include execution location, CPU allocation, bandwidth, replica count, cache contents and migration actions. Such problems are generally mixed-integer and non-convex. Practical solutions include integer programming for small instances, convex relaxation, heuristics, Lyapunov optimisation for time-varying systems, reinforcement learning and distributed auctions. Learning-based policies require careful treatment of exploration, safety, distribution shift and explainability. 3. Service Placement and Caching3.1 Placement principlesService placement determines which edge or cloud nodes host application components and how many replicas exist. The decision should consider: - user and device mobility;
- demand locality and demand variability;
- compute, memory, storage and accelerator capacity;
- network topology and backhaul congestion;
- startup and migration time;
- data sovereignty and trust zones;
- resilience and failure domains;
- energy and monetary cost.
Placing a component near users reduces network delay, but placing it too close to a sparse or mobile population can waste capacity. Replication improves availability and mobility support but increases state-consistency and operational cost. Stateful services require special attention. A stateless inference front end can be replicated easily, whereas a transactional service, session store or digital twin may require partitioning, replication protocols or controlled state migration. “Move the container” does not by itself move persistent state, network identity or accelerator context. 3.2 Caching at the edgeCaching stores frequently requested content or reusable computation results near consumers. It can reduce backhaul traffic and response time. Cacheable objects include video segments, software packages, map tiles, AI models, feature vectors and inference results. A basic cache policy may rank objects by popularity, size, freshness and retrieval cost. Least recently used (LRU) exploits temporal locality; least frequently used (LFU) exploits long-term popularity. Edge workloads often have non-stationary and location-dependent demand, so adaptive policies can outperform static rankings. Caching computation results requires a validity model. A result is safe to reuse only when the input, model version, context and permitted staleness match the request. Privacy-sensitive data should not be placed in a shared cache without isolation and access control. Cache poisoning, stale content and side-channel leakage are important risks. 3.3 Mobility-aware placementWhen users move between cells, an application may experience increased latency or repeated service migration. Options include proactive replication along a predicted route, state synchronisation among edge sites, or routing requests to a stable regional service. Prediction errors can make proactive replication more expensive than reactive placement. Mobility management should therefore use confidence thresholds and retain a cloud fallback. 4. Orchestration, Containers and Microservices4.1 Edge orchestrationOrchestration coordinates deployment, scaling, scheduling, networking, monitoring and recovery across heterogeneous nodes. Unlike a central cloud cluster, edge infrastructure is geographically distributed, capacity-constrained and intermittently connected. A useful orchestrator must understand placement constraints, topology, radio conditions, accelerators, energy budgets and trust domains. The control loop typically includes telemetry collection, demand prediction, decision making, deployment or migration, and verification. Excessively frequent re-optimisation creates control overhead and service instability. Practical systems use hierarchical orchestration: local controllers handle fast decisions, while regional or global controllers coordinate policy and long-term capacity. 4.2 Virtual machines, containers and unikernelsVirtual machines provide strong isolation and package a guest operating system, but their images and startup times can be relatively large. Containers share the host kernel and usually start faster with lower overhead, making them attractive for edge placement. However, containers do not provide the same isolation boundary as separate kernels; kernel vulnerabilities and misconfiguration remain concerns. Unikernels and lightweight virtual machines offer alternative points in the isolation–overhead design space. Container suitability depends on more than startup speed. Image distribution, vulnerability scanning, persistent storage, networking, observability, accelerator access and cold-start frequency may dominate performance. Images should be minimal, signed, scanned and obtained from trusted registries. 4.3 Microservices and serverless functionsMicroservices decompose an application into independently deployable services with explicit interfaces. This supports selective scaling and placement—for example, locating an object detector at the edge while keeping long-term analytics in the cloud. The disadvantages are additional network hops, distributed tracing complexity, consistency challenges and larger attack surface. Serverless functions provide event-triggered execution with provider-managed scaling. They can suit bursty workloads, but cold starts, limited execution duration, state externalisation and unpredictable placement may conflict with stringent latency requirements. Function chaining at the edge must account for inter-function data movement, not only individual invocation time. 5. Latency, Energy, Cost and Reliability Trade-offsLatency has several components: sensing and preprocessing, queueing, radio access, transmission, routing, execution, storage access, synchronisation and rendering. Mean latency alone is insufficient for interactive or control applications; tail latency, such as the 95th or 99th percentile, may determine user experience and safety. Energy is consumed by device computation, radio transmission and reception, edge processing, cooling and embodied infrastructure. Offloading shifts energy rather than eliminating it. A device with an efficient neural accelerator may consume less energy locally than it would transmitting raw data. Cost can include cloud or MEC usage, bandwidth, storage, migration, energy, operations and service-level penalties. A low-latency edge design may require more replicas and therefore have greater cost than a central cloud design. Reliability also has multiple dimensions: node availability, network reachability, software correctness, data durability and recovery time. A useful decision process is: 1. Define hard requirements, such as deadline, privacy class and minimum availability. 2. Measure workloads and network conditions rather than relying on nominal specifications. 3. Enumerate feasible device, edge and cloud placements. 4. Estimate expected and tail latency, energy, cost and failure behaviour. 5. Test sensitivity to mobility, demand surges and link degradation. 6. Select a policy with fallback and observe it continuously. 6. Worked Example: Offloading a Video-Inference TaskConsider an illustrative task requiring C = 1.2 × 10^9 cycles. A device executes at f_d = 1.5 × 10^9 cycles/s. The input frame is S_in = 1.6 Mbit and the compressed output is S_out = 0.08 Mbit. The uplink and downlink effective rates are 20 Mbit/s and 40 Mbit/s. An edge server executes at f_e = 8 × 10^9 cycles/s, and queueing time is 12 ms. Ignore propagation and protocol setup for this comparison. Local time is T_local = (1.2 × 10^9)/(1.5 × 10^9) = 0.8 s = 800 ms. Remote time is T_remote = 1.6/20 + 0.012 + 1.2/8 + 0.08/40 seconds = 0.08 + 0.012 + 0.15 + 0.002 = 0.244 s = 244 ms. Under the stated assumptions, edge execution reduces execution delay by 556 ms. If the application deadline is 300 ms, edge placement satisfies the deadline whereas local execution does not. If the uplink rate falls to 4 Mbit/s, uplink time becomes 0.4 s and total remote time becomes 564 ms; offloading then violates the deadline. The example demonstrates why offloading policies must react to radio conditions and retain a local degradation mode. 7. Applied Case: Illustrative Smart-Campus Safety SystemBackgroundConsider a fictional university campus using cameras, environmental sensors and mobile devices to detect smoke, crowding and hazardous access conditions. The system must issue local alerts quickly, preserve privacy and support historical analysis. ProblemSending all video to a central cloud creates backhaul load and exposes identifiable footage. Processing everything on cameras is infeasible because cameras have limited compute and must operate continuously. Demand also changes during events, and connectivity may fail in parts of the campus. AnalysisSmoke and crowd detection require low response time, while model training and long-term trend analysis tolerate delay. Raw video is privacy-sensitive and large; event metadata is smaller and more suitable for cloud aggregation. Camera locations and campus Wi-Fi create natural edge sites, but edge servers have finite accelerator capacity. Approach and solutionA layered design performs initial motion filtering on cameras, runs object and smoke inference on nearby MEC servers, and sends only encrypted event metadata and selected evidence to a regional cloud. A campus orchestration layer places replicas near high-demand zones during events. Models are versioned and signed; only approved models are deployed. A cache stores model artefacts and frequently used map data at edge sites. If an edge node fails, traffic is redirected to a neighbouring site or a lower-fidelity local detector. Retention policies delete raw footage unless a documented incident requires preservation. The placement policy uses hard constraints for alert latency and privacy, then minimises energy and operating cost. Monitoring records end-to-end latency, false-alarm rates, accelerator utilisation, model version, cache hit rate and failover time. Human security staff remain responsible for interpreting alerts and initiating consequential action. Outcome and learning pointsThe design reduces unnecessary backhaul traffic and can respond faster than a cloud-only architecture. Its success depends not only on compute location but also on model quality, time synchronisation, secure updates, failover testing and governance. Edge AI should assist decision makers rather than silently automate high-impact decisions without accountability. 8. Security, Privacy, Governance and RegulationEdge systems enlarge the attack surface because many nodes are physically accessible and operated across administrative domains. Threats include device compromise, malicious containers, insecure orchestration APIs, model theft, cache poisoning, data inference, rogue edge nodes and denial of service. Best practice includes hardware-backed identity, secure boot, mutual authentication, least-privilege workload identities, encrypted transport and storage, signed images and models, admission control, network segmentation, continuous vulnerability management and tamper-aware logging. Remote attestation can help a controller verify that a node is running an approved software state, although attestation does not prove that the application itself is correct. Privacy engineering should minimise collection, process data locally where appropriate, redact or aggregate outputs, enforce retention limits and record lawful purposes. Federated learning can reduce raw-data movement, but gradients may leak information and require secure aggregation, differential privacy or other protections. These mechanisms introduce accuracy, computation and latency costs. Governance must address data residency, cross-border transfer, consent, access rights, auditability, incident response and responsibility across telecom operators, cloud providers, application owners and device manufacturers. In regulated domains such as health, finance and critical infrastructure, technical placement decisions must be aligned with applicable law and sector standards. 9. Contemporary Developments and Research DirectionsCurrent research explores integrated terrestrial and non-terrestrial networks, collaborative edge intelligence, digital twins, programmable data planes, confidential computing and 6G service architectures. AI is increasingly used for workload prediction, placement, anomaly detection and radio-resource control. Nevertheless, a learned controller should be evaluated against baselines under unseen mobility and demand patterns, with safety constraints and rollback mechanisms. Digital twins combine sensor streams, simulation and state estimation, creating strong requirements for synchronisation, provenance and bounded staleness. Edge generative AI introduces large-model placement questions: quantisation, distillation, split inference, model caching and accelerator sharing can reduce cost, but model confidentiality, hallucination risk and energy use require explicit controls. Research challenges include standardised benchmarks, reproducible experiments, tail-latency modelling, multi-tenant fairness, carbon-aware placement, resilient federated orchestration and economically sustainable MEC business models. Open testbeds are important because simulation often underrepresents radio variability, container interference and operational failures. 10. Design Best PracticesA professional design should: - begin with application deadlines, privacy classes and failure assumptions;
- partition workloads according to data dependencies, not fashionable architecture labels;
- measure actual radio, queueing, startup and migration behaviour;
- use edge selectively for latency-sensitive or data-local processing;
- keep cloud capacity for global analytics, durable storage and recovery;
- separate stateless compute from persistent state;
- use signed, minimal and regularly patched images;
- design graceful degradation and explicit failover;
- monitor tail latency, energy, cost, cache effectiveness and accuracy;
- test mobility, outages, demand surges and adversarial conditions;
- document accountability, retention and data-governance decisions.
Chapter SummaryMobile cloud, fog and MEC distribute computation and storage across a device–edge–cloud continuum. Computation offloading can reduce device execution time and energy, but communication, queueing and reliability overhead may reverse the benefit. Binary, partial and cooperative offloading provide different levels of flexibility, while DAG modelling captures dependencies among application components. Service placement must balance locality, mobility, capacity, state, resilience, privacy and cost. Edge caching reduces backhaul demand when content or computation results are reusable and sufficiently fresh. Orchestration coordinates heterogeneous resources; containers and microservices improve deployment flexibility but introduce isolation, state-management and observability challenges. Sound decisions evaluate latency—including tail latency—energy, cost, reliability and governance together. Secure, measurable and failure-aware designs are essential for practical edge computing, particularly when AI and sensitive data are involved. Key TermsMobile cloud computing: Use of remote cloud resources by mobile devices for computation, storage or services. Fog computing: Distributed computing and networking extended across nodes between devices and central cloud. Multi-access edge computing: Placement of application services near access networks for low-latency processing. Computation offloading: Transfer of a task or task component from a device to remote infrastructure. Binary offloading: Decision in which an entire task executes locally or remotely. Partial offloading: Division of a task so that components execute at different locations. DAG: Directed acyclic graph representing task dependencies. Service placement: Selection of nodes on which application components and replicas execute. Edge caching: Storage of content, models or reusable results near consumers. Orchestration: Automated coordination of deployment, scheduling, scaling, networking and recovery. Container: Lightweight packaged process environment sharing the host operating-system kernel. Microservice: Independently deployable service communicating through an explicit interface. Serverless computing: Event-driven execution in which infrastructure management is abstracted from the developer. Tail latency: High-percentile response time, such as the 95th or 99th percentile. Stateful service: Service whose correct operation depends on retained application state. Cold start: Delay required to initialise an inactive function, container or service instance. Federated learning: Collaborative model training that keeps primary training data at distributed sites. Digital twin: Computational representation synchronised with a physical object, process or environment. Service-level objective: Quantified target for performance, availability or reliability. Review QuestionsShort Answer Questions1. Distinguish fog computing from MEC. 2. Why can offloading reduce energy but increase latency? 3. What is the purpose of edge caching? 4. State two challenges associated with stateful service placement. 5. Why is tail latency important in interactive edge applications? Long Answer Questions1. Explain the device–edge–cloud continuum and evaluate the role of each layer. 2. Derive and discuss a remote-execution latency model, including its assumptions and limitations. 3. Compare virtual machines, containers and serverless functions for edge deployment. 4. Discuss mobility-aware service placement and the trade-off between proactive replication and reactive migration. 5. Explain security, privacy and governance requirements for a multi-tenant MEC platform. Analytical / Application Questions1. A task requires 600 million cycles and runs locally at 1.2 GHz. An edge server runs it at 6 GHz. The input is 4 Mbit, output is 0.1 Mbit, uplink is 16 Mbit/s, downlink is 20 Mbit/s and queueing is 10 ms. Calculate local and edge latency, ignoring propagation and setup, and decide whether a 500 ms deadline is met. 2. Design a placement and caching policy for a mobile AR application whose users move between access points. Identify the state, model, content and failure information that the policy must manage. 3. For a campus safety system, determine which processing stages should remain on cameras, which should run at the edge and which should run in the cloud. Justify the decision using latency, privacy, cost and reliability. Multiple Choice Questions with AnswersQuestion 1Which statement best describes MEC? A. It places application services near access networks B. It requires all computation to occur on mobile devices C. It is limited to archival cloud storage D. It removes the need for wireless networks Correct Answer: A. It places application services near access networks Question 2Under the simplified model, local execution time for C cycles at frequency f is: A. C f B. f/C C. C/f D. C + f Correct Answer: C. C/f Question 3Which factor directly increases remote execution latency in the stated model? A. Lower input payload size B. Higher uplink rate C. Lower edge queueing time D. Larger output payload size Correct Answer: D. Larger output payload size Question 4What is a principal advantage of edge caching? A. It guarantees that all data is current B. It reduces backhaul traffic for reusable content C. It eliminates the need for access control D. It makes every service stateless Correct Answer: B. It reduces backhaul traffic for reusable content Question 5Why can excessive microservice decomposition harm edge performance? A. It removes all scalability B. It prevents independent deployment C. It may introduce additional network hops and coordination overhead D. It guarantees larger cache capacity Correct Answer: C. It may introduce additional network hops and coordination overhead Question 6A task requires 900 million cycles and runs locally at 1.5 GHz. Ignoring all other delays, what is its local execution time? A. 0.06 s B. 0.6 s C. 1.5 s D. 2.4 s Correct Answer: B. 0.6 s Question 7Which workload is generally most suitable for central cloud execution rather than immediate edge execution? A. A safety alert with a strict local deadline B. Raw sensor filtering during a disconnected period C. Long-term historical analytics with relaxed delay D. Robot collision avoidance Correct Answer: C. Long-term historical analytics with relaxed delay Question 8What is a key security limitation of ordinary containers? A. They cannot package applications B. They always require a separate physical server C. They share the host kernel D. They cannot be monitored Correct Answer: C. They share the host kernel Question 9Why must cache validity include model version or context for AI inference results? A. Because reusable results may become incorrect when these conditions change B. Because caches only store network addresses C. Because model version determines radio frequency D. Because context has no effect on inference Correct Answer: A. Because reusable results may become incorrect when these conditions change Question 10Which design principle is most appropriate for an edge safety system? A. Depend on one edge node without fallback B. Send all raw data to the cloud by default C. Use signed models, monitoring and graceful degradation D. Disable auditing to reduce latency Correct Answer: C. Use signed models, monitoring and graceful degradation
|