0% found this document useful (0 votes)
27 views130 pages

Unit_I_IOT

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

Unit_I_IOT

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

Unit I

Introduction
Module – I
INTRODUCTION TO IoT
Definition and IoT Enabling
Characteristics
Technologies
Physical Design Things
 Wireless Sensor
Protocols
Networks
Logical Design
Cloud Computing
Functional Blocks
Big Data Analytics
Communication Models
Communication
Communication APIs
Protocols
Introduction to measure
Embedded Systems
the physical quantities
IoT Levels and
Deployment Templates

2
Internet of Things
It comprises things that have unique
identities and are connected to the
Internet.

The focus on IoT is in the


configuration, control and networking
via the Internet of devices.

E.g.Thermostats, bluetooth connected


headset, irrigation pumps and sensors.

3
Internet of Things
It is driven by advancements in
sensor networks, mobile devices,
wireless communication and cloud
computing.

In the year 2020, there will be 50


billion devices connected to Internet.

Itwill be excited by new markets for


their products.

4
Inferring information and
knowledge from data

5
Example: Weather monitoring
station
A series of raw sensor measurements
((72, 45); (84, 56)) are generated by
sensors every minute.
Context is added (temperature,
humidity).
Average temperature & humidity is
obtained for last 5 minutes by
averaging last 5 tuples.
An alert can be raised if average
temperature exceeds 120F.

6
Applications of IoT
Home
◦ Smart lightning
◦ Smart appliances
◦ Intrusion detection
◦ Smoke/gas detectors
Cities
◦ Smart parking
◦ Smart roads
◦ Emergency response

7
Applications of IoT
Environment
◦ Weather monitoring
◦ Forest fire detection
Energy
◦ Smart grids
◦ Renewable energy systems
Logistics
◦ Route generation & scheduling
◦ Fleet tracking
8
Applications of IoT
Agriculture
◦ Smart irrigation
◦ Green house control
Industry
◦ Machine diagnosis & prognosis
◦ Indoor air quality monitoring
Health & lifestyle
◦ Health & fitness monitoring
◦ Wearable electronics
9
Internet of Things
A dynamic global network infrastructure
with self-configuring capabilities
It is based on standard and
interoperable communication protocols
Physical and virtual “things” have
identities, attributes and use intelligent
interfaces
Devices are seamlessly integrated into
information network
Devices communicate data associated
with users and their environments.

10
Characteristics of IoT
Dynamic and self-adapting:
◦ IoT devices have capability to adapt
with changing contexts
◦ Devices take actions based on their
operating conditions, user’s context,
or sensed environment.
◦ E.g. Surveillance camera can adapt
their mode to normal (during day) and
infra-red mode (during night).
◦ Cameras can switch from lower
resolution to higher resolution modes.

11
Characteristics of IoT
Self-configuring:
◦ It allows a large no. of devices to work
together to provide certain
functionality (such as weather
monitoring).
◦ These devices have ability to
 configure themselves
 set up network
 fetch latest software upgrades

12
Characteristics of IoT
Interoperable communication
protocols:
◦ IoT devices may support a number of
interoperable communication protocols
◦ IoT devices can communicate with
other devices and also with
infrastructure.

13
Characteristics of IoT
Unique identity:
◦ Each IoT device has a unique identity
and a unique identifier (such as an IP
address or a URI).
◦ IoT systems have intelligent interfaces
which adapts based on the context
◦ IoT device interfaces allow users to:
 query the devices
 monitor their status and
 control them remotely

14
Characteristics of IoT
Integrated into information network:
◦ IoT devices are integrated into
information network
◦ Network allows to communicate and
exchange data with other devices
◦ IoT devices can be dynamically
discovered by other devices
◦ IoT devices have capability to describe
themselves to other devices
◦ E.g. weather monitoring node can
describe its monitoring to another
connected node.
15
IoT Devices
Home appliances - Washing machine, Fridge
Smart phones & computers – PC, tablets,
mobile phones
Wearable electronics – Smart watch, fit bit
Automobiles – Car
Energy systems – Smart grid
Surveillance cameras

