You are on page 1of 122

UNIT-1

Introduction to IOT
What is Internet Of Things(IoT)
 Internet of Things(IoT) is a network of physical
objects or people called "things" that are
embedded with software, electronics, network,
and sensors that allows these objects to collect and
exchange data.
 The goal of IoT is to extend to internet connectivity
from standard devices like computer, mobile,
tablet to relatively dumb devices like a toaster.
 IoT makes virtually everything "smart," by
improving aspects of our life with the power of
data collection, AI algorithm, and networks. 
What is Internet Of Things(IoT)
 The thing in IoT can also be a person with a
diabetes monitor implant, an animal with
tracking devices, etc.
History of IOT
Internet of Things (IoT) Characteristics
 IoT is a global infrastructure for information, enabling
advanced services by interconnecting physical and
virtual things based on existing and evolving
information and communication technologies.
 IoT represents a convergence of several domains and
can be perceived as an umbrella term.
 The added value to the businesses through IoT is
created by the information that is collected by IoT
devices which go through five phases of IoT
lifecycle: Firstly, create phase, where devices or sensors
collect information from the physical environment
around them.
Internet of Things (IoT) Characteristics
 The data from smart connected devices can be
used to generate insights that can help
businesses, customers and partners.
 secondly, communicate phase, where the data
and events generated are sent through the
network to the desired destination;
 thirdly, aggregate phase, where data collected
are aggregated by devices itself;
Internet of Things (IoT) Characteristics
 fourthly, analyse phase, where, upon further
sophisticated analytics the aggregated data can
be used to generate basic patterns, control and
optimise processes
 finally, act phase, where suitable actions are
performed based on the information created.
 The IoT is a complex system with a number of
characteristics. Its characteristics vary from one
domain to another.
Internet of Things (IoT) Characteristics
 Some of the general and key characteristics
identified during the research study are as
follows:
Internet of Things (IoT) Characteristics
Internet of Things (IoT) Characteristics
Internet of Things (IoT) Characteristics
Internet of Things (IoT) Characteristics
Internet of Things (IoT) Characteristics
Internet of Things (IoT) Characteristics
How IOT works?
 The entire IOT process starts with the devices
themselves like smart phones, smart watches,
electronic appliances like TV, Washing
Machine which helps you to communicate with
the IOT platform.
 Here, are four fundamental components of an
IoT system:
How IOT works?
How IOT works?
How IOT works?
 However, it's not always one-way
communication. Depending on the IoT
application and complexity of the system, the
user may also be able to perform an action
which may create cascading effects.
 For example, if a user detects any changes in
the temperature of the refrigerator, with the
help of IOT technology the user should able to
adjust the temperature with the help of their
mobile phone.
IoT Applications
IoT Applications
IoT Applications
Challenges of IoT
At present IoT is faced with many challenges, such
as:
 Insufficient testing and updating

 Concern regarding data security and privacy

 Software complexity

 Data volumes and interpretation

 Integration with AI and automation

 Devices require a constant power supply which

is difficult
 Interaction and short-range communication
Advantages of IoT
Disadvantages IOT
Physical Design of IOT

 The "Things" in IoT usually refers to IoT


devices which have unique identities and can
perform remote sensing, actuating and
monitoring capabilities
Physical Design of IOT
How to connect two devices??
 For that obviously we need some connectivity
platform just like USB host, or Ethernet..
Generic block diagram of an IoT Device
Generic block diagram of an IoT Device
 An IoT device may consist of several interfaces
for connections to other devices, both wired
and wireless.
• I/O interfaces for sensors
• Interfaces for Internet connectivity
• Memory and storage interfaces
• Audio/video interfaces.
IOT Protocols
IOT Protocols
Link Layer
802.3 Ethernet
802.11 WiFi
802.16-Wi-Max
802.15.4-LR-WPAN
2G/3G/4G-Mobile Communication
Network Layer
IPv4
IPv6
6LoWPAN
Transport Layer
TCP
 TCP is a connection-oriented protocol, which means a
