Artificial Intelligence & Data Science is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Mobile computing: evolution, middleware and constraints

Overview of mobile computing: how it evolved (1G→5G), the role and types of middleware, and the key resource and network constraints that shape mobile systems.

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Mobile computing combines mobile devices, wireless networks and software so applications run when devices move and connect intermittently. Engineers use these ideas to design apps and systems that work with limited battery, variable bandwidth and changing connectivity, and to choose or build middleware that hides complexity (location, replication, disconnection) while meeting performance and consistency needs.

Key ideas

  • 1G — first-generation cellular: voice-only, analogue radio. (Draw: a base station connected to PSTN, label analogue link.)

  • 2G — second-generation: digital voice and low-rate data (e.g., SMS); introduced digital modulation and channel coding. (Draw: cellular cells, spectrum reuse.)

  • 3G — third-generation: higher data rates and packet services, better support for multimedia and internet access.

  • 4G — fourth-generation: all-IP packet-switched networks, higher spectral efficiency, mobile broadband (e.g., LTE family). Emphasise low-latency and IP service model.

  • 5G — fifth-generation: much higher throughput, lower latency, network slicing, device-to-device and massive IoT support. (Do not re-teach Layer details covered under other topics.) For exams, state the main service and technology shift for each generation: analogue→digital→packet data→all IP→ultra-reliable/low-latency and massive connectivity.

  • Middleware — software between applications and the OS/network that provides common services so applications need not implement them. Typical services: naming, discovery, communication (RPC, messaging), replication, caching, security and adaptation.

    • RPC (Remote Procedure Call) — abstraction to call a procedure on a remote host as if local: caller blocks, parameters marshalled, network call, return marshalled. State assumptions: reliable request/response path, server available.
    • RMI (Remote Method Invocation) — RPC extended for object-oriented systems (methods invoked on remote objects, may include remote references and callbacks).
    • Message-oriented middleware (MOM) — asynchronous exchange of messages via queues/topics (examples: publish/subscribe), useful for disconnected or intermittent links.
    • Thin client — client that does minimal processing; most logic runs on server. Good when client resources are limited but network is reliable. (Illustrate: draw client with UI only, server with application logic.)
    • Fat client (thick client) — client performs significant processing and can operate offline; good for reducing round-trips but needs local resources.
  • Middleware patterns for mobile systems:

    • Caching and replication — keep copies of data on device for offline use. Define cache consistency: guarantees about when cached data reflects server state (strong/causal/eventual consistency). Explicitly state trade-offs: strong consistency needs synchronization and costs bandwidth and latency; eventual consistency improves availability under partitions.
    • Adaptation — system changes behavior to fit current conditions (bandwidth, battery, CPU). Examples: reduce image quality, switch codecs, delay sync, or offload computation to edge/cloud when connectivity is good to save energy or reduce latency.
    • Context-awareness — middleware provides information about device context (location, connectivity, battery) to applications.
    • Disconnection handling — detect offline state, queue operations and reconcile when reconnected (store-and-forward, conflict resolution policies).
  • Constraints of mobile devices and wireless links (define and explain consequences):

    • Energy — battery-limited supply; affects CPU, radios, screen. Drives design optimisations (duty cycling radios, batching transmissions).
    • Bandwidth — limited and variable data rate and higher error rates due to fading/interference; affects throughput, retransmissions, and buffer sizing.
    • Latency — round-trip time (RTT) variable; important for interactive apps and for deciding synchronous vs asynchronous middleware.
    • Intermittency — links may drop; design must assume partitions.
    • Heterogeneity — devices with different CPUs, OSs, radio types; middleware must provide portability or adaptation.
    • Mobility — hosts change network attachment; affects addressing, session continuity and consistency; requires handover support (e.g., Mobile IP/Proxy Mobile IP) or middleware session-resumption mechanisms to maintain service.
    • Limited computation and memory — local caching, simplified algorithms.
    • Security & privacy — untrusted network, risk of eavesdropping and theft; middleware must offer authentication and encryption.
  • Draw the following diagrams in answers where asked:

    1. Protocol/middleware stack: vertical layers labelled Application -> Middleware services (naming, discovery, replication, adaptation, security) -> Transport (TCP/UDP) -> Network (IP) -> Link/MAC -> Physical (the OS provides these protocol stacks). Show arrows for control and data flows.
    2. Middleware architecture for replication: draw server(s), mobile client with local cache, queue for pending writes, and reconciliation process when reconnected. Label conflict resolution.

