Unit-III-part 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

What is 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.”

or

“The Internet of Things (IoT) is a system of interrelated computing devices,


mechanical and digital machines, objects, animals or people that are provided with
unique identifiers and the ability to transfer data over a network without requiring
human-to-human or human-to-computer interaction.”

Example : home appliances, devices(smoke detector, camera, solar , moister


sensor, sonar etc.)
Characteristic of IOT
1. Connectivity
 The most important feature one can consider is connectivity.
Without seamless communication among the interrelated
components of the IoT ecosystems (i.e sensors, compute
engines, data hubs, etc.) it is not possible to execute any
proper business use case.
 IoT devices can be connected over Radio waves, Bluetooth, Wi-
Fi, Li-Fi,( LiFi (light fidelity) is a bidirectional wireless system
that transmits data via LED or infrared light. It was first
unveiled in 2011 and, unlike wifi, which uses radio frequency,
LiFi technology only needs a light source with a chip to
transmit an internet signal through light waves.) etc.
 We can leverage various protocols of internet connectivity
layers in order to maximize efficiency and establish generic
connectivity across IoT ecosystems and Industry.
 There may be special cases where the IoT ecosystem is built
on-premises or in an intranet.
2. Sensing
 We humans can naturally understand and analyze our
circumstances easily based on our past experiences with
various things or situations.
 In the case of IoT in order to get the best of it, we need to read
the analog signal, convert it in such a way that we can derive
meaningful insights out of it.
 We use Electrochemical, gyroscope, pressure, light sensors,
GPS, Electrochemical, pressure, RFID,(Radio Frequency
Identification (RFID) refers to a wireless system comprised of
two components: tags and readers. The reader is a device that
has one or more antennas that emit radio waves and receive
signals back from the RFID tag. ... Passive RFID tags are
powered by the reader and do not have a battery.) etc. to
gather data based on a particular problem. For example for
automotive use cases, we use Light detection sensors along
with pressure, velocity and imagery sensors.
3. Active Engagements
 IoT device connects various products, cross-platform
technologies and services work together by establishing an
active engagement between them.
 In general, we use cloud computing in blockchain to establish
active engagements among IoT components.
 In the case of Industry grade, IoT solutions raw analog data
need to be acquired, preprocessed and rescale as per business
capacity. As per Google, only 50% of structured and 1% of
unstructured data is used to make important business
decisions. So while designing the IoT ecosystems carriers need
to consider the future needs of manipulating such a huge
scale of data to satisfy incremental business needs. One can
confuse the need of active engagements with scale, practically
it means your systems should be able to handle huge data
across various technologies, platforms, products, and
industries.
4. Scale
 IoT devices should be designed in such a way that they can be
scaled up or down easily on demand. In general, IoT is being
used from smart home automation to automating large
factories and work stations, so the use cases vary in scale. A
carrier should design their IoT infrastructure depending upon
their current and future engagement scale.
5. Dynamic Nature
 The first and foremost step is to collecting and converting data
in such a way that means business decisions can be made out
of it.
 In this whole process, various components of IoT need to
change their state dynamically. For example, the input of a
temperature sensor will vary continuously based on weather
conditions, locations, etc.
 IoT devices should be designed this keeping in mind.
6. Intelligence
 In almost every IoT use cases in today‘s world, the data is used
to make important business insights and drive important
business decisions.
 We develop machine learning/ deep learning models on top of
this massive data to obtain valuable insights. The analog
signals are preprocessed and converted to a format on
which machine-learning models are trained. We need to keep
in mind the proper data infrastructure based on business
needs.
7. Energy
 From end components to connectivity and analytics layers, the
whole ecosystems demand a lot of energy. While designing an
IoT ecosystem, we need to consider design methodology such
that energy consumption is minimal.
8. Safety
 One of the main features of the IoT ecosystem is security. In
