Bachelors Program in Computer Science Engineering
Internet of Things
•
Bachelor
IoT Architectures and Reference Models
Introduction
An Internet of Things (IoT) system connects physical entities to software services through sensing, actuation, communication, computation, and data management. A temperature sensor sending measurements to a dashboard may appear simple, but a production system must also address identity, interoperability, latency, reliability, security, scalability, ownership, and lifecycle management.
An architecture organizes system components and their interactions. A reference model provides a technology-neutral vocabulary and conceptual decomposition that designers can adapt to different implementations. Neither is necessarily a complete deployment blueprint. The three-, five-, and seven-layer models offer different levels of abstraction, while communication models describe how devices exchange data. The IoT World Forum and oneM2M models provide more detailed guidance for enterprise and standards-based systems.
Learning Objectives
After studying this chapter, students should be able to:
analyze three-, five-, and seven-layer IoT architectures;
compare device-to-device, device-to-cloud, and device-to-gateway communication;
explain the IoT World Forum seven-layer reference model;
correctly identify oneM2M entities, nodes, and reference points;
trace telemetry and command flows through an IoT system;
calculate basic latency, data-volume, and availability estimates;
evaluate architectural trade-offs involving scalability, interoperability, privacy, cost, and resilience; and
propose an architecture for a practical IoT application.
1. Architecture as a Design Instrument
An IoT architecture answers several related questions:
What functions are required? Examples include sensing, discovery, authentication, event processing, storage, analytics, and actuation.
Where should each function execute? Processing may occur on a constrained device, gateway, edge server, private data center, or public cloud.
How do components interact? Interaction may use messages, request–response APIs, event streams, or device-specific protocols.
Which qualities must be protected? Typical qualities include low latency, availability, safety, privacy, maintainability, and interoperability.
Architectural layers provide separation of concerns. However, a layer is a logical grouping, not necessarily a separate computer. A gateway may implement connectivity, protocol conversion, security, and edge analytics within one physical unit.
1.1 Functional blocks
Most IoT systems include the following functional blocks:
Devices: sensors, actuators, controllers, and embedded processors.
Communication: wired or wireless links, addressing, routing, and messaging.
Edge or gateway services: aggregation, filtering, protocol translation, local control, and security enforcement.
Service enablement: registration, discovery, data management, subscriptions, notifications, and device management.
Applications: monitoring, optimization, prediction, automation, and user interaction.
Business processes: policies, workflows, billing, maintenance, and organizational decisions.
Cross-cutting management and security: identity, authorization, configuration, observability, software updates, and incident response.
A sound architecture separates these responsibilities without assuming that every deployment needs a distinct product for each one.
2. Layered IoT Architectures
2.1 Three-layer architecture
The three-layer model is a compact conceptual model comprising perception, network, and application layers.
Layer
Main responsibility
Examples
Application
Delivers domain-specific services
Smart metering, health monitoring, asset tracking
Network
Transfers data between devices and services
IP, cellular, Ethernet, routing, messaging
Perception
Observes or affects the physical environment
Sensors, RFID tags, cameras, actuators
The perception layer converts physical phenomena into digital observations and digital commands into physical action. Accuracy, calibration, sampling rate, energy consumption, and tamper resistance are important concerns.
The network layer transports measurements, events, and commands. It includes access networks, addressing, routing, gateways, and transport mechanisms.
The application layer interprets information for a domain. It may generate alerts, present dashboards, automate equipment, or integrate IoT information into enterprise systems.
The model is useful for introductory reasoning but combines several distinct concerns. For example, storage, analytics, device management, and business governance are not explicitly represented.
2.2 Five-layer architecture
A common five-layer model expands the three-layer architecture into perception, transport, processing, application, and business layers. Terminology varies among publications; therefore, designers should state their definitions rather than assume universal naming.
Storage, analytics, discovery, device management, service orchestration
Transport
Communication across local and wide-area networks
Perception
Sensing, identification, actuation, and physical interaction
The processing or middleware layer is the most important addition. It decouples applications from heterogeneous devices through normalized data models, registries, brokers, databases, rules engines, and analytics. The business layer connects technical outputs to accountable organizational actions.
The five-layer model is more useful than the three-layer model for application design, but it may still obscure the boundary between real-time edge processing and cloud processing.
2.3 Seven-layer IoT World Forum model
The IoT World Forum (IoTWF) reference model divides an IoT system into seven levels. Data generally travels upward from devices toward applications, while commands and policy may travel downward. Management and security apply across all levels.
IoT World Forum seven-layer reference model
Figure: IoT World Forum seven-layer reference model
Figure: The IoT World Forum model, showing seven levels and bidirectional information flow.
The levels are:
Physical devices and controllers: sensors, machines, actuators, programmable controllers, and embedded systems.
Connectivity: reliable communication, switching, routing, protocol operation, and network security.
Edge computing: local filtering, normalization, event detection, protocol adaptation, and time-critical control.
Data accumulation: conversion of data in motion into data at rest through queues, stream ingestion, and persistent storage.
Data abstraction: aggregation, indexing, access control, data virtualization, and presentation of consistent information to applications.
Applications: monitoring, analytics, control, optimization, and domain-specific services.
Collaboration and processes: people, organizational workflows, enterprise processes, and decisions based on application outputs.
The distinction between levels 4 and 5 is significant. Accumulation concerns retaining data; abstraction concerns making stored or streaming data consistently understandable and accessible. The seven-level model is particularly useful for identifying where data changes form and where operational responsibilities lie.
2.4 Comparing the layered models
The models are complementary rather than mutually exclusive.
Criterion
Three-layer
Five-layer
IoTWF seven-layer
Primary value
Simplicity
Middleware and business visibility
Detailed enterprise data flow
Edge processing
Implicit
Usually within processing
Explicit level
Data storage and abstraction
Combined or implicit
Processing layer
Separate levels
Organizational process
Application or implicit
Business layer
Collaboration/process level
Best use
Initial explanation
Solution decomposition
Detailed architecture analysis
Adding layers improves analytical precision but increases documentation and coordination. A project should use the least complex model that still exposes important design decisions.
3. IoT Communication Models
Layer models describe functions; communication models describe the relationships among communicating entities.
3.1 Device-to-device
In device-to-device (D2D) communication, devices exchange information directly over a local link or mesh. Examples include a motion sensor commanding a nearby lamp or industrial controllers exchanging state.
Advantages include low latency, local operation during Internet outages, and reduced cloud traffic. Limitations include constrained device resources, local interoperability problems, and more difficult fleet-wide management. D2D does not necessarily mean an unprotected peer connection; authentication and authorization remain necessary.
3.2 Device-to-cloud
In device-to-cloud (D2C) communication, a device connects directly to a cloud service, commonly through IP networking and an application protocol. The cloud performs storage, visualization, analytics, and device management.
D2C reduces local infrastructure and supports centralized fleet management. It can, however, create dependency on Internet availability, increase wide-area traffic, and expose the deployment to provider-specific interfaces. Constrained devices may also find cloud security protocols computationally demanding.
3.3 Device-to-gateway
In device-to-gateway (D2G) communication, devices first communicate with a gateway, hub, smartphone, industrial computer, or edge platform. The gateway may translate non-IP protocols, aggregate measurements, enforce policy, and continue limited operation when cloud access fails.
The model supports heterogeneous and constrained devices but introduces another component to procure, secure, update, and make resilient. If a single gateway serves many devices without redundancy, it becomes a failure concentration point.
3.4 Back-end data sharing
A fourth model, back-end data sharing, allows authorized applications or cloud services to exchange IoT data through APIs, event streams, or federated platforms. It enables cross-domain applications but demands clear consent, semantics, ownership, retention rules, and access controls.
Comparison of IoT communication models
Figure: Comparison of IoT communication models
Figure: Principal IoT communication models. Real deployments may combine several models.
A command path runs in the opposite direction but should not be treated as a simple reversal. Commands often require authorization, freshness checks, acknowledgement, safety validation, and a defined response when connectivity fails.
Architects should distinguish:
telemetry: periodic or event-driven observations;
commands: requested changes to device state;
events: semantically significant occurrences;
metadata: identity, units, location, calibration, and quality;
management traffic: configuration, diagnostics, and software updates.
4.2 Data-volume estimate
For N devices, each producing a payload of S bytes at a rate of f messages per second, the payload data volume over duration T is:
V = N × S × f × T
Here, V is measured in bytes when S is in bytes and T is in seconds. This estimate excludes protocol headers, retransmissions, security overhead, indexing, replication, and metadata.
Worked example. A deployment has 2,000 sensors. Each sends a 120-byte payload every 30 seconds. For one 24-hour day, f = 1/30 messages/s and T = 86,400 s.
The payload volume is 691.2 MB/day using decimal units, where 1 MB = 1,000,000 bytes. If a gateway sends one-minute summaries of 80 bytes per sensor instead, the daily payload becomes:
The payload reduction is (691.2 − 230.4)/691.2 = 0.6667, or approximately 66.7%. Information loss must be considered because summaries may remove short-lived anomalies.
4.3 Latency decomposition
For a path of k sequential stages, an approximate end-to-end latency is:
The terms represent processing, queueing, transmission, and propagation delay at stage i, all expressed in the same time unit. For a packet of B bits sent over a link with effective rate R bits/s, the serialization delay is:
Ltx = B/R
This model applies to a specified path and packet. Queueing is workload-dependent, and wireless contention or retransmission can make actual latency variable.
Suppose a 4,000-bit message uses a 200 kbit/s effective link. Its transmission delay is 4,000/200,000 = 0.020 s, or 20 ms. If processing, queueing, and propagation contribute 8 ms, 12 ms, and 5 ms respectively, total one-way latency is 45 ms.
4.4 Availability of a serial dependency chain
If a service requires every one of n components to be operational, and component failures are statistically independent, series availability is:
Aseries = ∏i=1n Ai
If a device link, gateway, and cloud service each have availability 0.99, the serial service availability is 0.993 = 0.970299, or approximately 97.03%. Independence is a simplifying assumption; common power, network, software, or administrative failures can invalidate it. Redundancy also requires a different reliability model.
5. The oneM2M Functional Architecture
oneM2M is a global standards partnership that defines a common service layer for machine-to-machine and IoT systems. Its architecture separates applications from reusable common services and underlying network services.
5.1 Core entities
Application Entity (AE): application logic that uses oneM2M services, such as a meter-monitoring or building-control application.
Common Services Entity (CSE): an instance of common service functions, including registration, discovery, data management, subscription and notification, security, group management, location, and device management support.
Network Services Entity (NSE): exposes services supplied by an underlying network, such as location or device-triggering capabilities, to a CSE.
The Common Services Functions (CSFs) are capabilities provided by a CSE. A CSE is the architectural entity in which those functions reside.
5.2 oneM2M node taxonomy
Correct node classification is essential:
Node
Required oneM2M contents
Typical role
Application Dedicated Node (ADN)
At least one AE and no CSE
Constrained device relying on a remote CSE
Application Service Node (ASN)
Exactly one CSE and at least one AE
Device or local platform hosting applications and common services
Middle Node (MN)
Exactly one CSE; may also contain one or more AEs
Gateway or intermediary service platform
Infrastructure Node (IN)
Exactly one CSE; may also contain one or more AEs
Infrastructure-domain service platform
A Non-oneM2M Node (NoDN) contains no oneM2M entities, although it may interact indirectly through an interworking capability hosted in a oneM2M node.
The defining distinction between an ADN and ASN is the CSE: an ADN has no CSE, whereas an ASN contains one CSE and at least one AE. An MN or IN must contain one CSE, but hosting AEs is optional.
5.3 Reference points
oneM2M defines logical reference points rather than requiring particular physical links:
Mca: communication between an AE and a CSE.
Mcc: communication between two CSEs within supported oneM2M arrangements.
Mcc′: communication between CSEs in different oneM2M service-provider domains.
Mcn: communication between a CSE and an NSE.
oneM2M entities, nodes, and reference points
Figure: oneM2M entities, nodes, and reference points
Figure: oneM2M node contents and principal reference points. Mcc′ specifically crosses oneM2M service-provider domains.
An ADN-hosted AE can use Mca to access a CSE in another node. CSEs cooperate over Mcc, while a CSE accesses underlying network capabilities through Mcn. This separation allows application developers to consume common services without implementing each function independently.
5.4 Resource-oriented operation
oneM2M represents entities and data through a resource structure addressable using standardized operations. Applications can create, retrieve, update, and delete appropriate resources, subject to access control. Subscriptions allow consumers to receive notifications when specified conditions occur. This resource-oriented approach provides a common interaction pattern across heterogeneous networks.
6. System Trade-offs
Architecture selection is a multi-objective decision rather than a search for one universally superior model.
6.1 Edge versus cloud processing
Edge processing lowers response latency, reduces wide-area traffic, and can preserve operation during outages. It can also keep sensitive raw data near its source. Cloud processing provides elastic computation, centralized management, cross-site analytics, and large-scale model training.
The trade-off is commonly resolved through a hybrid design: time-critical control and data reduction occur at the edge, while historical analytics and fleet-wide optimization occur in the cloud. Safety-critical control should not depend solely on an unpredictable wide-area connection.
6.2 Interoperability versus optimization
Standard protocols and semantic models promote portability and integration. Proprietary protocols may be optimized for a device’s energy, bandwidth, or commercial ecosystem but create lock-in. Gateways can bridge incompatible systems, although every translation introduces configuration, testing, and semantic-mapping obligations.
6.3 Security versus resource constraints
Strong cryptography, detailed logging, and frequent updates consume energy, storage, bandwidth, and computation. Constraints do not justify removing security. Instead, designers should select suitable algorithms, use hardware roots of trust where feasible, minimize exposed services, and place compensating controls at gateways.
6.4 Consistency, availability, and disconnected operation
A cloud-centered system may provide a consistent global view, but disconnected sites must often continue locally. Local replicas and queued commands improve availability but create questions about conflict resolution, stale state, command expiry, and reconciliation after reconnection.
7. Illustrative Case: Cold-Chain Monitoring
Background
This fictional case concerns a distributor operating 20 refrigerated warehouses. Each warehouse has 100 temperature sensors and several compressor controllers. Regulations require auditable temperature records, while local staff need rapid warning of refrigeration failures.
Problem
A direct-to-cloud design was initially proposed. However, some warehouses experience Internet interruptions, raw readings create avoidable traffic, and cloud-dependent alarms may arrive too late. Compressor control must remain safe during disconnection.
Analysis
The three-layer model identifies sensors, networking, and the monitoring application but does not clearly expose local processing or governance. The IoTWF model reveals several distinct requirements:
levels 1–2: calibrated sensors and reliable local connectivity;
level 3: edge validation, threshold detection, and local alarms;
level 4: durable storage of readings;
level 5: normalized units, timestamps, warehouse identities, and quality flags;
level 6: monitoring, anomaly detection, and maintenance prediction;
level 7: incident response, compliance reporting, and technician dispatch.
Approach and solution
A device-to-gateway architecture is selected. Sensors communicate with two local gateways configured for failover. Each gateway validates timestamps, converts readings to degrees Celsius, rejects impossible values, and stores measurements during Internet outages. Critical temperature events trigger a local alarm immediately and are forwarded to the cloud when connectivity exists.
The design can be mapped to oneM2M as follows: constrained sensors hosting AEs but no CSE are ADNs; each warehouse gateway is an MN containing one CSE and optional gateway applications; the central platform is an IN containing one CSE and cloud-side applications. AEs access CSE services over Mca, and gateway CSEs exchange information with the infrastructure CSE over Mcc.
Raw data is retained locally for 30 days, while selected readings and events are uploaded centrally. Access is role-based, firmware updates are signed, device credentials are unique, and command messages include expiry times. Compressor protection remains under local industrial control; the cloud issues supervisory set-point requests rather than bypassing safety interlocks.
Outcome
The hybrid architecture supports local response during outages, centralized compliance reporting, and reduced wide-area traffic. Redundant gateways remove a major single point of failure, although shared power and local-network failures must still be addressed.
Learning points
Architectural layers expose responsibilities that a simple connectivity diagram can hide.
Edge processing should support, not circumvent, local safety controls.
oneM2M node classification depends on which entities a node contains.
Availability analysis must include common-cause failures, not only component percentages.
Data retention, units, calibration, and auditability are architectural concerns.
8. Governance, Ethics, and Regulation
IoT architectures shape who can observe and influence physical environments. Privacy should therefore be designed into collection, processing, sharing, and retention—not added only at the application interface.
Key practices include data minimization, purpose limitation, explicit retention periods, strong device identity, least-privilege authorization, encryption, security logging, vulnerability disclosure, and secure decommissioning. Systems affecting workers or residents should avoid covert surveillance and provide meaningful transparency.
Actuation creates safety and accountability concerns. Architects should specify who may issue commands, how commands are validated, what happens when state is uncertain, and how actions can be audited. Applicable privacy, cybersecurity, radio, safety, medical, industrial, and sector-specific regulations vary by jurisdiction and use case.
9. Contemporary Developments and Best Practices
IoT architecture increasingly incorporates edge AI, digital twins, zero-trust security, interoperable device ecosystems, and event-driven cloud services. Edge AI can reduce latency and protect raw data, but models require versioning, monitoring, drift detection, and safe fallback behavior. A digital twin should identify data freshness and uncertainty rather than imply that its representation is always current.
Recommended practices are to:
begin with use cases, hazards, and quality requirements rather than preferred products;
document logical and deployment architectures separately;
define canonical data semantics, units, timestamps, and quality indicators;
assign each function to device, edge, or cloud based on measured constraints;
design identity, updates, observability, and decommissioning from the start;
test disconnected operation, recovery, duplicate messages, and delayed commands;
avoid single gateways or shared services where failure consequences are unacceptable; and
use open standards where they provide adequate functionality and lifecycle support.
Chapter Summary
IoT architectures decompose complex cyber-physical systems into understandable responsibilities and interactions. The three-layer model separates perception, networking, and applications. The five-layer model adds processing or middleware and business concerns. The IoT World Forum model provides seven levels spanning devices, connectivity, edge computing, data accumulation, data abstraction, applications, and organizational processes, with security and management applying throughout.
Device-to-device communication favors local responsiveness; device-to-cloud communication favors centralized services; and device-to-gateway communication supports protocol translation, local autonomy, and constrained devices. Production systems often combine these models.
oneM2M standardizes a reusable service layer through AEs, CSEs, NSEs, and reference points. An ADN contains at least one AE but no CSE. An ASN contains one CSE and at least one AE. An MN or IN contains one CSE and may contain AEs. Mca links an AE and CSE, Mcc links CSEs, Mcc′ links CSEs across service-provider domains, and Mcn links a CSE with an NSE.
Architectural selection requires balancing latency, bandwidth, availability, interoperability, security, privacy, cost, and operational complexity. Quantitative estimates of data volume, latency, and dependency-chain availability support—but do not replace—hazard analysis and engineering judgment.
Key Terms
Actuator: A component that changes a physical state in response to a command.
Application Dedicated Node (ADN): A oneM2M node containing at least one AE and no CSE.
Application Entity (AE): oneM2M application logic that consumes common services.
Application Service Node (ASN): A oneM2M node containing one CSE and at least one AE.
Common Services Entity (CSE): A oneM2M entity providing reusable common service functions.
Data abstraction: Transformation and controlled presentation of data in consistent, usable forms.
Data accumulation: Conversion of data in motion into retained data.
Device-to-cloud: Direct communication between an IoT device and a cloud service.
Device-to-device: Direct or local communication between devices.
Device-to-gateway: Communication in which a gateway intermediates between devices and other services.
Edge computing: Computation performed near data sources or physical processes.
Gateway: An intermediary providing functions such as aggregation, translation, security, or local control.
Infrastructure Node (IN): A oneM2M infrastructure node containing one CSE and optionally AEs.
Interoperability: The ability of distinct systems to exchange and meaningfully use information.
Mca: The oneM2M reference point between an AE and a CSE.
Mcc: The oneM2M reference point between CSEs.
Mcn: The oneM2M reference point between a CSE and an NSE.
Middle Node (MN): A oneM2M intermediary node containing one CSE and optionally AEs.
Network Services Entity (NSE): A oneM2M entity representing services exposed by an underlying network.
Reference model: A technology-neutral conceptual framework defining components and relationships.
Review Questions
Short Answer Questions
What is the difference between an architecture and a reference model?
State the three layers of the basic IoT architecture.
Why does the IoTWF model distinguish data accumulation from data abstraction?
What functions can an IoT gateway perform?
Distinguish a oneM2M ADN from an ASN.
Long Answer Questions
Compare the three-, five-, and seven-layer IoT architectures, including their strengths and limitations.
Explain device-to-device, device-to-cloud, and device-to-gateway communication with suitable applications and trade-offs.
Describe all seven levels of the IoT World Forum reference model and trace telemetry through them.
Explain oneM2M AEs, CSEs, NSEs, node types, and reference points.
Discuss how security, privacy, availability, and lifecycle management influence IoT architecture.
Analytical / Application Questions
Design an architecture for a smart irrigation system that must continue operating during Internet outages. Justify the communication model and placement of control, storage, and analytics.
A factory has 5,000 sensors, each sending a 200-byte payload every 10 seconds. Calculate the daily payload volume, excluding overhead, and propose two architecturally different methods of reducing wide-area traffic.
Analyze a cloud-controlled medical refrigerator system. Identify unacceptable single points of failure and propose a layered, safety-aware alternative.
Multiple Choice Questions with Answers
Question 1
Which layer in the five-layer IoT architecture primarily provides storage, discovery, analytics, and device management?
A. Perception layer
B. Transport layer
C. Processing or middleware layer
D. Business layer
Correct Answer: C. Processing or middleware layer
Question 2
Which IoT World Forum level converts data in motion into data at rest?
A. Edge computing
B. Data accumulation
C. Data abstraction
D. Collaboration and processes
Correct Answer: B. Data accumulation
Question 3
Which communication model is most appropriate when non-IP sensors require protocol translation and local operation during Internet outages?
A. Device-to-device only
B. Device-to-cloud
C. Device-to-gateway
D. Back-end data sharing only
Correct Answer: C. Device-to-gateway
Question 4
Which statement correctly defines a oneM2M Application Dedicated Node (ADN)?
A. It contains one CSE and at least one AE.
B. It contains at least one AE and no CSE.
C. It contains one CSE and no AE under any circumstances.
D. It contains an NSE but no AE.
Correct Answer: B. It contains at least one AE and no CSE.
Question 5
Which statement correctly defines a oneM2M Application Service Node (ASN)?
A. It contains at least one AE but no CSE.
B. It contains one CSE and at least one AE.
C. It contains only an NSE.
D. It contains one CSE and is prohibited from hosting an AE.
Correct Answer: B. It contains one CSE and at least one AE.
Question 6
In oneM2M, which reference point connects an Application Entity to a Common Services Entity?
A. Mca
B. Mcc
C. Mcn
D. Mcc′
Correct Answer: A. Mca
Question 7
What does the oneM2M Mcn reference point connect?
A. Two Application Entities
B. An AE and a CSE
C. A CSE and an NSE
D. Two CSEs in different provider domains
Correct Answer: C. A CSE and an NSE
Question 8
A 4,000-bit packet is transmitted over a link with an effective rate of 200,000 bit/s. What is its serialization delay?
A. 2 ms
B. 20 ms
C. 50 ms
D. 80 ms
Correct Answer: B. 20 ms
Question 9
A service requires three independent serial components, each with availability 0.99. What is the approximate service availability?
A. 97.03%
B. 98.01%
C. 99.00%
D. 99.97%
Correct Answer: A. 97.03%
Question 10
Which architectural decision best supports a safety-critical controller that must respond during a wide-area network outage?
A. Place all control logic exclusively in the cloud.
B. Disable local processing to maintain global consistency.
C. Keep time-critical control locally and use the cloud for supervisory functions.
D. Send unvalidated actuator commands through a public API.
Correct Answer: C. Keep time-critical control locally and use the cloud for supervisory functions.