16
Physical design of IoT
 Things in IoT:

◦ It refers to IoT devices which have unique


identities and can perform remote sensing,
actuating and monitoring capabilities.

◦ IoT devices can exchange data with other


connected devices and applications.

17
Physical design of IoT
 Things in IoT:
◦ IoT devices can collect data from other devices.

◦ IoT devices process the data either locally or


send the data to centralized servers or cloud-
based application back-ends for processing the
data.

◦ IoT devices can have temporal and space


constraints (i.e. memory, processing
capabilities, communication latencies and
deadlines).

18
Things in IoT Device
An IoT device consists of
◦ I/O interfaces for sensors
◦ Interfaces for Internet connectivity
◦ Memory and storage interfaces
◦ Audio/video interfaces

19
Generic block diagram of an IoT device

Legend:
USB – Universal Serial Bus
RJ – Registered Jack
DDR – Double Data Rate Random Access Memory
CPU – Central Processing Unit
GPU – Graphics Processing Unit
HDMI – High-Definition Multimedia Interface
SD – Secure Digital card
UART – Universal Asynchronous Receiver/Transmitter
SPI – Service Provider Interface
I2C – Inter Integrated Circuit
CAN – Controller Area Network 20
Things in IoT Device
An IoT device can collect various types
of data from the on-board or attached
sensors, such as temperature, humidity,
light intensity.

The sensed data can be communicated


to other devices or cloud based storage.

IoT devices can be connected to


actuators that allow them to interact
with other physical entities. E.g. Relay
switch can turn an appliance on/off.
21
IoT Protocols
Linklayer protocol
Network/Internet layer protocol
Transport layer protocol
Application layer protocol

22
IoT Protocols

Legend:
TCP –
HTTP – Hyper Text Transfer Protocol
Transmission Control Protocol
CoAP – Constrained Application Protocol
UDP –
MQTT – Message Queue Telemetry Transport
User Datagram Protocol
XMPP – Extensible Messaging and Presence Protocol
6LoWPAN –
DDS – Data Distribution Service
IPv6 over Low power Wireless
AMQP – Advanced Message Queuing Protocol
Personal Area Networks 23
Link layer protocol
Itdetermines how the data is physically
sent over the network’s physical layer
or medium (e.g. copper wire).

Hosts on the same link exchange data


packets over the link layer using link
layer protocols.

It determines how the packets are


coded and signaled by hardware device
over medium.

24
Link layer protocol
802.3 – Ethernet:
◦ It is a collection of wired Ethernet
standards for the link layer.
Standard name Shared medium
10BASE5 Ethernet using
802.3
Coaxial cable
10BASE-T Ethernet over
802.3.i Copper twisted-pair
connections
10BASE-F Ethernet over
802.3.j
Fiber optic connections

◦ Data rate: 10Mb/s to 40 Gb/s


◦ The shared medium carries
communication for all the devices on
network. 25
Link layer protocol
802.11 - WiFi
◦ It is a collection of wireless LAN
communication standards.
◦ Data rate: 1 Mb/s to 6.75 Gb/s
Standard Bandwidth

802.11a 5 GHz

802.11b, 802.11g 2.4 GHz

802.11n 2.4/5 GHz

26
Link layer protocol
802.16 – WiMax
◦ Collection of wireless broadband
standards
◦ Data rate: 1.5 Mb/s to 1 Gb/s
◦ Data rate of 802.16m – 100 Mbit/s

802.15.4 – LR-WPAN
◦ Collection of standards for low-rate
wireless personal area networks
◦ It is the basis of protocols such as ZigBee
◦ Data rate: 40 Kb/s to 250 Kb/s
◦ Low cost and low speed communication
for power constrained devices
27
Link layer protocol
2G/3G/4G – Mobile
communication:
◦2G - GSM and CDMA
◦3G – UMTS and CDMA2000
◦4G – LTE
◦IoT devices based on these
standards can communicate
over cellular networks.
◦Data rate: 9.6 Kb/s (for 2G) to
100 Mb/s (for 4G) 28
Network/Internet Layer
Responsible for sending IP
datagrams from source network to
destination network.
Performs host addressing and
packet routing.
Datagrams contain source and
destination addresses for routing
across multiple networks.
Host identification is done using IPv4
or IPv6.