the whole flow of an IoT ecosystem, sensitive information is
passed from endpoints to the analytics layer via connectivity
components. While designing an IoT system we need to adhere
to proper safety, security measures, and firewalls to keep the
data away from misuse and manipulations. Compromising any
component of an IoT ecosystem can eventually lead to failure
of the whole pipeline.
9. Integration
 IoT integrates various cross-domain models to enrich user
experience. It also ensures proper trade-off between
infrastructure and operational costs.

Physical Design of IoT – IoT Protocols


Physical Design of
IoT

“Things” in IoT IoT Communication


Protocols

Physical Design of IoT


―Physical Design of IoT refers to IoT Devices and IoT
Protocols.‖

 Things are Node device which have unique identities and can
perform remote sensing, actuating and monitoring capabilities.

 IoT Protocols helps Communication established between


things and cloud based server over the Internet.
Things
 Basically Things refers to IoT Devices which have unique
identities and can perform remote sensing, actuating and
monitoring capabilities.

 Things are is main part of IoT Application.

 IoT Devices can be various type, Sensing Devices, Smart


Watches, Smart Electronics appliances, Wearable Sensors,
Automobiles, and industrial machines.

 These devices generate data in some forms or the other which


when processed by data analytics systems leads to useful
information to guide further actions locally or remotely.
 For example, Temperature data generated by a Temperature
Sensor in Home or other place, when processed can help in
determining temperature and take action according to users.

Above picture, shows a generic block diagram of IoT device. It may


consist of several interfaces for connections to other devices. IoT
Device has I/O interface for Sensors, Similarly for Internet
connectivity, Storage and Audio/Video.
IoT Device collect data from on-board or attached Sensors and
Sensed data communicated either to other device or Cloud based
sever. Today many cloud servers available for especially IoT System.
These Platfrom known as IoT Platform. Actually these cloud
especially design for IoT purpose. So here we can analysis and
processed data easily.
How it works ?

IoT Things
For example if relay switch connected to an IoT device can turn
On/Off an appliance on the commands sent to the IoT device over
the Internet.

IoT Protocols
IoT protcols help to establish Communication between IoT Device
(Node Device) and Cloud based Server over the Internet. It help to
sent commands to IoT Device and received data from an IoT device
over the Internet.
ISO layers
OSI stands for Open Systems Interconnection. It has been
developed by ISO – ‗International Organization of Standardization‗,
in the year 1984. It is a 7 layer architecture with each layer having
specific functionality to perform. All these 7 layers work
collaboratively to transmit the data from one person to another
across the globe.
Link Layer
Link layer protocols determine how data is physically sent over the
network‘s physical layer or medium (Coxial calbe or other or radio
wave).
Link Layer determines how the packets are coded and signaled by
the hardware device over the medium to which the host is attached
(eg. coxial cable).

Link Layer Protocols:


802.3 – Ethernet :
 Ethernet is a set of technologies and protocols that are used
primarily in LANs.
 It was first standardized in 1980s by IEEE 802.3 standard.
 IEEE 802.3 defines the physical layer and the medium access
control (MAC) sub-layer of the data link layer for wired
Ethernet networks.
 Ethernet is classified into two categories: classic Ethernet and
switched Ethernet.

802.11 – WiFi :
 IEEE 802.11 is part of the IEEE 802 set of LAN protocols, and
specifies the set of media access control (MAC) and physical
layer (PHY) protocols for implementing wireless local area
network (WLAN) Wi-Fi computer communication in various
frequencies, including but not limited to 2.4 GHz, 5 GHz, and
60 GHz frequency bands.
802.16 – Wi-Max :
 The standard for WiMAX technology is a standard for Wireless
Metropolitan Area Networks (WMANs) that has been developed
by working group number 16 of IEEE 802, specializing in
point-to-multipoint broadband wireless access. ( The Point-
to-Multipoint topology (also called star topology or simply
P2MP) is a common network architecture for outdoor wireless
networks to connect multiple locations to one single central
location.)
 Initially 802.16a was developed and launched, but now it has
