0% found this document useful (0 votes)
11 views172 pages

Module 1

The document provides an overview of the Internet of Things (IoT), explaining its definition, characteristics, applications across various sectors, and the protocols that facilitate communication between IoT devices. It emphasizes the significance of unique identities for devices, their ability to communicate and process data, and the advancements in technology that enable these capabilities. Additionally, it discusses the physical design and working of IoT devices, along with various communication protocols such as MQTT, CoAP, and XMPP.

Uploaded by

mannatjs22
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views172 pages

Module 1

The document provides an overview of the Internet of Things (IoT), explaining its definition, characteristics, applications across various sectors, and the protocols that facilitate communication between IoT devices. It emphasizes the significance of unique identities for devices, their ability to communicate and process data, and the advancements in technology that enable these capabilities. Additionally, it discusses the physical design and working of IoT devices, along with various communication protocols such as MQTT, CoAP, and XMPP.

Uploaded by

mannatjs22
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Internet of Things

Bivas Ranjan Parida


Department of CSE
Silicon Institute of Technology
Bhubaneswar
Introduction
Introduction
qInternet of Things (IoT) comprises things that have unique identities
and are connected to the internet.
qThe focus on IoT is in the configuration, control and networking via
the Internet of devices or “things” that are traditionally not associated
with the internet.
Introduction
qThese include devices such as thermostats, utility meters, a Bluetooth-
connected headset, irrigation pumps and sensors, or control circuits for an
electric car’s engine.
qIoT is a new revolution in the capabilities of the endpoints that are
connected to internet that are being driven by advancements in capabilities
in sensor networks, mobile devices, wireless communications, networking
and cloud technologies.
IoT Era

Things connected online in billions


Data vs Information vs Knowledge
qData: Raw and unprocessed data obtained from IoT devices/systems.

qInformation: Information is inferred from data by filtering, processing,


categorizing, condensing and contextualizing data.

qKnowledge: Knowledge is inferred from information by organizing


and structuring information and is put into action to achieve specific
objectives.
Contd…
Scope of IoT
qNot only limited to just connecting things such as devices, appliances,
machines to the internet, IoT will allow these things to communicate
and exchange data(control & information), also executing meaningful
information towards a common user or machine goal. For example,
•Consider a series of raw sensor measurements
<(72,84),(84,56),(78,44),(100,43)> generated by a weather monitoring
station. To give meaning to the data, a context is added i.e., each tuple
in data represents the temperature and humidity measured every
minute.
• Further information is obtained by categorizing, condensing or
processing this data.
Applications of IoT
qHOMES:
qSmart lightning that adapts the
lighting to sui t t he ambi ent
conditions
qSmart appliances that can be
remotely monitored and
controlled
qIntrusion detection systems
qSmart smoke detectors
Applications of IoT
qCITIES:
qSmart parking systems that provides status updates on available
slots
qSmart lighting that helps in saving energy
qSmart roads that provide information on driving conditions
qStructural health monitoring systems
qENVIRONMENT:
qWeather monitoring
qAir noise pollution
qForest fire detection
qRiver flood detection systems
Applications of IoT
qENERGY SYSTEMS:
qSmart grids
qGrid integration of renewable energy sources
qPrognostic health management systems
qRETAIL:
qInventory management
qSmart payments
qSmart vending machines
Applications of IoT
qAGRICULTURE:
qSmart irrigation systems that help in saving water while enhancing
productivity
qGreen house control systems
qINDUSTRIAL APPLICATIONS:
qMachine diagnosis and prognosis systems that help in predicting
faults and determining the cause of faults and indoor air quality
systems.
qHEALTH AND LIFESTYLE:
qHealth and fitness monitoring systems
qWearable electronics.
Definition of IoT
• IoT has been defined as:
A dynamic global network infrastructure with self-configuring capabilities
based on standard and interoperable communication protocols where
physical and virtual “things” have identities, physical attributes and virtual
personalities and use intelligent interfaces, and are seamlessly integrated into
the information network, often communicate data associated with users and
their environments.
Characteristics of IoT
1. Dynamic & Self-Adapting: IoT devices and systems may have the
capability to dynamically adapt with the changing contexts and take
actions based on their operating conditions, user’s context or sensed
environment. Example: Surveillance systems
Cont…
2. Self-Configuring: IoT devices may have self-configuring capability
allowing a large number of devices to work together to provide
certain functionality.
qThese devices have the ability configure themselves, setup
networking and fetch latest software upgrades with minimal user
intervention.
qExample: Weather Monitoring System
Contd…
3. Interoperable Communication Protocols: IoT devices may
support a number of interoperable communication protocols and can
communicate with other devices and also with the infrastructure.
4. Unique Identity: Each IoT device has a unique identity and unique
identifier(such as IP address or URI).
qIoT systems have intelligent interfaces that adapt based on the
context, allow communicating with users and the environmental
contexts.
qIoT device interfaces allow users to query the devices, monitor
their status and control them remotely in associated with the
control, configuration and management infrastructure.
Contd…
5. Integrated into Information Network: IoT devices are usually
integrated into the information network that allows them to
communicate and exchange data with other devices and systems.
qIoT devices can be dynamically discovered in the network, by
other devices or network that have the capability to describe
themselves to other devices or user applications.
qExample: Weather monitoring node
Physical Design of IoT
Things in IoT
qThe “Things” in IoT usually refers to IoT devices that have unique
identities and can perform remote sensing, actuating and monitoring
capabilities.
Things in IoT
qIoT devices can
ü exchange data with other connected devices and applications
(directly or indirectly)