Formulas

E = V · I · t — energy (Joule) = voltage (V) times current (Ampere) times time (second). Use when computing energy consumed by a circuit over time. SI units: J = V·A·s.

t_hours = battery_Ah / I — lifetime in hours = battery capacity in ampere-hours divided by current in amperes. Use when current draw is roughly constant.

t_hours = (battery_Ah · V) / P — lifetime in hours = battery energy (Wh) divided by power (W). Here battery_Ah is ampere-hours, V volts.

BDP = bandwidth · RTT — Bandwidth-Delay Product in bits = link bandwidth (bits/s) times round-trip time (s). Use to size TCP windows and buffers. SI units: bits.

prop_delay = distance / c — propagation delay (s) = distance (m) divided by speed of light c ≈ 3·10^8 m/s. Use for lower-bound delay estimates on wireless links (verify environmental impacts).

Worked examples

  1. Bandwidth-Delay Product (BDP) for a mobile link Problem: A mobile device uses a wireless link with 10 Mbps bandwidth and an RTT of 120 ms. How large a send buffer to fully utilise the link? Show steps. Steps:
  • Formula: BDP = bandwidth · RTT.
  • Convert: bandwidth = 10 Mbps = 10×10^6 bits/s. RTT = 120 ms = 0.120 s.
  • Compute: BDP = 10×10^6 · 0.120 = 1.2×10^6 bits.
  • Convert to bytes: 1.2×10^6 bits / 8 = 150000 bytes ≈ 146.5 KiB. Answer: Buffer ≈ 150 kB (≈147 KiB) to fill the pipe.
  1. Battery lifetime estimate for a smartphone Problem: Smartphone battery 3000 mAh at 3.7 V. Device consumes 1.5 W on average. Estimate battery life in hours. Steps:
  • Battery energy = battery_Ah · V = 3.0 Ah · 3.7 V = 11.1 Wh.
  • Lifetime (hours) = battery energy (Wh) / power (W) = 11.1 Wh / 1.5 W = 7.4 h. Answer: ≈ 7.4 hours of continuous use at 1.5 W.

(If power draw varies, use average power or convert capacity to coulombs and integrate current over time.)

Common mistakes

  • Assuming continuous reliable connectivity; mobile systems must plan for partitions.
  • Mixing up middleware and transport protocols: middleware provides higher-level services (naming, replication), while transport protocols (TCP/UDP) are lower-level.
  • Treating consistency as a binary (either consistent or not) instead of understanding the models (strong, causal, eventual) and their trade-offs.

For your exam

Kinds of questions:

  • Definitions and short notes: define middleware, RPC/RMI, caching, consistency models, and list mobile constraints.
  • Diagrams: draw the middleware stack, client-server vs thin client architecture, or replication architecture with conflict resolution.
  • Derivations: derive BDP and show how to compute buffer sizes; derive battery lifetime from mAh and power.
  • Numerical problems: BDP calculations, battery life, propagation delay for given distance.
  • Design/analysis: given an app (e.g., photo sync), explain middleware choices (push vs pull, conflict resolution, offline mode, bandwidth saving strategies).

What a full-marks answer includes:

  • Clear definitions (bold term) and assumptions stated.
  • Proper units and conversions in numericals; show formula then substitute numbers with units, show intermediate steps.
  • Diagrams labelled with arrows and component names when asked.
  • Trade-off discussion for design questions (e.g., energy vs latency, consistency vs availability) and concrete middleware mechanisms to meet requirements.

Quick check

  1. What is the Bandwidth-Delay Product formula?
  2. Give one advantage of thin-client architecture in mobile settings.
  3. How do you compute battery lifetime in hours from mAh and average power in watts? Answers: BDP = bandwidth · RTT; thin-client advantage: reduces local computation and storage needs on resource-limited devices (centralised processing); battery lifetime = (battery_Ah · V) / P (hours) — convert mAh to Ah first.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?