0% found this document useful (0 votes)
1 views

MOD1_PART2.pptx

The document outlines the components and architecture of the Internet of Things (IoT), detailing essential elements such as sensors, actuators, devices, gateways, and communication protocols. It describes various layers of IoT architecture including device management, communication, and event processing, along with different communication models like request-response and publish-subscribe. Additionally, it discusses the importance of APIs and RESTful communication in facilitating interactions within IoT systems.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

MOD1_PART2.pptx

The document outlines the components and architecture of the Internet of Things (IoT), detailing essential elements such as sensors, actuators, devices, gateways, and communication protocols. It describes various layers of IoT architecture including device management, communication, and event processing, along with different communication models like request-response and publish-subscribe. Additionally, it discusses the importance of APIs and RESTful communication in facilitating interactions within IoT systems.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

Internet of Things

Components in IoT
► Sensors and actuators
► Device -(thing + sensors)
► Gateway(Device + External gateway(+Internet)
► Protocols
► Cloud
Sensor
► Sensors are devices that detect the feature quantity of a measurement object and
convert this quantity(physical) into a readable signal(electrical).
• Temperature Sensors.
• Humidity Sensors.
• Pressure Sensors.
• Proximity Sensors.
• Level Sensors.
• Accelerometers.
• Gyroscope.
• Gas Sensors.
Actuators
► An actuator is a machine component or system that moves or controls the
mechanism or the system. It takes an electrical input and turns it into physical action.
• Hydraulic Actuators.
• Pneumatic Actuators. .
• Electrical Actuators.
• Thermal Actuators.
• Magnetic Actuators.
• Relay Actuators.
IoT Device
► An IoT device is made up of a Physical object (“thing”) + Controller (“brain”) +
Sensors + Actuators + Networks (Internet)
► IoT devices are pieces of hardware, such as sensors, actuators, gadgets,
appliances, or machines, that are programmed for certain applications and
can transmit data over the internet or other networks. Examples
► Arduino with Arduino Ethernet connection
► Raspberry Pi connected via Ethernet or Wi-Fi
► Intel Galileo connected via Ethernet or Wi-Fi Examples of indirectly
connected device include
Gateway

► An IoT gateway is a physical device or virtual platform that connects sensors, IoT
modules, and smart devices to the cloud. Gateways serve as a wireless access
portal to give IoT devices access to the Internet.
Types of communication in IoT
► Device to device
D2 D2 BLE, Z-wave, Zigbee

► Device to cloud
D1 cloud WiFi , Ethernet

► Device to gateway
BLE D1

Z-wave WiiFi
D2 gate cloud
way
Zigbee D3

► Backend data sharing


cloud
D1 cloud

cloud
Communication protocols
Link layer protocols
► Link layer : protocols determine how the data is physically sent over the
networks physical medium
802.3 – Ethernet: Medium can be coaxial cable,twisted pair or optical
fiber. Data rates can be 10 Mb/s to 40 Gb/s
802.11- Wi Fi: Collection of wireless local area network protocols. Data
rates can be 1 Mb/s to 6.75 Gb/s.
802.16 – Wi Max : Collection of wireless broadband standards. Data
rate 1.5 Mb/s to 1G/s
802.15.4 – LR –WPAN: collection of standards for low rate wireless
personal area networks. Data rates 40 kb/s to 250 kb/s.Used for low cost
,low speed communication for power constrained devices.
2G/ 3G/ 4G/5G –Mobile communication: Communicates over cellular
networks. Data rates 9.6kb/s to 100Mb/s
Network/Internet Layer
► The network layer is responsible for sending IP datagrams from the
source network to the destination network. It performs the host
addressing and packet routing. Host addressing is done using the
following IP addressing scheme.
► IPv4: 32bit addressing scheme
► IPv6: 128 bit addressing scheme
► 6LoWPAN: IPv6 over Low-Power Wireless Personal Area Networks, brings IP
protocol to the low power devices which have limited processing
capability.
Transport layer
► The transport layer protocols provide end to end message transfer and
functions such as error control segmentation, flow control and
congestion control.
► TCP : Transmission Control Protocol connection oriented and stateful
protocols. Ensures reliable transmission of packets in order. Used by
web browsers, email programs and file transfer. Light weight
implementation of TCP is used in IoT.
► UDP: User datagram protocol Connectionless protocol. Transaction
oriented and stateless protocol. Used for time sensitive applications.
Application layer
► Application layer protocols define how the applications interface with the
lower layer protocols to send the data over the network. Port numbers are used
for application addressing.
► HTTP: foundation of WWW. The protocol follows a request-response model
where a client(browser or application) sends a request to server using HTTP
commands. It is a stateless protocol. Protocol uses URL to identify resources.
Runs over TCP.
► CoAP: Constrained application protocol: Used for machine to machine
applications, meant for constrained environments with constrained devices
and constrained networks. It uses a client server architecture, request-response
model where clients communicate with servers using connectionless
datagrams. It runs over UDP.
► WebSocket: allows full duplex communication over a single socket connection
for sending messages between client and server while keeping the TCP
connection open.
► MQTT: Message Queue Telemetry Transport is a light weight messaging
protocol based on publish subscribe model. Uses a client server
architecture where the client connects to the server and publishes
messages to topics on the server. Well suited for constrained environments
where the devices have limited processing and memory resources and the
bandwidth is low.
► XMPP: Extensible Messaging and Presence Protocol is used for real time
communication. It is a decentralized protocol and supports both client
-server and server –server architecture. It has wide range of applications
including messaging, gaming, multi-party chat and voice/video calls.
► DDS: Data Distribution Services is a data-centric middleware standard for
device - device or machine-machine communication. It uses
publish-subscribe model. DDS provides real time, scalable, dependable
high performance, inter-operable data communication between publisher
and subscriber.
► AMQP: Advanced Message Queuing Protocol is an open application
protocol for business messaging. It supports both point-to-point and
publisher/subscriber models.
IoT architecture

IoT architecture should guarantee reliability in the operations, good failure


recovery, scalability and adaptability to the mobility and dynamic nature of IoT
ecosystem .The requirements for a reference architecture are
• Connectivity and communications
• Device management
• Data collection, analysis, and actuation
• Scalability
• Security
• Integration
IoT Reference Architecture

Dashboard/web API management


portal

Event processing and analytics

Resource Service
Identifi- repository and
management
cation discovery Security
Enterprise shared bus and message and
Autho-ri
broker privacy
zation Device
manag enforce
Communication layer er ment
Access
control
Devices ,sensors, human operators
Device layer

► The bottom layer of the architecture is the device layer. Devices can be of various
types, but in order to be considered as IoT devices, they must have some
communications that either indirectly or directly attaches to the Internet. Examples
► ZigBee devices connected via a ZigBee gateway
► Bluetooth or Bluetooth Low Energy devices connecting via a mobile phone
► Each device typically needs an identity. The identity may be one of the following:
• A unique identifier (UUID) burnt into the device (typically part of the System-on-Chip, or
provided by a secondary chip)
• A UUID provided by the radio subsystem (e.g. Bluetooth identifier, Wi-Fi MAC address)
• An OAuth2 Refresh/Bearer Token (this may be in addition to one of the above)
• An identifier stored in nonvolatile memory such as EEPROM
Communication layer

► The communication layer supports the connectivity of the devices. There are multiple
potential protocols for communication between the devices and the cloud. The most well
known three potential protocols are
• HTTP/HTTPS (and RESTful approaches on those)
• MQTT 3.1/3.1.1
• Constrained application protocol (CoAP)
Aggregation/bus layer

► An important layer of the architecture is the layer that aggregates and brokers
communications. This is an important layer for three reasons:
1. The ability to support an HTTP server and/or an MQTT broker to talk to the
devices;
2. The ability to aggregate and combine communications from different devices
and to route communications to a specific device (possibly via a gateway)
3. The ability to bridge and transform between different protocols, e.g. to offer
HTTP based APIs that are mediated into an MQTT message going to the
device.
Event processing and analytics

► This layer takes the events from the bus and provides the ability to process
and act upon these events. A core capability here is the requirement to
store the data into a database. This layer is used for
• Highly scalable, column-based data storage for storing events
• Map-reduce for long-running batch-oriented processing of data
• Complex event processing for fast in-memory processing and near
real-time reaction and autonomic actions based on the data and activity of
devices and other systems
• In addition, this layer may support traditional application processing
platforms.
Client/external communication layer

► The reference architecture needs to provide a way for these devices to


communicate outside of the device-oriented system. This includes three main
approaches.
► create web-based front-ends and portals that interact with devices and with the
event-processing layer.
► create dashboards that offer views into analytics and event processing.
► interact with systems outside this network using machine-to-machine
communications (APIs). These APIs need to be managed and controlled and
this happens in an API management system.
Device manager

► Device management (DM) is handled by two components.


► A server-side system (the device manager) communicates with devices via
various protocols and provides both individual and bulk control of devices. It
also remotely manages software and applications deployed on the device. It
can lock and/or wipe the device if necessary
► The device manager also needs to maintain the list of device identities and
map these into owners. It must also work with the identity and access
management layer to manage access controls over devices
Identity and access management layer

► OAuth2 token issuing and validation


► Other identity services for identifying inbound requests from the Web layer
► Directory of users
► Policy management for access control (policy control point)
Service Oriented Architecture(SOA)
► Sensing layer
Sensing layer is integrated with hardware objects
to sense the status of things
► Network layer
This layer is the infrastructure over wired or wireless
Connections among things
► Service layer
This layer is used to create and manage services
Required by users or applications
► Interface layer
Interface layer consists of interaction methods with
users or applications
► In SOA architecture, the complex system is divided into smaller systems which
are loosely coupled so that maintainability is high.
► In case of component failure, system can operate normally. Reliability is high.
► SOA has appropriate level of abstraction, interoperability and scalability.
► SOA has the ability to build diverse and complex services by composing
different functions of the system.
API oriented architecture

Resource
request(REST/ Response(JSON
SOAP) /SOAP-XML)

Presentation layer
Security
module
Business logic layer

Data access layer

Database
► Architecture is structured into a secure API, a backbone, and separate device networks with
standard interface to the backbone.
► In conventional method, SOAP(Simple Object Access Protocol) or RMI(remote procedure
invocation) are used to describe, discover and call services. They have huge overhead and
complexity.
► Web API and REST are the alternative solutions.
► They use light weight data exchange formats like JSON which replace XML files to describe
services. They have less overhead and uses the communication channel and processing ability of
the devices efficiently.
► The API decouples innovation of services and service logic from protocols and network
elements. It also enables service portability between systems, i.e. a service may be allocated to
end-systems or servers, with possible relocation and replication throughout its lifecycle.
► Building APIs for IoT applications helps the service provider to focus on functionality, efficient
service monitoring and pricing tools.
Functional Blocks of IoT

Application

Services
Management Security
Communication

Device
IoT communication models

► Request-Response
► Publish-Subscribe
► Push-Pull
► Exclusive Pair
Request-Response model

CLIENT SERVER

❖ Receives
Request request
Sends ❖ Process
request to ❖ Looks/fetch
server es resources RESOURCES
Response ❖ Prepare
response
❖ Send
response
Publish-Subscribe Communication model

PUBLISHER BROKER
CONSUMER-1

Message TOPIC-1
published Subscribers:
to Topic-1 Consumer-1
Sends message Consumer-2
to Topics CONSUMER-2

Message TOPIC-2
published Subscribers:
to Topic-2 Consumer-3
CONSUMER-3
Push-Pull Communication model

QUEUES
PUBLISHER
CONSUMER-1

Sends
messages to Messages
queues Message pulled
pushed to from
queues queues

CONSUMER-2
Exclusive pair communication model

Request to set up connection

Response accepting the request

Message from client to server

CLIENT Message from server to client SERVER

Connection close request

Connection close response


IoT communication APIs
► REST based communication APIs
► Web Socket –based Communication APIs
REST based communication APIs
► A RESTful API is an application program interface (API)
► based on REpresentational STate transfer (REST), an architectural style and
approach to communications often used in web services development
► REST is a logical choice for building APIs that allow users to connect to,
manage and interact with cloud services
► A RESTful API uses existing HTTP methodologies. They use GET to retrieve a
resource; PUT to change the state of or update a resource, which can be
an object, file or block; POST to create that resource; and DELETE to remove
it.
► With REST, networked components are a resource the user requests access to.
REST based APIs Constraints
► Client server: UI and request-gathering concerns are the client’s domain. Data access,
workload management and security are the server’s domain
► State less :All client-server operations should be stateless, and any state management
that is required should take place on the client, not the server.
► Cacheable : All resources should allow caching unless explicitly indicated that caching
is not possible.
► Layered system: REST allows for an architecture composed of multiple layers of
servers.
► Uniform interface : Resources should be uniquely identifiable through a single URL,
► Code on demand : Most of the time, a server will send back static representations of
resources in the form of XML or JSON. However, when necessary, servers can send
executable code to the client.
Communication with REST APIs
Request-Response model used by REST
REST

CLIENT SERVER

Request (GET,PUT,UPDATE,DELETE)with
payload(JSON,XML)

Response(JSON,XML)

Request (GET,PUT,UPDATE,DELETE)with
payload(JSON,XML)

Response(JSON,XML)
Web socket based communication APIs

You might also like