Unit 3
Unit 3
The architecture of IoT is divided into 4 different layers i.e. Sensing Layer,
Network Layer, Data processing Layer, and Application Layer.
Sensing Layer: The sensing layer is the first layer of the Internet of
Things architecture and is responsible for collecting data from different
sources. This layer includes sensors and actuators that are placed in the
environment to gather information about temperature, humidity, light, sound,
and other physical parameters. Wired or wireless communication protocols
connect these devices to the network layer.
Data processing Layer: The data processing layer of IoT architecture refers
to the software and hardware components that are responsible for collecting,
analyzing, and interpreting data from IoT devices. This layer is responsible
for receiving raw data from the devices, processing it, and making it available
for further analysis or action. The data processing layer includes a variety of
technologies and tools, such as data management systems, analytics
platforms, and machine learning algorithms. These tools are used to extract
meaningful insights from the data and make decisions based on that data.
Example of a technology used in the data processing layer is a data lake,
which is a centralized repository for storing raw data from IoT devices.
When designing an IoT (Internet of Things) architecture, it's crucial to follow principles that ensure
scalability, security, and efficiency. Below are some key design principles to consider:
1. Scalability
Device Scalability: The system should handle the addition of a large number of devices
without significant performance degradation. This requires designing for high availability,
data consistency, and load balancing.
Data Scalability: As IoT systems generate massive amounts of data, the architecture must
handle high throughput and store large volumes of data while maintaining access speed.
2. Interoperability
Protocol Agnosticism: IoT devices can use a variety of communication protocols (e.g.,
MQTT, CoAP, HTTP, Bluetooth). The architecture should support multiple protocols and
ensure smooth communication between devices and platforms.
Cross-platform Integration: Ensure that different IoT platforms (cloud providers, edge
devices, sensors, actuators) can communicate seamlessly.
Device Security: Devices should be protected from unauthorized access, including secure
boot, encryption of communications, and identity management.
Data Security: All data transmitted between devices, gateways, and cloud services should be
encrypted. Implement end-to-end security from the device to the application layer.
Privacy: Protect sensitive user data with encryption, anonymization, and strict access
controls.
Edge Computing: Processing data at the edge (near the device) can reduce latency and
bandwidth usage, allowing faster decision-making and offloading some work from
centralized servers.
Cloud Computing: For complex data analytics, long-term storage, and scaling, cloud
platforms are essential. Ensure proper integration between edge and cloud systems.
Real-time Processing: Real-time data processing and decision-making should be considered
for critical IoT applications (e.g., industrial automation, healthcare).
Redundancy: Implement redundancy in devices, networks, and cloud services to avoid single
points of failure.
Graceful Failure: The system should handle failures in such a way that there is minimal
impact on the overall operation, either through fallback mechanisms or retries.
Monitoring and Diagnostics: Continuous monitoring of system health and performance,
including device status, connectivity, and data integrity.
7. Modular Design
Flexibility: The system should allow for modular updates and changes. IoT systems are often
evolving, so the architecture should support adding or removing components with minimal
disruption.
Loose Coupling: Components (devices, networks, platforms) should be loosely coupled to
allow for easy upgrades or changes without affecting the entire system.
Sensor Calibration: Ensure that sensors are properly calibrated and periodically checked for
accuracy.
Data Validation: Implement mechanisms to filter out invalid, noisy, or outlier data, ensuring
that only valid data is used for analysis and decision-making.
IoT Devices
IoT devices are the building blocks of an IoT system. These devices collect, send, or receive data and
are usually equipped with sensors, actuators, and communication interfaces. They can vary in
complexity, functionality, and connectivity. Here are the main types of IoT devices:
1. Sensors
Function: Sensors capture real-world data such as temperature, humidity, pressure, motion, or light
levels.
Example: Temperature sensors in a smart thermostat, motion sensors in a security system, or
pressure sensors in industrial machines.
2. Actuators
Function: Actuators perform actions based on commands, usually from an IoT platform. They
convert electrical signals into physical actions (e.g., moving a valve, turning on a motor).
Example: Motors, solenoids, or servos in industrial equipment, or actuators in smart home systems
like opening/closing windows or adjusting thermostats.
3. Gateways
Function: Gateways connect multiple IoT devices to the internet or a cloud platform. They aggregate
data from sensors and actuators and manage communication with higher layers (cloud, edge, or
local networks).
Example: A smart home hub that connects smart lights, locks, and thermostats to a cloud platform.
4. Edge Devices
Function: These devices perform local data processing and decision-making at the "edge" of the
network, reducing the need to send all raw data to the cloud.
Example: Edge gateways, industrial controllers, or embedded systems that provide real-time analysis
of sensor data.
5. Embedded Systems
Function: These are specialized computing devices embedded within other devices to control or
manage specific tasks. They can interact with sensors and actuators for specific use cases.
Example: Microcontrollers (MCUs) in wearable devices or smart appliances.
6. Wearable Devices
Function: These are personal IoT devices that can be worn on the body. They collect data about the
user, such as activity levels, health metrics, or location, and send it to an IoT platform.
Example: Smartwatches, fitness trackers, health monitoring devices like ECG or glucose monitors.
7. Smart Appliances
Function: These are consumer devices that can be connected to the internet to enable smart
operations and user interaction.
Example: Smart refrigerators, washing machines, or ovens that can be controlled remotely.
The deployment model in an IoT system determines how devices interact with each other and the
broader system. Here are the primary deployment models:
1. Device-to-Cloud (D2C)
Description: In this model, IoT devices connect directly to the cloud via the internet. The devices
typically send sensor data or receive commands from cloud-based platforms.
Characteristics:
o Simple, low-latency communication between devices and cloud.
o Suitable for use cases like remote monitoring, asset tracking, or smart home systems.
o Data processing, storage, and analytics are done in the cloud.
Example: A smart thermostat sending temperature data to a cloud-based platform for analysis and
control.
2. Device-to-Gateway (D2G)
Description: Devices communicate with a local gateway that aggregates data and performs some
processing before sending it to the cloud or central system. This model is often used when devices
are far apart or in environments with limited connectivity.
Characteristics:
o The gateway acts as an intermediary between devices and cloud platforms.
o Devices communicate over short-range protocols (e.g., Bluetooth, Zigbee, or Z-Wave), while
the gateway connects to the internet using Wi-Fi, Ethernet, or cellular networks.
o Reduces cloud dependency and can improve real-time responsiveness by handling some
processing locally.
Example: Smart home devices (e.g., lights, security cameras) connecting to a central hub that sends
data to the cloud for processing.
3. Device-to-Edge (D2E)
Description: In this model, IoT devices communicate directly with edge computing resources. Edge
computing allows data to be processed locally at or near the source, minimizing latency and
bandwidth usage.
Characteristics:
o Data processing and analytics are done at the edge of the network, rather than sending raw
data to the cloud.
o Often used in applications that require low latency or where large amounts of data are
generated.
o The edge device may handle control actions in real time based on local processing.
Example: Industrial IoT (IIoT) devices processing sensor data at the factory floor using edge gateways
or local servers for predictive maintenance.
4. Cloud-to-Device (C2D)
Description: This model focuses on sending commands, configurations, or updates from the cloud to
IoT devices. It’s commonly used for remote management and control of devices.
Characteristics:
o Devices can receive data, firmware updates, or configuration changes from a cloud-based
service.
o Often used in conjunction with other models like D2C for full bidirectional communication.
Example: A cloud platform sending configuration changes or updates to a fleet of smart meters or
connected sensors.
Description: A combination of D2C, D2G, D2E, and C2D, depending on the use case. This model is
flexible and adapts to the varying needs of different parts of the system.
Characteristics:
o Some devices may use D2C for simple remote monitoring, while others may require local
processing at the edge.
o The system architecture can be adapted as needed for scalability, redundancy, and
performance optimization.
Example: In a smart city deployment, traffic monitoring sensors might send data to a central cloud
service, while streetlights or traffic signals might be controlled by edge devices for real-time
operation.
Description: In a mesh network, devices can directly communicate with each other, forming a
network of nodes that can forward data. This model is often used for large-scale IoT deployments
where devices are spread across wide areas.
Characteristics:
o Each device in the mesh network acts as both a node and a repeater, extending the
network's coverage.
o Suitable for applications where continuous connectivity and reliability are crucial, such as
smart agriculture, environmental monitoring, or large industrial IoT systems.
Example: Zigbee-based mesh networks used in home automation or building management systems.
Device-to- Devices send data directly Remote monitoring, Simple, low-latency, Relies heavily on stable
Cloud to cloud for processing. smart homes direct connection. internet.
Device-to- Devices process data locally Industrial Real-time decision- May require powerful
Edge on the edge device. automation, making, reduces edge devices.
Model Description Use Cases Pros Cons
Centralized control,
Cloud-to- Cloud sends commands and Remote control, Relies on cloud for
flexible
Device updates to devices. firmware updates communication.
management.
Large-scale IoT
Combines multiple models Flexible, scalable,
Hybrid deployments, smart Complex to manage.
for flexibility. adaptable to needs.
cities
1. Interoperability:
o IoTivity ensures that IoT devices from different manufacturers and running different
protocols can work together smoothly. It supports various protocols such as CoAP
(Constrained Application Protocol) and HTTP for communication.
o It enables devices to discover each other and communicate in a way that’s agnostic to
the underlying hardware or software platforms, which helps in the integration of
heterogeneous devices into a unified IoT system.
2. Device Discovery and Communication:
o Discovery: IoTivity provides mechanisms for devices to discover each other in the
network, facilitating dynamic interactions between devices (e.g., finding available
smart appliances in a home).
o Communication: IoTivity supports communication over various network types (e.g.,
Wi-Fi, Ethernet, Bluetooth, Zigbee), ensuring that devices can interact regardless of
their physical connection.
3. Security:
o Authentication & Authorization: IoTivity provides mechanisms for secure device
onboarding, ensuring that devices are authenticated and authorized before being
allowed to interact with the system.
o Encryption: Data exchanged between devices is encrypted, protecting sensitive
information from unauthorized access.
o Privacy: IoTivity helps maintain privacy by ensuring that user data is managed
securely and transparently, with appropriate access control mechanisms.
4. Edge Computing Support:
o IoTivity has support for edge devices, allowing IoT data processing to occur locally at
the device or nearby network edges. This reduces latency and minimizes the
dependency on cloud-based processing, which is crucial for real-time applications like
industrial automation.
5. Resource Efficiency:
o Designed with constrained devices in mind, IoTivity is lightweight and optimized for
resource-constrained environments (low power, limited processing capacity), which is
common in IoT deployments.
6. Standardization:
o IoTivity is a part of the Open Connectivity Foundation (OCF), which promotes
standardized protocols for the IoT industry. The framework is aligned with OCF
standards, ensuring a common platform for IoT devices to communicate regardless of
their manufacturer or ecosystem.
IoTivity Components
1. Core Layer:
o This includes the essential functionality for communication, device management, and
security. It defines protocols for messaging, device discovery, and secure interactions
between devices.
2. Device Profile Layer:
o The device profile defines the behavior and capabilities of the IoT device in the
system, allowing other devices to understand how to interact with it. This can include
capabilities such as temperature control, lighting, or motion detection.
3. Platform Layer:
o This provides the infrastructure for communication and device management. It
includes cloud integrations, edge processing, and services that handle device
interaction, authentication, and cloud storage.
4. Service Layer:
o The service layer allows the creation of application-level services that can leverage
the capabilities of IoT devices. It abstracts the underlying hardware and provides a
simplified interface for building applications that control devices, perform analytics,
and automate actions.
IoTivity Architecture
Devices: IoTivity is designed to work with various devices ranging from simple sensors to
more complex smart appliances. Devices interact via the framework, exposing their services
and interacting with other devices or the cloud.
Networks: The framework supports communication across different types of networks, from
local-area networks (LANs) to wide-area networks (WANs), facilitating interoperability in a
range of deployment scenarios.
Cloud Integration: IoTivity supports integration with cloud platforms, enabling seamless
management and monitoring of IoT devices at scale. This allows users to control devices
remotely and store or analyze data in the cloud.
1. Smart Home:
o In smart homes, IoTivity can be used to connect and manage various smart devices
like lights, thermostats, security cameras, and door locks, allowing seamless control
and automation through a single platform.
2. Smart Cities:
o In smart city deployments, IoTivity enables the integration of a variety of IoT
systems, such as smart street lighting, smart traffic management, waste management
systems, and environmental monitoring devices.
3. Industrial IoT (IIoT):
o IoTivity can be leveraged for industrial automation and smart factories, where sensors
and machines need to communicate in real-time to monitor production, detect issues,
and ensure safety and efficiency.
4. Healthcare:
o IoTivity can enable the integration of health monitoring devices (e.g., wearables,
medical equipment) that track patient vitals and health status, ensuring data is securely
transferred to healthcare providers.
Benefits of IoTivity
Flexibility: IoTivity supports a wide range of devices and communication protocols, making
it adaptable to different use cases and industries.
Low Power and Efficient: Designed for use in resource-constrained environments, it works
well with battery-powered devices and ensures energy efficiency.
Interoperability: By supporting multiple devices, vendors, and communication protocols,
IoTivity ensures that devices can interact in a heterogeneous IoT ecosystem.
Security: IoTivity is built with security in mind, implementing robust encryption,
authentication, and access control to protect sensitive IoT data.
Community-driven: As an open-source project under the OCF, IoTivity benefits from
contributions by a wide community of developers, fostering rapid innovation and updates.
1. Installation:
o To start using IoTivity, you can clone the repository from GitHub or use package
managers to install the framework on your system. IoTivity provides extensive
documentation on setup and configuration.
2. Development:
o Developers can use IoTivity's APIs to build IoT applications, create device profiles,
manage interactions, and implement communication protocols.
3. Contribute:
o As an open-source project, IoTivity encourages contributions from the community.
Developers can contribute by fixing bugs, adding new features, or enhancing
documentation.