29
Network/Internet Layer
 IPv4:
◦ Identifies the devices on a network using
a hierarchical addressing scheme
◦ Uses a 32-bit addressing scheme
allowing 232 addresses
◦ Exhausted during 2011
◦ IP protocols establish connections on
packet networks
◦ Do not guarantee delivery of packets
◦ Guaranteed delivery is handled by TCP in
transport layer

30
Network/Internet Layer
 IPv6:
◦ Successor of IPv4
◦ Uses 128-bit address scheme allowing a
total of 2128 addresses
 6LoWPAN (IPv6 over Low power Wireless
Personal Area Networks):
◦ It brings IP protocol to low-power
devices which have limited processing
capability
◦ Operates in 2.4 GHz frequency range
◦ Data rate: 250 Kb/s

31
Transport Layer
 End-to-end message transfer capability
independent of the underlying network.
 Message transfer capability can be set
up on connections.
 Connection can be either using
handshakes (TCP) or without
handshakes/acknowledgements (UDP).
 Provides error control, segmentation,
flow control and congestion control.

32
TCP
 Used by web browsers (along with
HTTP, HTTPS application layer
protocols), email programs (SMTP) and
file transfer (FTP).
 TCP is a connection oriented and
stateful protocol.
 Ensures reliable transmission of
packets in-order.
 Provides error detection capability,
duplicate packets are discarded & lost
packets are retransmitted.

33
TCP
Flow control ensures that rate at
which the sender sends the data
is not too high for the receiver to
process.
Congestion control helps in
avoiding degradation of network
performance.

34
UDP
Itis a connectionless protocol.
Used for time-sensitive applications
that have very small data units to
exchange.
No overhead of connection setup.
Does not provide guaranteed
delivery, ordering of messages and
duplicate elimination.
Higher levels of protocols ensures
reliable delivery.

35
Application Layer
 It define how the applications interface
with the lower layer protocols to send
data.
 The application data is encoded by
application layer protocol and
encapsulated in transport layer protocol.
 Port numbers are used for application
addressing (port 80 for HTTP, port 22 for
SSH).
 It enable process-to-process connections
using ports.

36
Application Layer Protocols
 HTTP (Hypertext Transfer Protocol):
◦ Foundation of WWW
◦ Includes commands such as GET, PUT,
POST, DELETE etc.
◦ Follows a request-response model using
commands
◦ Stateless protocol
◦ Each HTTP request is independent of other
requests
◦ HTTP client can be browser/ an client
application
◦ HTTP protocol uses URI (Universal Resource
Identifier) to identify HTTP resources.
37
Application Layer Protocols
 CoAP (Constrained Application Protocol):
◦ Suited for machine-to-machine (M2M)
applications
◦ Meant for constrained environments with
constrained devices and constrained
networks
◦ It is a web transfer protocol and uses a
request-response model
◦ It runs on top of UDP instead of TCP
◦ Client communicates with server using
connectionless datagrams
◦ CoAP supports methods such as GET,
PUT, POST & DELETE.
38
Application Layer Protocols
WebSocket:
◦Allows full-duplex communication
over a single socket connection
between client-server
◦Based on TCP
◦Allows streams of messages to
be sent back and forth between
client-server
◦Client can be a browser, a mobile
application or an IoT device
39
Application Layer Protocols
 MQTT (Message Queue Telemetry
Transport):
◦ Light-weight messaging protocol based
on the publish-subscribe model
◦ Client device (Publisher) connects to
MQTT Broker (Server) for publishing
messages to topics on server
◦ Broker forwards the messages to
clients subscribed to topics
◦ Suited for constrained environments
where devices have limited processing,
memory resources and network
bandwidth is low
40
Publish-Subscribe
communication model