ü collect data from other devices

ü process the data either locally or send the data to centralized


servers or cloud-based application back-ends for processing the
data

ü perform some task locally other tasks within the IoT infrastructure
based on temporal and space constraints
Things in IoT
§ Things in IoT provides:
üIdentification and info storage(RFID tags, MAC address)
üInformation collection (Sensor networks, store sensor values)
üInformation processing(Understanding commands, filtering data)
üCommunications (Transmit and receive messages)
üActuation (Switch control, motor control)
Contd...

q Why Things are important?


ü20 billion things would be connected online
üShould be designed as per requirements of the specific application
and such an approach should be at minimal cost and performance-
optimized.
IoT Device
qAn IoT device may consist of several interfaces for connections to
other devices, both wired and wireless.
qThese include:
1. I/O interfaces for sensors
2. Interfaces for Internet connectivity
3. Memory and storage interfaces
4. Audio and video interfaces.
Block Diagram of IoT
Working of an IoT device
qAn IoT device can collect various types of data from the on-board or
attached sensors such as temperature, humidity, light intensity.
qThe sensed data can be communicated either to other devices or
cloud-based servers/storage.
qIoT devices can be connected to actuators that allow them to interact
with other physical entities in the vicinity of the device.
qData generated from an IOT device is processed by data analytics
systems leads to useful information to guide further actions either
locally or remotely.
Soil Monitoring System
•Sensor data generated by a soil
monitoring device in a field , when
processed can help in determining
the optimum watering schedule.

•Other tasks such as:


qFinding the alkalinity of the soil
qSoil testing for specific crop
qMonitoring the weeds or insects
IoT Protocols
IOT Protocols
Link Layer Protocols
qDetermine how the data is physically sent over the network’s physical
layer or medium.
qEg.: Copper wire, coaxial cable or a radio wave
qLink layer protocols determines how the packets are coded and
signaled by the hardware device over the medium to which the host
is attached such as a coaxial cable.
qScope:
ØLocal network connection to which host is attached.
ØHosts on the same link exchange data packets over the link layer
using link layer protocols.
802.3 Ethernet
qIEEE 802.3 is a collection of wired Ethernet standards for the link
layer.
Standard Specification Shared
Medium
802.3 10Base5 Ethernet Coaxial cable
802.3.i 10BaseT Ethernet Copper twisted
pair
802.3.j 10Base F Ethernet Fiber optic
[Link] 10Gbit/s Ethernet Fiber optic
802.3 Ethernet

qThe standards mentioned in above table provides data rates from


10Mb/s to 40 Gb/s and higher.
qThe shared medium carries the communication for all the devices on
the network thus , thus data sent by one device can be received by all
devices subject to propagation conditions and transceiver capabilities.
802.11- WiFi
Standard Data Rate
802.11a 5GHz band
802.11b 2.4GHz band
802.11g 2.4GHz band
802.11n 2.4GHz band/5GHz bands
802.11ac 5GHz band
802.11ad 60GHz band
802.11- WiFi
qIEEE 802.11 is a collection of Wireless local area network (WLAN)
communication standards.
qThese standards provides data rates from 1Mb/s upto 6.75 Gb/s that
are to be transmitted via Infra-red signals or by either frequency
hopping or direct sequence spread spectrum in ISM at 2.4 GHz .
802.16 - WiMax

qIEEE 802.16 is a collection of wireless broadband standards .

qWiMax provides data rates from 1.5Mb/s to 1Gb/s.

qRecent update of WiMax (802.16m) provides data rates of 100Mb/s


for mobile stations and 1Gbit/s for fixed stations.
802.15.4 - LR-WPAN

qIEEE 802.15.4 is a collection of standards for low rate wireless


personal area networks(LR-WPANs)
qThese standards form the basis of specifications for high level
communication protocols such as ZigBee.
qLR-WPAN provides data rates from 40Kb/s – 250Kb/s.
qThese standards provides low cost and low speed communication for
power constrained devices.
2G/3G/4G – Mobile Communication

qThere are different generations of mobile communication standards


that includes:
qSecond generation (2G including GSM, CDMA),
qThird generation (3G including UMTS, CDMA 2000)
qFourth generation (4G including LTE).
qIoT devices based on these standards can communicate over cellular
networks.
qData rate rates for these standards range from 9.6Kb/s (for 2G) to
upto 100Mb/s(for 4G).
Network layer/Internet Layer
qResponsible for sending of IP datagrams from the source network to
destination network.

qThis layer performs the host addressing and packet routing.

qThe datagrams contains source and destination addresses that are used
to route them from source to destination across multiple networks.

qHost identification is done using hierarchical IP addressing scheme


such as IPv4 or IPv6.
IPv4
qIP version 4 is most deployed internet protocol used to identify the
devices on a network using hierarchical addressing scheme.
qIPv4 uses 32 bit addresses scheme that allow total of 2 3 2 or
4,294,967,296 addresses.
qAs more and more devices gets connected to the internet, these
devices got exhausted in year 2011.
qIPv4 has been succeeded by IPv6.
qIP protocols establish connection on packet networks, but do not
guarantee delivery of packets.
qGuaranteed delivery and data integrity are handled by upper layer
protocols such as TCP.
IPv6
qIPv6 is the newest version of Internet Protocol and successor of IPv4.