been further refined. 802.16d or 802.16-2004 was released as
a refined version of the 802.16a standard aimed at fixed
applications.
 Another version of the standard, 802.16e or 802.16-2005 was
also released and aimed at the roaming and mobile markets.

802.15.4 -LR-WPAN :
 A collection of standards for Low-rate wireless personal area
network.
 The IEEE‘s 802.15.4 standard defines the MAC and PHY layer
used by, but not limited to, networking specifications such as
Zigbee®, 6LoWPAN, Thread, WiSUN and MiWi™ protocols.
 The standards provide low-cost and low-speed communication
for power constrained devices.
 Low rate wireless personal area networks (LR-WPANs) target
low data rate, low power consumption and low cost wireless
networking, and offer device level wireless connectivity. They
are ideal for applications such as public security, battle field
monitoring, inventory tracking, as well as home and office
automation.
2G/3G/4G- Mobile Communication :
 These are different types of telecommunication generations.
 IoT devices are based on these standards can communicate
over the celluer networks.

Network Layer

Responsible for sending of IP datagrams from the source network to


the destination network. Network layer performs the host
addressing and packet routing. We used IPv4 and IPv6 for Host
identification.
IPv4 :
 An Internet Protocol address (IP address) is a numerical
label assigned to each device connected to a computer network
that uses the Internet Protocol for communication.
 An IP address serves two main functions: host or network
interface identification and location addressing.
 Internet Protocol version 4 (IPv4) defines an IP address as a
32-bit number.
 However, because of the growth of the Internet and the
depletion of available IPv4 addresses, a new version of IP
(IPv6), using 128 bits for the IP address, was standardized in
1998. IPv6 deployment has been ongoing since the mid-2000s.
IPv6 :
 Internet Protocol version 6 (IPv6) is the most recent version
of the Internet Protocol (IP), the communications protocol that
provides an identification and location system for computers
on networks and routes traffic across the Internet.
 IPv6 was developed by the Internet Engineering Task Force
(IETF) to deal with the long-anticipated problem of IPv4
address exhaustion.
 IPv6 is intended to replace IPv4.
 In December 1998, IPv6 became a Draft Standard for the
IETF, who subsequently ratified it as an Internet Standard on
14 July 2017.
 IPv6 uses a 128-bit address, theoretically allowing 2128, or
approximately 3.4×1038 addresses.

6LoWPAN :
 6LoWPAN is an acronym of (IPv6 over Low-Power Wireless
Personal Area Networks).
 6LoWPAN is the name of a concluded working group in the
Internet area of the IETF.
 6LoWPAN is a somewhat contorted acronym that combines the
latest version of the Internet Protocol (IPv6) and Low-power
Wireless Personal Area Networks (LoWPAN).
 6LoWPAN, allows for the smallest devices with limited
processing ability to transmit information wirelessly using an
internet protocol.
 6LoWPAN can communicate with 802.15.4 devices as well as
other types of devices on an IP network link like WiFi.

Transport Layer
This layer provides functions such as error control, segmentation,
flow control and congestion control. This layer protocols provide
end-to-end message transfer capability independent of the
underlying network.

TCP :
 TCP (Transmission Control Protocol) is a standard that defines
how to establish and maintain a network conversation through
which application programs can exchange data.
 TCP works with the Internet Protocol (IP), which defines how
computers send packets of data to each other.
 Together, TCP and IP are the basic rules defining the Internet.

UDP :
 User Datagram Protocol (UDP) is a Transport Layer protocol.
 UDP is a part of Internet Protocol suite, referred as UDP/IP
suite. Unlike TCP, it is unreliable and connectionless protocol.
So, there is no need to establish connection prior to data
transfer.

Application Layer

Application layer protocols define how the applications interface


with the lower layer protocols to send over the network.
HTTP :
 Hypertext Transfer Protocol (HTTP) is an application-layer
protocol for transmitting hypermedia documents, such as
HTML.
 It was designed for communication between web browsers and