connection is established and maintained until
the application programs at each end have finished
exchanging messages.
 It determines how to break application data into packets
that networks can deliver, sends packets to and accepts
packets from the network layer, manages flow control and
-- because it is meant to provide error-free data
transmission -- handles retransmission of dropped or
garbled packets and acknowledges all packets that arrive.
 In the Open Systems Interconnection (OSI) communication
model, TCP covers parts of Layer 4, the transport layer,
and parts of Layer 5, the session layer.
UDP
Application Layer
HTTP
CoAP Protocol
 Constrained Application Protocol (CoAP) is a
specialized web transfer protocol for use with
constrained nodes and constrained networks in the
Internet of Things.
 CoAP is designed to enable simple, constrained devices
to join the IoT even through constrained networks with
low bandwidth and low availability.
 It is generally used for machine-to-machine (M2M)
applications such as smart energy and building
automation.
 The protocol was designed by the Internet Engineering
Task Force (IETF), CoAP is specified in IETF RFC 7252.
 The constrained devices are end nodes with
sensors/actuators that can handle a specific
application purpose.
 They are usually connected to gateway-like
devices, low power lossy network, and in-turn
communicates with the IoT cloud platforms.
 Typically they communicate via low power
wireless protocols like BLE, 802.15.4 (6LoWPAN,
Zigbee, Thread, WirelessHART etc), LPWAN etc
and mostly battery powered with low data rate.
How Does CoAP Function?
 CoAP functions as a sort of HTTP for restricted devices,
enabling equipment such as sensors or actuators to
communicate on the IoT.
 These sensors and actuators are controlled and contribute
by passing along their data as part of a system.
 The protocol is designed for reliability in low bandwidth
and high congestion through its low power consumption
and low network overhead.
 In a network with a lot of congestion or limited
connectivity, CoAP can continue to work where TCP-
based protocols such as MQTT fail to exchange
information and communicate effectively.
How Does CoAP Function?
 Additionally, the effective and conventional
CoAP features enable devices operating in poor
signal quality to send their data reliably or
enable an orbiting satellite to maintain its
distant communication successfully.
 CoAP’s also supports networks with billions of
nodes.
How Does CoAP Function?
 COAP uses UDP as the underlying network
protocol.
 COAP is basically a client-server IoT protocol
where the client makes a request and the server
sends back a response as it happens in HTTP.
 The methods used by COAP are the same used
by HTTP.
CoAP Security
 One must take security into account when
dealing with IoT protocols.
 For example, CoAP uses UDP to transport
information. CoAP relies on UDP security
features to protect information.
 As HTTP uses TLS over TCP, CoAP
uses Datagram TLS over UDP. 
 DTLS supports RSA, AES, and so on.
CoAP Security
 The smallest CoAP message is 4 bytes in length,
if omitting Token, Options and Payload.
 CoAP makes use of two message types, requests
and responses, using a simple, binary, base
header format.
 The base header may be followed by options in
an optimized Type-Length-Value format.
 CoAP is by default bound to UDP and optionally
to DTLS, providing a high level of
communications security.
CoAP Security
 Any bytes after the headers in the packet are
considered the message body.
 The length of the message body is implied by
the datagram length.
 The entire message must fit within a single
datagram when bound to UDP.
 When used with 6LoWPAN, as defined in 
RFC 4944, messages SHOULD also fit into a
single IEEE 802.15.4 frame to minimize
fragmentation.
WebSocket
MQTT
MQTT
 It is a very light weight and binary protocol, and
due to its minimal packet overhead, MQTT excels
when transferring data over the wire in
comparison to protocols like HTTP.
 Another important aspect of the protocol is that
MQTT is extremely easy to implement on the
client side.
 Ease of use was a key concern in the development
of MQTT and makes it a perfect fit for
constrained devices with limited resources today.
XMPP
 Extensible Messaging and Presence Protocol