qIPv6 uses 128 bit addresses scheme that allows total of 2 128 or
3.4X1038 addresses.
6LoWPAN
q IPv6 over Low Power Wireless Personal Area Networks brings IP
protocol to the low power devices which have limited processing
capacity.
q6LoWPAN operates in 2.4GHz frequency range and provides data
rates of 250Kb/s.
q6LoWPAN works with 802.15.4 link layer protocols.
qDefines compression mechanisms for IPv4 datagrams over IEEE
802.15.4 based networks.
Transport Layer
1. Provide end-to-end message transfer capability independent
underlying network.

2. The message transfer capability can be set up on connections either


using handshakes(in TCP) or without handshakes(in UDP)

3. Provide functions such as error control, flow control, segmentation


and congestion control.
TCP (Transmission Control Protocol)
§ It is a connection oriented protocol.

§ It is used for applications that requires the establishment of


connections such as FTP, web browsers along with HTTP, HTTPs,
email programs such as SMTP.

§ TCP is a stateful protocol and proceeds in SYN-ACK-data-FIN


sequence.
TCP (Transmission Control Protocol)
qIP protocol deals with sending packets while TCP ensures reliable
transmission of packets in-order.

qTCP also provide error detection capability so that duplicate packets


can be discarded and lost packets are retransmitted.

qThe flow control capability of TCP ensures that rate at which the
sender sends the data is not too high for the receiver to process.

qThe congestion control capability of TCP helps in avoiding network


congestion and congestion collapse which can lead to degradation of
network performance.
UDP (User Datagram Protocol)

qUnlike TCP, which requires carrying out an initial setup procedure,


UDP is a connectionless, transaction oriented and stateless
protocol.
qUseful for time-sensitive applications that have very small data units
to exchange and do not want the overhead of connection setup.
qUDP does not provide guaranteed delivery, ordering of messages
and duplicate elimination.
qHigher level of protocols can ensure reliable delivery or connections.
Application Layer
qIt defines how the applications interface with the lower layer
protocols to send the data over the network.
qThe application data is encoded by the application layer protocols
and encapsulated in the transport layer protocol which provides
connection or transaction oriented communication over the
network.
qPort numbers are used for application addressing.
qApplication layer protocols enables process-to-process connections
using ports.
HTTP (Hypertext Transfer Protocol)
• It is the application layer protocol that forms the foundations of the
World Wide Web(WWW).

• HTTP includes commands such as GET, PUT, POST, DELETE,


HEAD, TRACE, OPTIONS etc.

• The protocol follows a request-response model where a client send


requests to a server using the HTTP commands.
HTTP (Hypertext Transfer Protocol)
• HTTP is a stateless protocol and each HTTP request is independent of
the other requests.

• An HTTP client can be web browser or an application running in the


client.

• HTTP protocol uses Universal Resource Identifier(URIs) to identify


HTTP resources.
CoAP (Constrained Application Protocol)
qIt is an application layer protocol for machine-to-machine(M2M)
applications, meant for constrained environments with constrained
devices and constrained networks.

qLike HTTP, CoAP is a web transfer protocol and uses a request-


response model.

qIt runs on top of UDP instead of TCP.


CoAP (Constrained Application Protocol)
qCoAP uses a client-server architecture where clients communicate
with servers using connectionless datagrams.

qCoAP is designed to easily interface with HTTP.

qLike HTTP, CoAP supports methods such as GET, PUT, POST and
DELETE.
CoAP
WebSocket
§ WebSocket protocol allows full-duplex communication over a single
socket connection for sending messages between client and server.

§ WebSocket is based on TCP and allows streams of messages to be sent


back and forth between the client and server while keeping the TCP
connection open.

§ The client can be a browser, a mobile application or an IoT device.


Websocket
MQTT(Message Queue Telemetry Transport)

qMQTT is a light-weight messaging protocol based on the publish-


subscribe model.
qMQTT uses a client–server architecture where the client connects to
the server(MQTT broker) and publishes messages to topics on the
server.
qThe broker forwards the messages to the clients subscribed to topics.
qMQTT is well suited for constrained environments where the devices
have limited processing and memory resources and the network
bandwidth is low.
MQTT
XMPP(Extensible Messaging and Presence
Protocol)

qIt is a protocol for real-time communication and streaming XML


data between network entities.

qXMPP provides wide range of applications including messaging, data


syndication, gaming, multi-party chat and voice/video calls.

qXMPP allows sending small chunks of XML data from one network
entity to another in near real-time.
XMPP(Extensible Messaging and Presence
Protocol)
qXMPP is a decentralized protocol and uses a client-server architecture.

qXMPP supports both client-to-server and server-to-server


communication paths.

qIn contrast, XMPP allows real-time communication between IOT


devices.
DDS (Data Distribution Service)
qIt is a data-centric middleware standard for device-to-device or
machine-to-machine communication.
qDDS uses a publish-subscribe model where publishers create topics
to which subscribers can subscribe.
qPublisher is an object responsible for data distribution and the
subscriber is responsible for receiving published data.
qDDS provide quality-of-service(QoS) control and configurable
reliability.
AMQP(Advanced Message Queuing Protocol)
qIt is an open application layer protocol for business messaging.
qAMQP supports both point-to-point and publisher/subscriber
models, routing and queuing.
qAMQP brokers receive messages from publishers and route them over
connections to consumers.
qPublishers publish the messages to exchanges which then distribute
message copies to queues.
qMessages are either delivered by the broker to the consumers that
have subscribed to the queues or the consumers can pull the messages
from the queues.
AMQP
AMQP
qThe AMQP protocols consist of components that route and save
messages within a broker carrier, with a set of policies for wiring
the components together.
qAMQP has following three processing chains:
1. Exchange: Receives messages from publisher primarily based
programs and routes them to ‘message queues’.
2. Message Queue: Stores messages until they may thoroughly
process via the client software.
3. Binding: States the connection between the message queue and
the change.
Logical Design of IoT
Logical Design
qIt refers to an abstract representation of the entities and
processes without going into the low-level specifics of the
implementation.
Contents

