Module 2-Topic b-IoT Communication Protocols
Module 2-Topic b-IoT Communication Protocols
Communication Protocols
Module 2
[email protected]
1
CONTENT
• IoT Protocol Stack
• Logical Design of IoT
• IoT Functional Block
• IoT Communication Models
• IoT Communication APIs
• IoT Communication APIs
• REST
• WebSocket
2
IoT Communication Protocols
• IoT protocols operate on 4 pillars – device, connectivity, data, and
analytics.
• The device layer comprises a combination of sensors, hardware,
actuators, software and gateways, constituting a device that connects
and interacts with a network.
• The data layer involves the data collected, processed, stored, and
analyzed in business contexts.
3
IoT Protocol Stack
4
IoT Protocol Stack
5
Data Link Layer
8
Transport Layer
9
Application Layer
10
Logical Design of IoT
11
Provide the system the
capabilities for identification,
IoT Functional sensing, actuation,
communication and
Blocks management.
• Device: An IoT system comprises of
devices that provide sensing, actuation,
monitoring and control functions.
• Communication: handles the
communication for IoT system.
• Services: for device monitoring, device
control services, data publishing services
and services for device discovery.
• Management: Provides various functions
to govern the IoT system.
• Security: Secures IoT system and priority
functions such as authentication,
authorization, message and context
integrity and data security.
• Application: IoT application provide an
interface that the users can use to
control and monitor various aspects of
IoT system. 12
IoT Communication Models – 4 Models
Communication
Communication Models
APIs
13
Request-Response Model
• In which the client sends request to the server and the server replies to
requests. Is a stateless communication model and each request-response pair
is independent of others.
14
Publish-Subscribe Model
• Involves publishers, brokers and consumers. Publishers are source of data. Publishers
send data to the topics which are managed by the broker. Publishers are not aware of the
consumers. Consumers subscribe to the topics which are managed by the broker. When
the broker receives data for a topic from the publisher, it sends the data to all the
subscribed consumers.
15
Push-Pull Model
• Data producers push data to queues and consumers pull data from the
queues. Producers do not need to aware of the consumers. Queues help in
decoupling the message between the producers and consumers.
16
Exclusive Pair Model
• It is bi-directional, fully duplex
communication model that uses
a persistent connection
between the client and server.
• Once connection is set up it
remains open until the client
send a request to close the
connection.
• Is a stateful communication
model and server is aware of all
the open connections.
17
IoT Communication APIs
18
WebSocket
REST
19
REST based communication APIs [Request-Response Model]
• REST means REpresentational State Transfer.
• REST is a set of architectural principles, which the web services are designed
and web APIs focuses on a system’s resources.
20
REST based communication APIs [Request-Response Model]
• Example: User reads the weather at a given location through weather
application on user’s smartphone.
• The mobile apps uses a REST API provided by weather website to access
weather information. When a user selects a location in the mobile app,
the application sends a HTTP or HTTPS request. Then the weather server
responds back with weather details.
• In a REST-based communication, the client sends HTTP or HTTPS requests
like GET, POST, PUT, DELETE, etc., to the server where the REST-based API
will accept these requests, process them and send back responses. The
responses sent back to the clients will be in Extensible Markup Language
(XML) or JavaScript Object Notation (JSON) format.
21
REST based communication APIs [Request-Response Model]
22
REST based communication APIs [Request-Response Model]
• Client-Server: As REST is based on request-response model, the
communication involves two entities namely, client and server. A client sends
requests and the server process the requests and sends back responses.
• Stateless: As REST follows request-response model, it is stateless. The server
will not be able to associate a set of requests to a client. It will treat each
request as a new request.
• Cacheable: The response sent by the server might be cached at the client
side. This will allow the client to load the response faster next time when it is
needed.
23
REST based communication APIs [Request-Response Model]
• Layered System: The REST architecture is layered where there is a clear
separation in the functionality carried by different entities.
• Uniform Interface: REST provides an uniform interface for all kinds of
applications and devices.
• Code on Demand: REST enables to access the code based on a specific
request. Based on the request, the code that is going to be executed might be
changed.
24
WebSocket
REST
25
WebSocket-based Communication APIs
• WebSocket APIs allow bi-
directional, full duplex
communication between clients
and servers.
• WebSocket APIs follow the
exclusive pair communication
model.
• No need to establish connection
for each request. It is suitable
for IoT applications that need
low latency.
IoT Data Protocols
27
IoT Data Protocols
• IoT protocols establish the end-to-end communication between IoT
devices and hardware at source client / server using wired or wireless .
• Advanced Message Queuing Protocol (AMQP)
• Used in banking and finance
• 3 message component – Exchange, Queue, an and Routing.
• WebSocket
• Open platform communication unified architecture (OPC UA)
• Data Distribution Service
• It used UDP based on publish/subscribe API.
• Extensible Messaging and Presence Protocol (XMPP)
• Blutooth
IoT Level and Deployment
29
IoT Level and Deployment
30
IoT Level 1
31
IoT Level 1 – Example: Home Automation System
32
IoT Level 2
33
IoT Level 2 - Example: Smart Irrigation
34
IoT Level 3
35
IoT Level 3
36
IoT Level 4
37
IoT Level 4
38
IoT Level 5
39
IoT Level 5
40
IoT Level 6
41
IoT Level 6
42
Thank you
44