web servers, but it can also be used for other purposes.
 HTTP follows a classical client-server model, with a client
opening a connection to make a request, then waiting until it
receives a response.
 HTTP is a stateless protocol, meaning that the server does not
keep any data (state) between two requests. Though often
based on a TCP/IP layer, it can be used on any reliable
transport layer, that is, a protocol that doesn‘t lose messages
silently like UDP does. RUDP — the reliable update of UDP —
is a suitable alternative.
CoAP :
 CoAP-Constrained Application Protocol is a specialized
Internet Application Protocol for constrained devices, as
defined in RFC 7252.
 It enables devices to communicate over the Internet.
 It is defined as Constrained Application Protocol, and is a
protocol intended to be used in very simple hardware.
 The protocol is especially targeted for constrained
hardware such as 8-bits microcontrollers, low power
sensors and similar devices that can’t run on HTTP or
TLS.
 It is a simplification of the HTTP protocol running on UDP,
that helps save bandwidth.
 It is designed for use between devices on the same constrained
network (e.g., low-power, lossy networks), between devices and
general nodes on the Internet, and between devices on
different constrained networks both joined by an internet.
 CoAP is also being used via other mechanisms, such as SMS
on mobile communication networks.
WebSocket :
 A WebSocket is a bi-directional communication protocol.
 A WebSocket operates over TCP as an upgrade to a standard
HTTP connection. This enables full-duplex message-based
communication between the client and server using a single
socket.
 WebSocket communication presents a suitable protocol for the
IoT environment where bundles of data are transmitted
continuously within multiple devices. A WebSocket makes
server and device communication easy. A server needs a
WebSocket library to be installed and we need to have the
WebSocket client and web browser installed on the client or
device that supports WebSocket.
 WebSockets provide a huge benefit for real-time, event-driven
web applications. It is used for real-time data updates and
synchronization, live text chat, video conferencing, VOIP, IoT
control and monitoring. These capabilities enable apps in
gaming, social networks, logistics, finance and home, vehicle
and industrial automation, to name a few. Most major web
browsers currently support their use.
 The protocol consists of an opening handshake followed by
basic message framing, layered over TCP.

MQTT : (message queue Telementry Transport)


MQTT is a machine-to-machine (M2M)/”Internet of Things”
connectivity protocol.

 It was designed as an extremely lightweight publish/subscribe


messaging transport and useful for connections with remote
locations where a small code footprint is required and/or
network bandwidth is at a premium. For example, it has been
used in sensors communicating to a broker via satellite link,
over occasional dial-up connections with healthcare providers,
and in a range of home automation and small device
scenarios.
 MQTT protocol runs on top of the TCP/IP networking stack.
When clients connect and publish/subscribe,

 MQTT has different message types that help with the


handshaking of that process.

 The MQTT header is two bytes and first byte is constant. In


the first byte, you specify the type of message being sent as
well as the Quality of Service level, retain, and DUP
(duplication) flags. The second byte is the remaining length
field.

XMPP :
 Extensible Messaging and Presence Protocol (XMPP) is a
communication protocol for message-oriented middleware
based on XML (Extensible Markup Language).

 It enables the near-real-time exchange of structured yet


extensible data between any two or more network entities.
 Originally named Jabber, the protocol was developed by the
eponymous open-source community in 1999 for near real-time
instant messaging (IM), presence information, and contact list
maintenance.
 Designed to be extensible, the protocol has been used also for
publish-subscribe systems, signaling for VoIP(Voice over
Internet Protocol), video, file transfer, gaming, the Internet of
Things (IoT) applications such as the smart grid, and social
networking services.
 XMPP is the Extensible Messaging and Presence Protocol, a set
of open technologies for instant messaging, presence, multi-
party chat, voice and video calls, collaboration, lightweight
middleware, content syndication, and generalized routing of
XML data.
 XMPP was originally developed in the Jabber open-source
community to provide an open, decentralized alternative to the
closed instant messaging services at that time.