41
Application Layer Protocols
◦ XMPP (Extensible Messaging and Presence
Protocol):
 Suited for real-time communication
between IoT devices
 Streams XML data between network entities
 Wide range of applications including
messaging, gaming, multi-party chat and
voice/video calls
 Allows sending small chunks of XML data
from one network entity to another in real-
time
 Supports both client-to-server and server-
to-server communication paths
42
Application Layer Protocols
 DDS (Data Distribution Service):
◦ It is a data-centric middleware standard
◦ Suited for device-to-device or machine-to-
machine communication
◦ Uses a publish-subscribe model where publishers
create topics to which subscribers can subscribe
◦ Publisher object is responsible for data
distribution
◦ Subscriber is responsible for receiving published
data
◦ Provides QoS control and configurable reliability

43
Application Layer Protocols
AMQP (Advanced Message
Queuing Protocol):
◦ Protocol for business messaging
◦ Supports both point-to-point and
publisher/subscriber models, routing
and queuing
◦ AMQP brokers receive messages from
publishers and route them over
connections to consumers
◦ Publishers publish the messages to
exchanges which then distribute
message copies to queues
44
Application Layer Protocols
AMQP (Advanced Message Queuing
Protocol):
◦ Publishers publish the messages
to exchanges which then
distribute message copies to
queues
◦ Messages are either delivered by
the broker to the consumers
which have subscribed to the
queues or the consumers can pull
the messages from the queues
45
Logical design of IoT
Abstract representation of the
entities and processes without
going into the low-level specifics of
the implementation

46
IoT Functional Blocks
Functional blocks provide the
capabilities for identification,
sensing, actuation, communication
and management

47
IoT Functional Blocks
Device
Communication
Services
Management
Security
Application

48
IoT Functional Blocks

49
IoT Functional Blocks
Device:
◦ It provides sensing, actuation,
monitoring and control functions
Communication:
◦ It handles communication among IoT
devices using communication protocols
Services:
◦ Serves device monitoring, device control
services, data publishing services and
device discovery service

50
IoT Functional Blocks
Management:
◦ Provides various functions to govern the IoT
system
Security:
◦ Provides authentication, authorization,
message and content integrity, and data
security
Application:
◦ Provides an interface that the users can use to
control and monitor various aspects of system
◦ Allows users to view system status and
analyze the processed data.
51
IoT communication
models
Request-Response model
Publish-Subscribe model
Push-Pull model
Exclusive Pair model

52
Request-Response model

53
Request-Response model
Itis a stateless communication model
and each request-response pair is
independent of others
Client sends request to server and
server responds to requests
Server after receiving request decides
how to respond, fetches the data,
retrieves resource representations,
prepares the response and then sends
response to client

54
Publish-Subscribe model
 Involves publishers, brokers and
consumers
 Publishers are the source of data
 Publishers send data to the topics which
are managed by broker
 Publishers are not aware of consumers
 Consumers subscribe to the topics which
are managed by the broker
 When broker receives data for a topic
from publisher, it sends data to all
subscribed consumers

55
Push-Pull model
2 entities: Data producers and
Consumers
Data producers push the data to
queues and 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
56
Push-Pull model
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 consumers
pull data

57
Push-Pull model

58
Exclusive Pair model
 It is a bi-directional, fully duplex model
that uses a persistent connection
between client and server
 Once the 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
 It is a stateful model
 Server is aware of all the open
connections

59
Exclusive Pair model

60
IoT Communication APIs
REST-based
Communication APIs
WebSocket-based
Communication APIs