(XMPP) is an open XML technology for real-
time communication, which powers a wide
range of applications including instant
messaging, presence and collaboration.
 To understand what this really means, let’s go
on a journey from P back to X…
XMPP
XMPP
XMPP
 It’s protocol for streaming XML elements over
a network in order to exchange messages and
presence information in close to real time.
 This protocol is mostly used by instant
messaging applications like WhatsApp.
XMPP
The operational architecture
DDS
 In a distributed system, middleware is the
software layer that lies between the operating
system and applications. It enables the various
components of a system to more easily
communicate and share data.
 It simplifies the development of distributed
systems by letting software developers focus
on the specific purpose of their applications
rather than the mechanics of passing
information between applications and systems.
 The DDS Middleware is a software layer that abstracts
the Application from the details of the operating
system, network transport, and low-level data
formats.
 The same concepts and APIs are provided in different
programming languages allowing applications to
exchange information across operating systems,
languages, and processor architectures.
 Low-level details like data wire format, discovery,
connections, reliability, protocols, transport selection,
QoS, security, etc. are managed by the middleware.
  It is an IoT protocol developed for M2M (Machine
to Machine) Communication by OMG (Object
Management Group).
 It enables data exchange via publish-subscribe
methodology.
 DDS makes use of brokerless architecture unlike
MQTT and CoAP protocols.
 It uses multicasting to bring high quality QoS to the
applications.
 DDS protocol can be deployed from low footprint
devices to cloud.
AMQP
 Advanced Message Queuing Protocol (AMQP)
is an open source published standard for
asynchronous messaging by wire.
 AMQP enables encrypted and interoperable
messaging between organizations and
applications. The protocol is used in
client/server messaging and in IoT device
management.
 AMQP can be used in any situation if there is a need for
high-quality and secure message delivery between client
and broker. 
 AMQP provides the following possibilities: 
 - Monitoring and sharing updates;
 - Ensuring quick response of the server to requests and
transmission of time-consuming tasks for further processing;
 - Distribute messages to multiple recipients;
 - Connection offline clients for further data retrieval;
 - Increase the reliability and smooth operation of applications.;
 - Reliability of message delivery;
 - High speed message delivery;
 - Message Acceptance.
How AMQP Works:
Logical Design of IoT
 Logical design of an IoT system refers to an
abstract representation of the entities and
processes without going into the low-level
specifics of the implementation.
 An IoT system comprises of a number of
functional blocks that provide the system the
capabilities for identification, sensing,
actuation, communication, and management.
Logical Design of IoT
 For understanding Logical Design of IoT, we
describes given below terms.
 IoT Functional Blocks
 IoT Communication Models
 IoT Communication APIs
IoT Functional Blocks
IoT Functional Blocks
IoT Communication
Models
Request-Response communication model
 Request-Response is a communication model
in which the client sends requests to the server
and the server responds to the requests.
 When the server receives a request, it decides
how to respond, fetches the data, retrieves
resource representations, prepares the
response, and then sends the response to the
client.
Request-Response communication model
 Request-response is a stateless communication
model and each request-response pair is
independent of others.
 HTTP works as a request-response protocol
between a client and server.
 A web browser may be the client, and an
application on a computer that hosts a web site
may be the server.
Request-Response communication model
 Example: A client (browser) submits an HTTP
request to the server; then the server returns a
response to the client. The response contains
status information about the request and may
also contain the requested content.
Request-Response communication model
Publish-Subscribe communication model
Publish-Subscribe communication model
 Publish-Subscribe is a communication model that
involves publishers, brokers and consumers.
 Publishers are the source of data. Publishers send
the 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 receive data for a topic from the
publisher, it sends the data to all the subscribed
consumers.
Publish-Subscribe communication model
Push-Pull Model
 Push-Pull is a communication model in which the
data producers push the data to queues and the
consumers Pull the data from the Queues.
 Producers do not need to be aware of the