• IoT Functional Blocks

• IoT Communication Models

• IoT Communication APIs


Iot Functional Blocks
Functional Blocks of IoT
qAn IoT system consists of number of functional blocks
capable of sensing, identification, actuation, communication
and management.
qFunctional Blocks are:
1. Device: IoT device performs sensation, actuation,
monitoring and control functions.
2. Communication : Handles the communication between
IoT devices.
3. Services: Device Monitoring, device control services,
data publishing services and services for device discovery
Contd…

3. Management : This block governs the IoT system.

4. Security: Authentication, authorization, message and content


integrity, data security

5. Applications: Provides an interface that the user can control and


monitor various aspects of IoT systems such as status or analyze the
processed data.
Functional Blocks of IoT
IoT Service Oriented Architecture
Technical Deviations from Regular Web
Iot Communication Models
Request-Response Communication Model

qIt is a stateless communication model and each request response pair


is independent of others.

qIt is a communication model in which the client sends requests to the


server and the server responds to the requests.

qWhen the server receives a request, it decides how to respond, fetches


the data, retrieves resource representations, prepare the response, and
then sends the response to the client.
Request-Response Communication Model
Publish-Subscribe Communication Model

qPublish-Subscribe is a communication model that involves publishers,


brokers and consumers.
qPublishers are the source of data.
qPublishers send the data to the topics which are managed by the
broker.
qPublishers are not aware of the consumers.
qConsumers subscribe to the topics that are managed by the broker.
qWhen the broker receives data for a topic from the publisher, it sends
the data to all the subscribed consumers.
Publish-Subscribe Communication Model
Publish-Subscribe Communication Model

§Here, Client1 publishes message to the topics that are managed by


broker.
§Client2 & Client3 subscribe to the topics.
§When the broker receives a required message for a topic from
Client1(publisher), it sends the data to all the subscribed clients i.e.
Client2 & Client3.
Push-Pull Communication Model
qPush-Pull is a communication model in which the data
producers push the data to queues and the consumers pull the
data from the queues.
qProducers do not need to be aware of the consumers.
qQueues help in decoupling the messaging between the
producers and consumers.
qQueues 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 consumers pull data.
Push-Pull Communication Model
Exclusive Pair Communication Model

qExclusive pair is a bi-directional, full duplex communication model


that uses a persistent connection between the client and server.
qOnce the connection is setup it remains open until the client sends a
request to close the connection.
qClient and server can send messages to each other after connection
setup.
qExclusive pair is a stateful communication model and the server is
aware of all the open connections.
Exclusive Pair Communication Model
IoT Communication APIs
What is a communication API?
• A communication API is a type of application programming
interface (API) that adds communications channels to
particular software. A communication API gives software
applications access to pre-built communication functions,
such as text, voice-based and video-based chat, email, and
SMS. For example, you can introduce an in-app chat feature
in your mobile app by using a chat API.
• APIs are mechanisms that enable two software components to
communicate with each other using a set of definitions and
protocols.
What is a communication API?
• An API or Application Programming Interface is a facilitator
that enables apps, databases, softwares and IoT devices to
communicate with each other, without which they won't be
able to interact. It's a set of tools and protocols used by
developers to build user-friendly software apps.
• Communications APIs provide a standard framework for
connecting a company's systems with other business
applications like CRMs, IoT devices, and e-commerce etc.
What is a communication API?
• There are four different types of APIs commonly used in web
services: public, partner, private and composite.
• Public API examples include social media bots, third-party login, e-
commerce transactions, and weather apps.
• Private API examples include streaming services, ensuring media
compatibility on various devices, and financial apps that connect
different aspects of managing finances in a bank.
• One of the best examples of Partner API is the Amazon API. Their
API allows various online businesses to connect directly with
[Link], check the inventory, and find shipping options.
• Composite APIs are a design approach to batch API requests
sequentially into a single API call. Rather than multiple round trips
to a server, a client can make one API request with a chain of calls
and receive one response.
IoT Communication APIs
• IoT APIs are the interface points between an IoT device and the
Internet and/or other network components.
• Although http based APIs are common on the web. However MQTT
is becoming the main IOT protocol, and we will likely see a large
growth of MQTT based APIs. All of the main IOT providers like
Amazon,Azure and IBM provide both http and MQTT APIs to
access their services.
• Generally we used Two APIs For IoT Communication.
Ø REST-based Communication APIs.
ØWebSocket-based Communication APIs.
What is the use of REST API in IoT?

The IoT Central REST API lets you:


• Add a device to your application.
• Update a device in your application.
• Get a list of the devices in the application.
• Get a device by ID.
• Get a device credential.
• Delete a device in your application.
• Filter the list of devices in the application.
REST

• Various data communication standards have evolved over the years