61
REST-based
Communication APIs
Representational State Transfer
(REST) is a set of architectural
principles
Web services and web APIs are
designed
Follows request-response model
Architectural constraints apply to
components, connectors and data
elements
62
REST architectural constraints
Client-Server:
◦ Follows “Separation of concerns”
principle
◦ Server concerns the storage of data
◦ Client concerns about user interface
◦ Client/server can be independently
updated
Stateless:
◦ Request from client to server must
contain all the information necessary to
understand the request
◦ Session state is kept entirely on client
63
REST architectural constraints
Cache-able:
◦ Data within a response is implicitly or
explicitly labeled as cache-able or non-
cache-able
◦ If it is cache-able, then a client cache
is given the right to reuse the response
data
◦ Caching eliminates some interactions
and improves scalability & efficiency

64
REST architectural constraints
Layered system:
◦ Each component cannot see beyond the
immediate layer with which they are
interacting
◦ Client does not know whether it is
connected to end server/ intermediary
◦ Scalability is improved by allowing
intermediaries to respond to requests
instead of end server
Code on demand:
◦ Servers can provide executable code or
scripts for clients to execute in their
context
65
REST architectural constraints
Uniform Interface:
◦ Method of communication between a
client and a server must be uniform
◦ Resources are identified in the
requests by URIs
◦ Client holds a representation of
resources
◦ If client has permission, then it can
update/delete the resource
◦ Message includes information to
describe how to process the message

66
Communication with REST APIs

67
Request-response model used by REST

68
RESTful web service
It is a web API implemented using
HTTP and REST principles
RESTful web service is a collection
of resources which are represented
by URIs
The client sends request to these
URIs using the methods defined by
HTTP protocol (e.g. GET, PUT, POST,
DELETE)

69
RESTful web service
It supports various Internet media
types (such as JSON)
IP for Smart Objects Alliance (IPSO
Alliance) has published an
Application Framework that defines
a RESTful design for use in IP smart
object systems

70
HTTP request methods and actions
HTTP Resource Action
Method Type

GET Collection URI List all the resources in a collection

GET Element URI Get information about a resource

POST Collection URI Create a new resource

POST Element URI Generally not used

Replace the entire collection with another


PUT Collection URI
collection

PUT Element URI Update a resource

DELETE Collection URI Delete the entire collection

DELETE Element URI Delete a resource

71
WebSocket-based
Communication APIs
Allows bi-directional, full duplex
communication between client &
servers
Follow the exclusive pair
communication model
Do not require a new connection to
be setup for each message to be
sent

72
WebSocket-based
Communication APIs
Communication begins with a
connection setup request
(WebSocket handshake)
Request sent by client to server
over HTTP
Server responds with WebSocket
handshake response
After connection setup, client and
server can send messages to each
other in full-duplex mode
73
WebSocket-based
Communication APIs
No overhead of connection setup
and termination requests for
each message
So it reduces network traffic and
latency
Suited for IoT applications that
have low latency or high
throughput requirements

74
Exclusive pair model used by WebSocket APIs
WebSocket Protocol Server
Client
Request to setup WebSocket connection
Initial
Response accepting the request Handshake
(over HTTP)
Data frame

Data frame Bidirectional


communication
Data frame (over
persistent
WebSocket
Data frame connection)

Connection close request


Closing
connection
Connection close response

75
IoT Enabling Technologies
Wireless sensor networks
Cloud computing
Big data analytics
Embedded systems
Security protocols and architectures
Communication protocols
Web services
Mobile Internet
Semantic search engines

76
Wireless Sensor Networks
It comprises of(WSN)
distributed devices
with sensors which monitor the
environment.
WSN have a no. of end nodes, routers
and a coordinator.
End-nodes have several sensors
attached to them.
End-nodes can also act as routers.
Routers route the data packets from
end-nodes to coordinator.
Coordinator collects the data from all
nodes.
77
Wireless Sensor Networks
(WSN)
Coordinator acts as a gateway that
connects WSN to Internet.
E.g.:
◦ Weather monitoring systems use WSN
in which nodes collect temperature
◦ Soil moisture monitoring systems use
WSNs to monitor soil moisture at
various locations
◦ Surveillance systems use WSNs for
collecting surveillance data (motion
detection data)