consumers.
 Queues help in decoupling the messaging between
the Producers and Consumers.
 Queues also act as a buffer which helps in
situations when there is a mismatch between the
rate at which the producers push data and the rate
rate at which the consumer pull data.
Push-Pull Model
Exclusive Pair Model
 Exclusive Pair is a bidirectional, fully duplex
communication model that uses a persistent
connection between the client and server.
 Connection is setup it remains open until the
client sends a request to close the connection.
 Client and server can send messages to each
other after connection setup.
 Exclusive pair is stateful communication model
and the server is aware of all the open
connections.
Exclusive Pair Model
IoT Communication APIs
 Generally we used Two APIs For IoT
Communication. These IoT Communication
APIs are:
 REST-based Communication APIs
 WebSocket-based Communication APIs
REST-based Communication APIs
 Representational state transfer (REST) is a set of
architectural principles by which you can design
Web services the Web APIs that focus on
systems’s resources and how resource states are
addressed and transferred.
 REST APIs that follow the request response
communication model, the rest architectural
constraint apply to the components, connector
and data elements,  within a distributed
hypermedia system. 
 The rest architectural constraint are as follows:
REST-based Communication APIs
 The rest architectural constraint are as follows:
Client-server –  
 The principle behind the client-server constraint is

the separation of concerns.


 for example clients should not be concerned with

the storage of data which is concern of the server.


 Similarly the server should not be concerned about

the user interface, which is concern of the client. 


 Separation allows client and server to be

independently developed and updated.


REST-based Communication APIs
Stateless –
 Each request from client to server must contain

all the information necessary to understand the


request, and cannot take advantage of any
stored context on the server.
 The session state is kept entirely on the client.
REST-based Communication APIs
Cache-able –
 Cache constraints requires that the data within a

response to a request be implicitly or explicitly


leveled as cache-able or non cache-able.
 If a response is cache-able, then a client cache is

given the right to reuse that repsonse data for


later, equivalent requests.
 caching can partially or completely eliminate

some instructions and improve efficiency and


scalability.
REST-based Communication APIs
Layered system –
 layered system constraints, constrains the behavior of

components such that each component cannot see


beyond the immediate layer with they are interacting.
 For example, the client cannot tell whether it is

connected directly to the end server or two an


intermediary along the way.
 System scalability can be improved by allowing

intermediaries to respond to requests instead of the


end server, without  the client having to do anything
different.
REST-based Communication APIs
Uniform interface –
 uniform interface constraints requires that the

method of communication between client and


server must be uniform.
 Resources are identified in the requests (by

URIs in web based systems) and are


themselves is separate from the representations
of the resources data returned to the client.
REST-based Communication APIs
Code on demand –
 Servers can provide executable code or scripts

for clients to execute in their context. this


constraint is the only one that is optional.

A RESTful web service is a ” Web API ”


implemented using HTTP and REST
principles. REST is most popular IoT
Communication APIs.
REST-based Communication APIs
WebSocket based communication API
 Websocket APIs allow bi-directional,  full duplex
communication between clients and servers.
 Websocket APIs follow the exclusive pair communication
model. Unlike request-response model such as REST, the
WebSocket APIs allow full duplex communication and do
not require  new coonection to be setup for each message to
be sent.
 Websocket communication begins with a connection setup
request sent by the client to the server.
 The request (called websocket handshake) is sent over HTTP
and the server interprets it is an upgrade request.
 If the server supports websocket protocol, the server
responds to the websocket handshake response.
WebSocket based communication API
 After the connection setup client and server can
send data/mesages to each other in full duplex
mode.
 Websocket API reduce the network traffic and
letency as there is no overhead for connection
setup and termination requests for each message.
 Websocket suitable for IoT applications that have
low latency or high throughput requirements.
 So Web socket is most suitable IoT
Communication APIs for IoT System.
WebSocket based communication API

You might also like