such as CORBA, SOAP, or XML-RPC, which usually established
strict messaging rules.
• REST was defined in 2000 by Roy Fielding and is considerably
simpler. It’s not a standard but a set of recommendations and
constraints for RESTful web services.
REST-Based Communication APIs

• Representational State Transfer(REST) is a set of architectural


principles by which we can design web services and web API’s that
focus on a system’s resources and how resource states are addressed
and transferred.
• REST APIs follow the request-response communication model .
• The REST architectural constraints apply to the components,
connectors and data elements within a distributed hypermedia systems.
REST communication constraints

• Client-Server: Clients should not be concerned with the storage of


data which is the concern of the server.
üSimilarly, server should not be concerned about the user interface
which is concerned of the client.
üSeparation allows client and server to be independently developed
and updated.
REST communication constraints
• Stateless:
• The server will not store anything about the latest HTTP request
the client made. It will treat every request as new. No session, no
history.
• If the client application needs to be a stateful application for the
end-user,
üThe user logs in once and does other authorized operations
ü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.
üThe client is responsible for managing the applications.
REST communication constraints
• Cache-able:
üCache constraint requires that the data within a response to the request
be implicitly or explicitly labeled as cacheable or non-cacheable .
üEg: A webpage is a cached version of HTML page.
üCaching brings performance improvement for the client-side and better
scope for scalability for a server because the load has been reduced.
üCaching can be implemented on the server or client-side.
üIf a response is cacheable then a client cache is given the right to reuse
that response for later, equivalent request.
üCaching can partially or completely eliminate some interactions and
improves efficiency and scalability.
REST communication constraints

• Layered System: It constraints the behavior of components such that


each component cannot see beyond the immediate layer with which
they are interacting.
üEg: A client cannot tell whether it is connected directly to the end
server or to an intermediary along the way.
üSystem scalability can be improved by allowing intermediaries to
respond to requests instead of the end servers, without the client
having to do anything different.
REST communication constraints
• Uniform Interface:
üThis constraint requires that the method of communication
between a client and a server must be uniform.
üResources are identified in the requests (URI) and are themselves
separate from representation of the resources that are returned to
the client.
üWhen a client holds a representation of a resource it has all the
information to update or delete the resource.
üEach information includes enough information to describe how to
process the message
REST communication constraints

• Code on Demand:
üServers can provide executable code or scripts for clients to
execute in their context.
üThis is optional constraint.
RESTful web service

• A RESTful web services is a web API implemented using HTTP and


REST principles.
• RESTful web service is a collection of resources which are
represented by URIs.
• RESTful APIs has a base URI.
• The client sends request to these URIs using the methods defined by
the HTTP protocol.
• A RESTful web service can support various Internet media types.
Communication with REST APIs
REST Based Communication
REST APIs

• REST APIs enable user to develop all kinds of web applications


having all possible CRUD operations.
§ C – Create
§ R – Retrieve
§ U – Update
§ D - Delete
Request- Response model used by REST
Creating a RESTful web service
A RESTful web service request contains:
1. An Endpoint URL: An application implementing a
RESTful API will define one or more URL endpoints with a
domain, port, path, and/or querystring
Example: [Link]

2. The HTTP method: Different HTTP methods can be used


on any endpoint which map to application create, read,
update, and delete (CRUD) operations.
Contd..
HTTP methods CRUD Actions
returns
GET read
requested data
creates a new
POST create
record
updates an
PUT update
existing record
deletes an
DELETE delete
existing record
Contd..
3. HTTP headers: Information such as authentication
tokens or cookies can be contained in the HTTP request
header.

4. Body Data: Data is normally transmitted in the HTTP body


in an identical way to HTML <form> submissions or by
sending a single JSON-encoded data string.
REST Response

• The response payload can be data, HTML, an image, an audio file,


and so on.
• Data responses are typically JSON-encoded, but XML, CSV, simple
strings, or any other format can be used.
• We could allow the return format to be specified in the request:
• Example: /user/123?format=json or /user/123?format=xml
• An appropriate HTTP status code should also be set in the response
header.
Contd..
HTTP response Actions
200 OK successful requests
201 Created when a record is created
400 Bad Request To return errors
404 Not Found To return errors
401 Unauthorized To return errors

• Other HTTP headers can be set including the Cache-


Control or Expires directives to specify how long a
response can be cached before it’s considered stale.
WebSocket-based Communication APIs

• WebSocket APIs allow bidirectional, full-duplex communication


between clients and servers.
• WebSocket APIs follows the exclusive pair communication model.
• Unlike request-response such as REST APIs, the WebSocket APIs
allow full duplex communication that do not require a new connection
to be setup for each message to be sent.
• WebSocket communication begins with a new connection setup
request sent by the client to the server.
• This request is called WebSocket handshake is sent over HTTP and
the server interprets it as an upgrade request.
WebSocket-based Communication APIs

• If the server supports WebSocket protocol, the server responds to the


WebSocket handshake response.
• After the connection is setup, the client and server can send
data/messages to each other in full-duplex mode.
• WebSocket APIs reduce the network traffic and latency as there is no
overhead for connection setup and termination requests for each
message.
• Websocket is suitable for IoT applications that have low latency or
high throughput requirements.
Cont..
Exclusive pair model used by WebSocket APIs
IoT Enabling Technologies
Wireless Sensor Networks

• WSN comprises of distributed devices with sensors that are used to