78
Wireless Sensor Networks
(WSN)
WSNs are enabled by wireless
communication protocols such as
IEEE 802.15.4.
ZigBee is based on IEEE 802.15.4.
ZigBee operates at 2.4 GHz
frequency, offers data rates upto
250 KB/s and range from 10 to 100
meters
WSNs are self-organizing networks

79
Wireless Sensor Networks
(WSN)
WSNs have large no. of nodes and
manual configuration for each node
is not possible.
In the event of failure of some
nodes or addition of new nodes to
the network, the network can
reconfigure itself.

80
Cloud computing
Delivers apps and services over
Internet.
Involves provisioning of computing,
networking and storage resources on
demand
Providing these resources as metered
services causes “pay as you go” model
Resources can be provisioned on-
demand by the users and the process
is automated

81
Cloud computing
Resources can be accessed over
network using standard access
mechanisms
The services are platform-independent
and accessed by heterogeneous client
platforms such as workstations, laptops
etc.
Multi-tenant:
◦ Allow multiple users to be served by same
physical hardware
◦ Users are assigned virtual resources that
run on top of physical resources
82
Types
IaaS
PaaS
SaaS

83
IaaS – Infrastructure-as-a-Service
It provides the ability to provision
computing and storage resources
Resources are provided to users
as virtual machine instances and
virtual storage
Users can start, stop, configure
and manage the virtual machine
instances and virtual storage

84
IaaS – Infrastructure-as-a-Service
Users can deploy OS and
applications of their choice on the
virtual resources provisioned in the
cloud
The cloud service provider
manages the underlying
infrastructure
Virtual resources provisioned by
the users are billed based on a pay-
per-use paradigm
85
PaaS –Platform-as-a-Service
It provides the users the ability to
develop and deploy application in
the cloud using development
tools, APIs, software libraries and
services provided by the cloud
service provider (CSP)
CSP manages the underlying
cloud infrastructure including
servers, network, OS and storage

86
PaaS –Platform-as-a-Service
The users, themselves, are
responsible for developing,
deploying, configuring and
managing applications on the
cloud infrastructure

87
SaaS –Software-as-a-Service
It provides the users a complete
software application or the user
interface to the application itself
CSP manages the cloud
infrastructure including servers,
network, OS, storage and
application software
User is unaware of the underlying
architecture of cloud

88
SaaS –Software-as-a-Service
Applications are provided to user
through a thin client interface (e.g.
browser)
SaaS applications are platform
independent and can be accessed from
devices (e.g. workstations, laptop)
running different OS
CSP manages both applications and
data
Users are able to access the
applications from anywhere
89
Big data analytics
Itis a collections of data sets whose
volume, velocity (in terms of its
temporal variation), or variety is so
large
Difficult to store, manage, process
and analyze data using traditional
databases and data processing tools
Involves several steps – data
cleansing, data munging, data
processing & visualization

90
Big data analytics
Examples of big data generated
by IoT systems:
◦ Sensor data generated by IoT
systems such as weather monitoring
stations
◦ Health & fitness data generated by
wearable fitness bands
◦ Data generated by IoT systems for
location and tracking of vehicles

91
Big data analytics
Volume:
◦ No fixed threshold for the volume of data
to be considered as big data
◦ Big data is used for massive scale data
that is difficult to store, manage and
process using traditional databases and
data processing architectures
◦ Volumes of data generated by modern IT,
industrial and health-care systems is
growing exponentially driven by lowering
costs of data storage & processing
architectures

92
Big data analytics
Volume:
◦ Valuable insights from data improves
business processes, efficiency and
service to consumers

93
Big data analytics
Velocity:
◦ Primary reason for exponential growth
of data
◦ Refers to how fast the data is
generated and how frequently it
varies
◦ Modern IT, industrial and other
systems are generating data at
increasingly higher speeds

94
Big data analytics
Variety:
◦ It refers to the forms of data
◦ Data form can be structured or
unstructured data, including text
data, image, audio, video and sensor
data

95
Communication Protocols
Backbone of IoT systems that
enable network connectivity
among apps
Allows devices to exchange data
over network
It can be link, network, transport
and application layer protocols