DDS :
 The Data Distribution Service (DDS™) is a middleware
protocol and API standard for data-centric connectivity
from the Object Management Group® (OMG®).
 It integrates the components of a system together, providing
low-latency data connectivity, extreme reliability, and a
scalable architecture that business and mission-critical
Internet of Things (IoT) applications need.
 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 developer‘s focus on the specific purpose of their
applications rather than the mechanics of passing information
between applications and systems.
AMQP : (Advanced Message Queuing Protocol)
 The Advanced Message Queuing Protocol (AMQP) is an open
standard for passing business messages between applications
or organizations. It connects systems, feeds business
processes with the information they need and reliably
transmits onward the instructions that achieve their goals.

Key Capabilities

 Organizations – applications in different organizations


 Technologies – applications on different platforms
 Time – systems don‘t need to be available simultaneously
 Space – reliably operate at a distance, or over poor networks
Business Case

The main reasons an enterprise will chose AMQP over proprietary


alternatives are:
 Realize the savings commoditization brings; remove vendor lock-
in
 Connect applications on different platforms; choose the right
platform for the job
 Connect to business partners using a full featured open
standard; remove technical barriers to trade.
Logical Design of IoT
Logical design of IoT system refers to an abstract representation of
the entities & processes without going into the low-level specifies of
the implementation. For understanding Logical Design of IoT, we
describes given below terms.
 IoT Functional Blocks
 IoT Communication Models
 IoT Communication APIs

IoT Functional Blocks


An IoT system comprises of a number of functional blocks that
provide the system the capabilities for identification, sensing,
actuation, communication and management.
functional blocks are:

Device: An IoT system comprises of devices that provide sensing,


actuation, monitoring and control functions.
Communication: Handles the communication for the IoT system.
Services: services for device monitoring, device control service, data
publishing services and services for device discovery(Service
discovery is the process of automatically detecting devices and
services on a network).
Management: This blocks provides various functions to govern the
IoT system.
Security: this block secures the IoT system and by providing
functions such as authentication, authorization, message and
content integrity, and data security.
Application: This is an interface that the users can use to control
and monitor various aspects of the IoT system. Application also
allow users to view the system status and view or analyze the
processed data.

IoT Communication Models


 Request-Response Model
 Publish-Subscribe Model
 Exclusive Pair Model
 Push-Pull Model

Request-Response Model
Request-response model is 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 representation,
prepares the response, and then sends the response to the client.
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.
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.
Publish-Subscribe 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.
MQTT—a pub-sub protocol

MQTT is a fairly well-known transport protocol that uses the pub-


sub architecture. MQTT is extremely lightweight: it takes up almost
no space in a device, so that even small devices with very little
computing power can use it.

MQTT defines the truck and the routes. But it doesn‘t define how
the load (the data) is packed or unpacked. That‘s where Sparkplug
comes in.

MQTT with Sparkplug

The Sparkplug open MQTT client specification provides a messaging


format appropriate for industrial use.

Sparkplug encodes the data payload: it defines how the data is


packed on the truck before it‘s sent by the publisher, and how it is
unpacked in the subscriber.

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 at which the consumer pull data.
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.
IoT Communication APIs

Generally we used Two APIs (Application programming interface) 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‘ 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:
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 serve.
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.
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.
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 responses data for later, equivalent
requests. caching can partially or completely eliminate some
instructions and improve efficiency and scalability.
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.
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 URIsin web
based systems) and are themselves is separate from the
representations of the resources data returned to the client. When a
client holds a representation of resources it has all the information
required to update or delete the resource you (provided the client
has required permissions). Each message includes enough
information to describe how to process the message.
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.
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
connection 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.
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.

REST WEBSOCKET
stateless Statefull
Request-responses model Full duplex
Each request involves setting up a Single TCP connection
new TCP connection
Header overhead No header overhead
Not suitable for Real Time Suitable for RTA, Game
Application (RTA) Application and Chat application

You might also like