monitor the environmental and physical conditions.
• A WSN consists of number of end-nodes, routers and a coordinator.
• End nodes have several sensors attached to them.
• End nodes can also act as routers.
• Routers are responsible for routing the data packets from end nodes to
the coordinator.
• The coordinator collects the data from all the nodes.
• Coordinator also acts as a gateway that connects the WSN to the
internet.
Applications of WSN in IoT Systems

1. Weather monitoring Systems: Use WSNs in which nodes collect


temperature, humidity and other data, which is aggregated and
analyzed.
2. Indoor air quality monitoring systems: To collect data on the
indoor air quality and concentration of various gases.
3. Soil moisture monitoring systems: To monitor soil moisture at
various locations.
Applications of WSN in IoT Systems
4. Surveillance system: To collect surveillance data such as motion
detection data.
5. Smart grids: To monitor the grid at various points.
6. Structural health monitoring systems: To monitor health of
structures by collecting vibration data from sensor nodes deployed
at various points in the structure.
WSN

• WSNs are enabled by wireless communication protocols such as IEEE


802.15.4.
• ZigBee is one of the most popular wireless technologies used by
WSNs.
• Based on IEEE 802.15.4
• Operates at 2.4GHz frequency
• Offer data rates upto 250KB/s
• Range: 10-100m (depends on the power output and environmental
conditions)
Cloud Computing

• It is transformative computing paradigm that involves delivering


applications and services over the internet.
• It involves provisioning of computing, networking and storage
resources on demand and providing these resources as metered
services to the users, in a “pay as you go” model.
• Cloud computing resources can be provisioned on-demand by the
users, without requiring interactions with the cloud service provider.
Cloud Computing

• Cloud computing resources can be accessed over the network using


standard access mechanisms that provide platform-independent
access such as workstations, laptops, tablets and smart-phones
• The computing and storage resources provided by cloud service
providers are pooled to serve multiple users on the same physical
hardware.
• Users are assigned virtual resources that run on top of the physical
resources.
Cloud Service Models

• There are the following three types of cloud service models -


1. Infrastructure as a Service (IaaS)
2. Platform as a Service (PaaS)
3. Software as a Service (SaaS)
IaaS
• It is also known as Hardware as a Service (HaaS).
• It is one of the layers of the cloud computing platform.
• It allows customers to outsource their IT infrastructures such
as servers, networking, processing, storage, virtual machines,
and other resources.
• It provides the users the ability to provision computing and
storage resources.
• These resources are provided to the users as virtual machine
instances and virtual storage.
IaaS
• Users can start, stop, configure and manage the resources.
• Users can deploy operating systems and applications of their
choice on the virtual resources provisioned in the cloud.
• The cloud se rvi c e provi de r m a na ge s t he unde rl yi ng
infrastructure.
• Virtual resources provisioned by the users are billed based on
pay-per-use paradigm.
IaaS
Platform as a Service(PaaS)
• It provides a runtime environment.
• It provides the users the ability to develop and deploy
application in the cloud.
• In PaaS, back end scalability is managed by the cloud service
provider, so end-users do not need to worry about managing
the infrastructure.
• Example: Google App Engine, Azure.
PaaS
• It provide the following features:
ü Programming languages
ü Application frameworks
ü Databases
ü Other tools such as developing and deploy applications
in the clouds using development tools.
üSoftware libraries and services
• The cloud service provider manages the underlying cloud
infrastructure including servers, network, operating systems
and storage
• Users develop, deploy, configure and manage applications on
the cloud infrastructure.
PaaS
Software as a Service(SaaS)

• It is also known as "On-Demand Software".


• It is a software distribution model in which services are hosted by a
cloud service provider.
• SaaS provides the users a complete software application or the user
interface to the application itself.
• T he c l oud s e rv i c e p ro v i d e r m a n a g e s t h e u n d e rl y i n g c l o u d
infrastructure including servers, network, operating systems, storage
and application software.
Saas services

• The user is unaware of the underlying architecture of the cloud.


• Applications are provided to the user through a thin client interface.
• SaaS applications are platform independent.
• It can be accessed from various client devices such as workstations,
laptop, tablets and smart phones running different operating systems.
• Since the cloud service provider manages both the application and
data, the users are unable to access the applications from anywhere.
SaaS service provider
Big Data Analytics

• Big data is defined as collections of data sets whose volume, velocity


or variety is so large that it is difficult to store, manage, process and
analyze the data using traditional databases and data processing tools.
• Big data analytics involves several steps :
• Data Cleansing
• Data munging( wrangling)
• Data processing and visualization
Contd…
• Big Data generated by IoT systems in various applications
are:
ü Sensor data generated by weather monitoring stations.
ü Machine sensor data collected from sensors embedded in
industrial and energy systems for monitoring their health and
detecting failures.
ü Health and fitness data generated by IoT devices such as
wearable fitness band
ü Data generated by IoT devices for location and tracking
of vehicles.
ü Data generated by retail and inventory monitoring
systems
Characteristics of Big Data
1. Volume: Used for massive scale data that is difficult to store,
manage and process using traditional databases and data
processing architectures.
• The volumes of data generated by IT, social networks,
industrial, and health-care systems is growing exponentially
driven by the lowering costs of data storage and
processing architectures
• The need to extract valuable insights to improve business
processes, efficiency and service to consumers.
Characteristics of Big Data