96
Communication Protocols
It defines the
◦ data exchange formats
◦ data encoding
◦ addressing schemes for devices
◦ routing of packets from source to destination
Functionalities:
◦ Sequence control (ordering packets &
determining lost packets)
◦ Flow control (data rate control between
sender & receiver)
◦ Retransmission of lost packets

97
Embedded systems
It has a computer hardware and
software embedded to perform
specific set of tasks
General purpose PCs perform various
types of tasks
Key components include:
◦ Microprocessor or microcontroller
◦ Memory (RAM, ROM, cache)
◦ Networking units (Ethernet, WiFi
adapters)
◦ Input/Output units (display, keyboard)
◦ Storage (flash memory)
98
Embedded systems
Itcan have specialized processors
such as
◦ digital signal processors (DSPs)
◦ graphic processors
◦ application specific processors
Itruns embedded OS such as real-
time operating systems (RTOS)

99
Embedded systems
Ranges:
◦ digital watches
◦ digital cameras
◦ point of sale terminals
◦ vending machines & appliances

10
0
IoT Levels & Deployment
Templates
An IoT system comprises of:
◦ Device:
 Allows identification, remote sensing,
actuating and remote monitoring
capabilities
◦ Resource:
 Software components on device for
accessing, processing, storing sensor
information and controlling actuators
connected to device
 Also includes software components that
enable network access for device

10
1
IoT Levels & Deployment
Templates
An IoT system comprises of:
Controller service:
◦ A native service that runs on device
and interacts with web services
◦ It sends data from device to web
service
◦ It receives commands from application
for controlling device
Database:
◦ It can be either local or in the cloud
and stores the data generated by IoT
device
10
2
IoT Levels & Deployment
Templates
An IoT system comprises of:
Analysis component:
◦ Analyzing the IoT data and generate
results in a form which are easy for
user to understand
◦ Analysis can be performed either
locally or in cloud
◦ Analysis results are stored in local or
cloud databases

10
3
IoT Levels & Deployment
Templates
An IoT system comprises of:
Application:
◦ Provides an interface that the users
can use to control & monitor IoT
system
◦ Allows users to view the system status
and view the processed data

10
4
IoT Levels & Deployment
Templates
An IoT system comprises of:
Web service:
◦ It is a link between the IoT device,
application, database and analysis
components
◦ Either implemented using HTTP and
REST principles or using WebSocket
protocol

10
5
Comparison of REST & WebSocket
Stateless/Stateful:
◦ REST services are stateless in nature
◦ REST request contains all information
needed to process it
◦ REST requests are independent of
each other
◦ WebSocket is stateful in nature where
server maintains state and is aware of
all open connections

10
6
Comparison of REST & WebSocket
Uni-directional/Bi-directional:
◦ REST services operate over HTTP and
are uni-directional
◦ REST request is always sent by client
and server responds to requests
◦ WebSocket is bi-directional and allows
both client & server to send messages
to each other

10
7
Comparison of REST & WebSocket
Request-Response/Full Duplex:
◦ REST services follow request-response
model where client requests & server
responds
◦ WebSocket allows full-duplex
communication i.e. both client and
server can send messages to each
other independently

10
8
Comparison of REST & WebSocket
TCP connections:
◦ For REST services, each HTTP request
involves setting up a new TCP
connection
◦ WebSocket involves a single TCP
connection over which the client and
server communicate in a full-duplex
mode

10
9
Comparison of REST & WebSocket
Header overhead:
◦ REST services operate over HTTP and
each request is independent
◦ REST request carries HTTP headers which
is an overhead
◦ REST is not suitable for real-time
applications
◦ WebSocket does not involve overhead of
headers
◦ WebSocket: After initial handshake (over
HTTP), client and server exchange
messages with minimal frame information
◦ WebSocket suited for real-time
applications 11
0
Comparison of REST & WebSocket
Scalability:
◦ Easier in REST as requests are
independent and no state information
needs to be maintained by server
◦ Horizontal scaling can be cumbersome
due to stateful nature in WebSocket
◦ Vertical scaling is easier in WebSocket
as server maintains state of a
connection