2. Velocity:
• The data is increasing at a very fast rate.
• It is estimated that the volume of data will double in every 2
years.
3. Variety : Variety refers to the forms of the data.
• Big Data comes in different forms such as structured and
unstructured form including text, image, audio, video and sensor
data
ü Log file, CCTV footage is unstructured data.
ü Data which can be saved in tables are structured data like the
transaction data of the bank.
Communication Protocols

• Form the backbone of IoT systems.


• It enables internet connectivity and coupling of applications
• Allows devices to exchange data over the network.
• Various protocols used in link layer, network layer, transport layer and
application layer have already been discussed.
Communication Protocols

• These protocols define:


• Data exchange formats
• Data encoding
• Addressing schemes for devices
• Routing of packets from source to destination
• Sequence control
• Flow control
• Retransmission of lost packets
Embedded System
• It is a computer system that has computer hardware and
software embedded to perform specific tasks.
• Embedded systems are designed to perform a specific set of
tasks.
• Key components of an embedded system include
• microprocessors or microcontroller
• memory(RAM, ROM, cache),
• networking units(Ethernet, WiFi adapters)
• input/output units(display, keyboard, etc)
• storage ( such as flash memory).
Embedded System
• It also have specialized processors
• Digital signal processors(DSPs)
• Graphics processors
• Application specific processors.

• Embedded systems run embedded operating systems such as real-


time operating system(RTOS).
• It range from low-cost miniaturized devices such as digital
watches to devices such as digital cameras, point of sale
terminals, vending machines, appliances etc.
Iot levels and
Deployment Templates
IoT System

• An IoT system comprises of following components:


qDevices: An IoT device allows identification, remote sensing,
actuating and remote monitoring capabilities.
qResource: Resources are software components on the IoT device
for accessing, processing and storing sensor information or
controlling actuators connected to the device.
• Resources also include software components that enable network
access for the device.
IoT System (cont…)
qController Service:
§ It is a native service that runs on the device and interacts
with the web services.
§ Controller service
§ sends data from the device to the web service and
receives commands from the application (via web
services) for controlling the device.
IoT System (cont…)

qDatabase: It can be either local or in the cloud and stores the data
generated by the IoT device.
qAnalytic Components:
§ This component is responsible for analyzing the IoT data and
generate results in a form which are easy to understand.
§ Analysis can be performed either locally or in the cloud.
Analyzed results are stored in the local or cloud databases.
IoT System (cont…)

qApplication:
§ It provides an interface that the users can control and monitor
various aspects of IoT systems.
§ Applications allow users to view the system status and view the
processed data.
qWeb Service: This serves as a link between the IoT device,
application, database and analytic components.
• Web Service can be either implemented using HTTP and REST
principles or using WebSocket protocol (Websocket service).
REST Vs WebSocket

• Stateless/ Stateful
• Uni-directional/ Bi-directional
• Request-response/ Exclussive Pair Communication
• TCP Connections
• Header overhead
• Scalability
REST Vs WebSocket

• Stateless/Stateful:
qREST services are stateless in nature.
§ Each request contains all the information needed to process it.
Requests are independent of each other.
qWebSocket is stateful in nature
§ where the server maintains the state and is aware of all the open
connections.
REST Vs WebSocket

• Uni-directional/Bi-directional:
q REST services operate over HTTP and are unidirectional.
§ Request is always sent by a client and the server responds to the
requests.
q WebSocket is bidirectional
§ allows both client and server to send messages to each other.
REST Vs WebSocket

• Request-response/Full Duplex:
q REST services follow a request-response model where the client
sends request and the server responds to the request.
q WebSocket allows full-duplex communication between client and
server.
• TCP Connections:
q For REST services, each HTTP request involve setting up a new
TCP connection.
q Websocket involves a single TCP connection over which the
client and server communicate in full duplex mode.
REST Vs WebSocket

• Header overhead:
§ REST services operate over HTTP and each request is independent
of others.
§ Thus each request carries HTTP headers which is an overhead. Due
to overhead of HTTP headers, REST is not suitable for real-time
applications.
§ WebSocket does not involve overhead of HTTP headers.
§ After the initial handshake, the client and server exchanges
message with minimal frame information. Thus, WebSocket is
suitable for real-time applications.
REST Vs WebSocket
• Scalability:
§ Scalability is easier in the case of REST services as
request are independent and no state information needs to
be maintained by the servers.
§ Thus, both horizontal and vertical scaling solutions are
possible for HTTP services.
§ For WebSockets, horizontal scaling can be cumbersome
due to the stateful nature of the communication.
§ Since the server maintains the state of a connection,
vertical scaling is easier for WebSockets than horizontal
scaling.
Horizontal Scaling

• Horizontal Scaling:
• It is also called scaling out
• Adding additional nodes or machines to your infrastructure to cope
with new demands.
• If you are hosting an application on a server and find that it no
longer has the capacity or capabilities to handle traffic, adding a
server may be your solution.
Vertical Scaling
• It is also called scaling up.
• Describes adding additional resources to a system so that it
meets demand.
• Example:
• If your server requires more processing power, vertical
scaling would mean upgrading the CPUs. You can also
vertically scale the memory, storage, or network speed.
• Additionally, vertical scaling may also describe replacing
a server entirely or moving a server’s workload to an
upgraded one.
IoT Level-1

• An IoT Level-1 system has a single node/device that performs sensing


and/or actuation, stores data, performs analysis and hosts the
application.

• Level-1 IoT systems are suitable


• for modeling low-cost and low-complexity solutions where the
data involved is not big and the analysis requirements are not
computationally intensive.
IoT Level-1
IoT Level-1
• Example: Smart Home automation
• The system consists of single node that allows controlling the
lights and appliances in a home remotely.
• The devices interfaces with the lights and appliances using
electronic relay switches.
• The status information of each light or appliance is maintained
in a single database.
• REST services deployed locally allow retrieving and updating
the state of each light or appliance in the status database.
IoT Level-1
• The controller service continuously monitors the state of each light or
appliance and triggers the relay switch accordingly.

• The application which is deployed locally has a user interface for


controlling the lights and appliances.

• Since the device is connected to the Internet, the application can be


accessed remotely as well.
IoT Level-2

• A level-2 IoT system has a single node that performs sensing and/or
actuation and local analysis.

• Data is stored in the cloud and application is usually cloud-based.

• These are suitable for solutions


• where data involved is big, however, the primary analysis
requirement is not computationally intensive and can be locally
itself.
IoT Level-2
IoT Level-2
• Example: Smart Irrigation:
• The system consists of a single node that monitors the soil moisture
level and controls the irrigation system.
• The device used in this system collects soil moisture data from
sensors.
• The controller service continuously monitors the moisture levels.
• If the moisture level drops a below threshold, the irrigation system
is turned on.
• For controlling irrigation system, actuators such as solenoid valves
can be used.
IoT Level-2

• The controller also sends the moisture data to the computing cloud.
• A cloud-based REST web service is used for storing and retrieving
moisture data stored in the cloud database.
• A cloud-based application is used for visualizing moisture levels over
a period of time, that helps in making decision about irrigation
schedules.
IoT Level-3

• This level has a single node.


• Data is stored and analyzed in the cloud and application is cloud-based.
• Level-3 IoT systems are suitable for solutions where the data involved
is big and the analysis requirement are computationally intensive.
IoT Level-3
IoT Level-3

• Example: Tracking package handling


• The system consists of a single node that monitors the vibration levels for a
package being shipped.
• The device in this system uses accelerometer and gyroscope sensors for
monitoring vibration levels.
• The controller service sends the sensor data to the cloud in real-time using
a WebSocket service.
• The data is stored in the cloud and also visualized using a cloud-based
application.
• The analysis components in the cloud can trigger alerts if the vibration
levels greater than a threshold.
IoT Level-3

• Advantage of using WebSocket over REST service is that, the sensor


data can be sent in real time to the cloud.
• Moreover, cloud based applications can subscribe to the sensor data
feeds for viewing the real-time data.
IoT Level-4

• A level-4 IoT system has multiple nodes that performs local analysis.
• Data is stored and analyzed in the cloud and application is cloud-based.
• Level-4 contains local and cloud-based observer nodes which can
subscribe to and receive information collected in the cloud from IoT
devices.
• Observer nodes can process information and use it for various
applications, however, observer nodes do not perform any control
functions.
IoT Level-4
IoT Level-4

• Level-4 IoT systems are suitable for solutions where, multiple nodes are
required, the data involved is big and the analysis requirement are
computationally intensive.
• Example : Noise Monitoring
• The system consists of multiple nodes placed in different locations for
monitoring noise levels in an area.
• The nodes equipped with sound sensors.
• Nodes are independent of each other.
• Each node runs its own controller service that sends the data to the cloud.
• The data is stored in a cloud database.
IoT Level-4

• The analysis of data collected from a number of nodes is done in the


cloud.
• A cloud-based application is used for visualizing the aggregated data.
IoT Level-5

• A level-5 IoT system has multiple end nodes and one coordinator node.
• The end nodes that perform sensing and/or actuation.
• Coordinator node collects data from the end nodes and sends to the
cloud.
• Data is stored and analyzed in the cloud and application is cloud-based.
• Level-5 IoT systems are suitable for solutions based on WSNs, where
the data involved is big and the analysis requirement are
computationally intensive.
IoT Level-5
IoT Level-5

• Example: Forest Fire detection


• The system consists of multiple nodes placed in different locations for
monitoring temperature, humidity and CO2 levels in a forest.
• The end nodes are equipped with various sensors such as temperature,
humidity and CO2 .
• The coordinator node collects the data from the end nodes and acts as
a gateway that provides Internet conectivity to the IoT system.
• The controller service on the coordinator device sends the collected
data to the cloud.
IoT Level-5

• The data is stored in a cloud database.


• The analysis of data is done in the computing cloud to aggregate the
data and make predictions.
• A cloud based applications is based for visualizing the data.
IoT Level-6

• A level-6 IoT system has multiple independent end nodes that


perform sensing, and/or actuation and send data to the cloud.
• Data is stored and analyzed in the cloud and application is cloud-based.
• The analytics component analyzes the data and stores the results in the
cloud database.
• The results are visualized with the cloud-based application.
• The centralized controller is aware of the status of all the end nodes
and sends control commands to the nodes.
IoT Level-6
IoT Level-6

• Example: Weather Monitoring System


• The system consists of multiple nodes placed in different locations for
monitoring temperature, humidity and pressure in an area.
• The end nodes are equipped with various sensors such as temperature,
humidity and pressure.
• The end nodes send the data to the cloud in real-time using a
WebSocket service.
IoT Level-6

• The data is stored in a cloud database.


• The analysis of data is done in the cloud to aggregate the data and
make predictions.
• A cloud-based application is used for visualizing the data.

You might also like