11
1
IoT Level-1

11
2
IoT Level-1
It has a single node/device that
performs sensing and/or
actuation, stores data, performs
analysis and hosts the application
Suited for modeling low-cost and
low-complexity solutions where
data involved is not big and
analysis requirements are not
computationally intensive

11
3
IoT Level-1 (Home automation)
Single node allows controlling the
lights and appliances in a home
Device interfaces with lights
using electronic relay switches
Status of each light is maintained
in local database
REST services deployed locally
allow retrieving and updating the
state of each light in status
database
11
4
IoT Level-1 (Home automation)
Controller service monitors the
state of each light and triggers
the relay switches accordingly
Application deployed locally has
a user interface for controlling
lights
Device can be connected to
Internet and the application can
be accessed remotely

11
5
11
6
IoT Level-2
Single node performs sensing,
actuation and local analysis
Data is stored in cloud and
application is usually cloud-based
Suited for solutions where data
involved is big
Analysis is not computationally
intensive and can be done locally
itself
11
7
IoT Level-2 (Smart irrigation)
Single node monitors soil moisture
level and controls irrigation system
Device collects soil moisture data
from sensors
Controller service monitors moisture
level
If moisture level drops below a
threshold, irrigation is turned on
Actuators – Solenoid valves can be
used
11
8
IoT Level-2 (Smart irrigation)
Controller sends moisture data to
computing cloud
Cloud based REST web service is used
for storing and retrieving moisture
data which is stored in cloud database
Cloud-based app is used for
visualizing the moisture levels over a
period of time
Application help in making decisions
about irrigation schedules

11
9
IoT Level-3
Local Cloud

App

REST/WebSocket
REST/WebSocket Communication
Controlle REST/
Communication
r service WebSocket
Communicatio
n
Resourc
e

Databas
Device e

Cloud storage
& analysis
Monitoring Node
12
0
IoT Level-3
Ithas a single node.
Data is stored & analyzed in the
cloud and application is cloud-
based.
Suited where data involved is big
and analysis requirements are
computationally intensive.

12
1
IoT Level-3
Application - Tracking of packages
Node monitors the vibration levels
for a package being shipped.
Device uses sensors for monitoring
vibration levels.
Controller sends sensor data to
cloud in real-time using WebSocket
service.
Data is stored in cloud and
visualized using a cloud-based
application.
12
2
IoT Level-3
Application - Tracking of packages
Analysis components in the cloud
can trigger alerts if vibration
levels become greater than a
threshold.
WebSocket service can send the
sensor data to the cloud in real-
time.
Cloud-based apps can subscribe
to sensor data feeds for viewing
real-time data.
12
3
12
4
IoT Level-4
It has multiple nodes that perform local
analysis.
Data is stored in cloud and application
is cloud based.
It has local & cloud-based observer
nodes which can subscribe to and
receive information collected in the
cloud.
Observer nodes can process
information and use it for various
applications.
Observer nodes do not perform any
control functions. 12
5
IoT Level-4
Suited when data involved is big and
analysis is expensive.
Application – Noise monitoring
Multiple nodes for monitoring noise
levels in area
Nodes are equipped with sound sensors
Each node runs its own controller
service that sends the data to the cloud
Data is stored in a cloud database
Analysis of collected data is done in
cloud
Cloud-based app is used for visualizing
aggregated data. 12
6
12
7
IoT Level-5
End nodes perform sensing and
actuation.
Coordinator nodes collects data
from end nodes and sends to the
cloud.
Coordinator acts as a gateway
that provides Internet
connectivity to IoT system.
Controller service on coordinator
device sends collected data to
cloud.
12
8
12
9
IoT Level-6
Multiple independent end nodes
perform sensing and actuation.
Centralized controller is aware of
the status of all end nodes and
sends control commands to the
nodes.

13
0

You might also like