0% found this document useful (0 votes)
54 views28 pages

Iot s7 Module 1

The document outlines the syllabus for a course on IoT (Internet of Things), detailing its definitions, characteristics, architecture, and physical design. It describes the IoT architecture in terms of layers, including perception, network, processing, and application layers, as well as the IoT World Forum's standardized architecture. Additionally, it covers the components of IoT devices and the protocols involved in their operation.

Uploaded by

Meenu Atul
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)
54 views28 pages

Iot s7 Module 1

The document outlines the syllabus for a course on IoT (Internet of Things), detailing its definitions, characteristics, architecture, and physical design. It describes the IoT architecture in terms of layers, including perception, network, processing, and application layers, as well as the IoT World Forum's standardized architecture. Additionally, it covers the components of IoT devices and the protocols involved in their operation.

Uploaded by

Meenu Atul
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
You are on page 1/ 28

KTU SCHEME 2019

ECT 445 IOT AND APPLICATION

Module 1

Prepared by
Ms. Meenu Atul
Lecturer

College of Engineering Poonjar

1
Syllabus Module1

Module1 (7 Hours)
Introduction to IoT technology: Definitions and Characteristics of IoT, IoT Architectural
View, Physical Design of IOT, Logical Design of IoT- IoT Functional blocks, IoT
communication models, IoT Enabling Technologies, IoT Levels & Deployment Templates.

Definition of IoT (Internet of Things):

The IoT can be defined in two ways based on

● Existing Technology
● Infrastructure

Definition of IOT based on existing technology:

IoT is a new revolution to the internet due to the advancement in sensor networks,
mobile devices, wireless communication, networking and cloud technologies.

Definition of IOT based on infrastructure:


IoT is a dynamic global network infrastructure of physical and virtual objects
having unique identities, which are embedded with software, sensors, actuators, electronic
and network connectivity to facilitate intelligent applications by collecting and
exchanging data.

Goal of IoT:

The main goal of IoT is to configure, control and network the devices or things, to
internet, which are traditionally not associated with the internet i.e thermostats, utility
meters, a Bluetooth connected headset, irrigation pumps and sensors or control circuits for
an electric car’s engine that make energy, logistics, industrial control, retail, agriculture
and many other domain smarter.

Characteristics of IoT:
Dynamic and self-adapting
The IoT devices can dynamically adapt with sensed environment, their operating
conditions, and user’s context and take actions accordingly. For ex: Surveillance System.

Self-configuring:

I. IoT devices can be able to upgrade the software with minimal intervention of user,
whenever they are connected to the internet.
II. They can also setup the network i.e a new device can be easily added to the
existing network. For ex: Whenever there will be free wifi access one device can
be connected easily.
Interoperable Communication:

IoT allows different devices (different in architecture) to communicate with each other as
well as with different network. For ex: MI Phone is able to control the smart AC and
smart TV of different manufacturer.

2
Unique identities:

I. The devices which are connected to the internet have unique identities i.e IP
address through which they can be identified throughout the network.
II. The IoT devices have intelligent interfaces which allow communicating with users.
It adapts to the environmental contexts.
III. It also allows the user to query the devices, monitor their status, and control them
remotely, in association with the control, configuration and management
infrastructure.

Integrated into information network:

I. The IoT devices are connected to the network to share some information with
other connected devices. The devices can be discovered dynamically in the
network by other devices. For ex. If a device has wifi connectivity then that will be
shown to other nearby devices having wifi connectivity.
II. The devices will be visible though out the network. Due to these things the
network is also called as information network.
III. The IoT devices become smarter due to the collective intelligence of the individual
devices in collaboration with the information network. For Ex: weather monitoring
system. Here the information collected from different monitoring nodes (sensors,
arduino devices) can be aggregated and analyzed to predict the weather.

Iot Architecture:
IoT promises to drive innovation by facilitating data analysis, exploitation, and
management through a strong, future-proof, scalable, and secure architecture. While an IoT
architecture may provide diverse solutions that cater to different industries, it strives to create
an ecosystem that is cost-effective, functional, flexible, scalable, and maintainable.
IoT architecture refers to the tangle of components such as sensors, actuators, cloud
services, Protocols, and layers that make up IoT networking systems. In general, it is divided
into layers that allow administrators to evaluate, monitor, and maintain the integrity of the
system. The architecture of IoT is a four-step process through which data flows from devices
connected to sensors, through a network, and then through the cloud for processing, analysis,
and storage.

Different Layers of IoT Architecture


IoT applications operate according to how they have been designed/developed based
on the different application areas. However, there is no standard defined architecture of work
that is strictly adhered to across the board. The complexity and number of architectural layers
vary according to the specific business task at hand. A four-layer architecture is the standard
and most widely accepted format. Layers are sensing Layer, Network Layer, Processing
Layer, and Application Layer.

1) Perception/Sensing Layer:
The first layer of any IOT system involves “things” or end point devices that serve as
a conduit between the physical and the digital worlds. Perception refers to the physical layer,
which includes sensors and actuators that are capable of collecting, accepting, and processing
data over the network. Sensors and actuators can be connected either wirelessly or via wired
connections.

3
2) Network Layer:
Network layers provide an overview of how data is moved throughout the application.
This layer contains Data Acquiring Systems (DAS) and Internet/Network gateways. A DAS
performs data aggregation and conversion functions (collecting and aggregating data from
sensors, then converting analog data to digital data, etc.).
It is necessary to transmit and process the data collected by the sensor devices. That’s what
the network layer does. It allows these devices to connect and communicate with other
servers, smart devices, and network devices. As well, it handles all data transmissions for the
devices.

3) Processing Layer:
The processing layer is the brain of the IoT ecosystem. Typically, data is analyzed,
pre-processed, and stored here before being sent to the data center, where it is accessed by
software applications that monitor and manage the data as well as prepare further actions.
This is where Edge IT or edge analytics enters the picture.

4) Application Layer:
User interaction takes place at the application layer, which delivers application-
specific services to the user. An example might be a smart home application where users can
turn on a coffee maker by tapping a button in an app or a dashboard that shows the status of
the devices in a system. There are many ways in which the Internet of Things can be
deployed such as smart cities, smart homes, and smart health.

The IoT World Forum (IoT WF) Standardized Architecture

As shown in Figure, the IoT Reference Model defines a set of levels with control
flowing from the center (this could be either a cloud service or a dedicated data center), to the
edge, which includes sensors, devices, machines, and other types of intelligent end nodes.

4
Layer1: Physical Devices and Controller Layer
The first layer of the IOT Reference Model is the physical devices and controllers
layer. This layer is home to the “things” in the Internet of Things, including the various
endpoint devices and sensors that send and receive information. The size of these “things”
can range from almost microscopic sensors to giant machines in a factory. Their primary
function is generating data and being capable of being queried and/or controlled over a
network.
Layer2: Connectivity Layer
In the second layer of the IoT Reference Model, the focus is on connectivity. The
most important function of this IoT layer is the reliable and timely transmission of data. More
specifically, this includes transmissions between Layer 1 devices and the network and
between the network and information processing that occurs at Layer 3 (the edge computing
layer).
As we notice, the connectivity layer encompasses all networking elements of IoT and doesn’t
really distinguish between the last-mile network (the network between the sensor/endpoint
and the IoT gateway, discussed later in this chapter), gateway, and backhaul networks.
Functions of the connectivity layer are detailed in Figure

5
Layer3: Edge Computing Layer
At this layer, the emphasis is on data reduction and converting network data flows
into information that is ready for storage and processing by higher layers. One of the basic
principles of this reference model is that information processing is initiated as early and as
close to the edge of the network as possible.

Upper Layers: Layers 4–7


The upper layers deal with handling and processing the IoT data generated by the bottom
layer for the sake of completeness.

Table2.2 Summary of Layers 4–7 of the IoTWF Reference Model

6
Physical Design of IoT Device:
Things in IoT:

I. IoT i.e Internet of things, where things refer to the IoT devices which have unique
identities and can perform remote sensing, actuating and monitoring capabilities (ex:
combination of sensors, actuators, Arduino, relay, non IoT devices).
II. The IoT devices can share information with as well as collect information from other
connected devices and applications (directly and indirectly).
III. They can process the data locally or in the cloud to find greater insights and put them
into action based on temporal and space constraints (i.e space memory, processing
capabilities, communication latencies and speeds and deadlines).
IV. IoT devices can be of varied types. For ex: wearable sensors, smart watches, LED
lights, automobiles and industrial machines.

Generic block diagram of IOT device


An IOT device may consist of several interfaces for connections to other devices,
both wired and wireless. I/O interface for sensors. Interfaces for internet connectivity.
Memory and storage interfaces. Audio/video interfaces.

Connectivity: (RJ45, USB): This component is used to connect the IoT device to the internet.
Processing unit (CPU): This is used to control all the other components as well as it processes the
instruction present in the algorithm.
Audio/video unit: This is used to connect the monitor or speaker.

 HDMI: High definition multimedia interface. It supports uncompressed all digital audio
video interfaces which provides all digital audio and video via a single cable. HDMI provides an
interface between any audio/video source such as set-top box, DVD player or audio/ video
receiver and audio and or video monitor such as a digital television over a single cable. HDMI
supports high definition video, plus multi-channel digital audio on a single cable.

 2.5/3.5mm audio: This is used for audio.


7
 RCA: Radio Corporation of America. It is sometimes called as phono connector. It
is a type of electrical connector commonly used to carry audio and video signals.

I/O interfaces: This is used to connect sensors, actuators, relay or any external devices.

 UART: universal Asynchronous Receiver Transmitter. It is used to provide serial


communication.

 SPI: Serial peripheral interface. It is used to provide serial communication between


different devices or you can say between monitoring node and controlling node or
coordinator node. In SPI there will be a single master and multiple slaves. There are
4 signals. CHIPENABLE with a bar (active low), MISO, MOSI, clk/Slk/Sck. Since
multiple slaves are there so the slave will choose them using CHIPENABLE signal.
If low voltage will be given to the slave then that slave will be able to communicate
with the master.
 MISO: Master in Slave out. i.e Master will not send anything it will only
receive and slave out i.e slave will only send.
 MOSI: Master out slave in i.e master will send the data and receiver will

receive. clk/slk/sck: It will synchronize the master and slave.

 I2C: Inter integrated circuit. Here multiple masters can communicate with multiple
slaves.

 CAN: Controller are a network. It is designed to allow microcontroller and devices


to communicate with each other in applications without a host computer.
Storage: This is used to store or record the sensed data.

 SD: Secure digital. This is used to hold the SD card which is a non-volatile memory
card format. SD card is a popular storage media for digital cameras and other mobile
devices.

 SDIO: It is used to connect external HDD.

 MMC: Multi Media card. It is a flash memory based memory card standard. It is a
popular storage media for digital cameras and other mobile devices.

GPU: Graphics processing unit. It is useful for there solution of the screen and used for
high end games.
Memory: They are used for temporary storage and for execution of instruction.

8
Physical Design of IOT

LINK LAYER
How the data is physically sent over the networks physical layer or medium -
wired/wireless - copper wire (UTP), coaxial cable, OFC, RF. The packets are coded and signaled
by the hardware device over the medium to which the host is attached.
802.3Ethernet
Collections of wired Ethernet standards provide data rates from 10 Mb/s to 40 giga bits
per second. The shared medium in Ethernet can be a coaxial cable, twisted pair wire or and
Optical fiber. Shared medium carries the communication for all the devices on the network.
802.1-WI-FI
collections of wireless Local area network.(WLAN). communication standards
Includes extensive descriptions of the link layer - frequency , speed, multiple access techniques
IEEE 802.11a- 5 GHz, 54 Mbps IEEE802.11b-2.4GHz, 11Mbps IEEE802.11g-
2.4GHzand5GHz, 600Mbps IEEE 802.11ac, IEEE 802.11ax…
802.16 wiMAX
Worldwide Inter-operability for Microwave Access. Wireless MAN technology. wireless
broadband communications technology provide higher data rates with increased coverage. data
ratesfrom 1.5 Mb/s to 1Gb/s

802.15.4LR-WPAN
collections of standard for low rate wireless personal area network provide data rates from
40 k b/ s - 250 kb/s. provide low cost and low speed Communications for power constrained
devices.
Eg.Zigbee
2G/3G/4Gmobilecommunications
Different generations of mobile communication standards. 2G-GSM and CDMA. 3G-
9
UMTS and CDMA2000.4G - LTE 9kbps to 100mbps
NETWORK LAYER / INTERNET LAYER

Responsible for sending IP datagrams from the source network to the destination
network. Host addressing and packet routing based on IPv4 or IPv6. The datagrams contains a
source and destination address which are used to route them from the source to the destination
across multiple networks.

IPv4 -32biandIPv6 -128bit

IPv4 IPv6
Internet protocol version4 Internetprotocolversion6
It is 32 bit dotted decimal It is128bitcolonhexadecimal
It supports 232number of addresses It supports 2128 number of addresses
It supports point to multipoint connection. It supports point to point connection
All the applications have same priority. Different applications have different
priority.
it is connectionless. It is connection oriented.
Here at each router fragmentation Here at each router fragmentation

6LoWPAN - IPv6 over Low-power Wireless Personal Area Networks -low power, limited
processing capability devices. 2.4GHz data transfer rate of upto 50 kb/s.

TRANSPORTLAYER
Responsible for sending of IP datagrams from the source network to the destination
network. End-to-end message transfer capability independent of the underlying network. Either
using handshake or without handshake acknowledgements. Provides functions such as error
control , segmentation, flow control and congestion control.

TCP-Transmission control protocol


➔ Responsible for transferring IP packet from source microcontroller to destination m/c
➔ TCP ensures reliable transmissions of packets in order
➔ Connection Oriented and stateful protocol
➔ Provide flow control (match Tx/Rx data handling rate), error detection, duplicate packet
handling etc
➔ Need more over head packets/bits

UDP-User Datagram Protocol


➔ Connection less protocol for end to end packet delivery
➔ Need less overhead bit as no connections establishing
➔ Does not provide guaranteed delivery, ordering of messages and duplicate eliminations -
unreliable

10
APPLICATIONLAYER

Define how the application interfaces with the lower layer. Converting files to smaller
data units by encapsulation. Enables process-to-process connection using ports - each process is
assigned a port number
HTTP
➔ Hypertexttransferprotocolistheapplicationlayerprotocolthatformsthe foundations of WWW
➔ Client- server communicates with http commands
➔ Works on TCP
CoAP- Constrained application protocol
➔ Protocol for machine to machine application meant for constrained environment with
constrained devices and constrained networks
➔ Like HTTP CoAP is a web transfer protocol and uses a request- response model.
➔ Runs on top of UDP due to constraints
Web socket
➔ Web Socket protocol allows full duplex communication over a single socket connections for
sending message between client and server.
➔ 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 and IoT device
MQTT: Message Queue Telemetry Transport
➔ It is a light weight message protocol based on publish - subscribe model - publisher send the
information only once and server retransmits to the subscriber
➔ An IOT device sends it message to MQTT broker The broker forward the message to the
clients subscribed
➔ Suited for constrained environments and devices
➔ Need less band width
XMPP: Extensible Messaging and Presence Protocol
➔ It is a protocol for real-time communication and streaming XML. (Extensible Markup
Language) data between network entities.
➔ Supportsmessaging,presence,datasyndication,gamingmultipartychatand voice / voice
calls
➔ Uses client- server architecture and is decentralized
DDS: Data distribution service
➔ It is the data centric middleware standard for device to device machine to machine
communication
➔ Uses a publish- subscribe model
➔ DDS provide quality of service (QoS) control and configurable reliability

11
AMQP: Advanced Message Queuing protocols
➔It is an open application layer protocol for business messaging.
➔Support point to point and publish-subscribe model routing and queuing.
AMQP broker receive message from publishers example devices or applications that generate
data and about them over connections to consumers publishers publish the message to exchange
which then distribute message copies to queues

LOGIC DESIGN OF IOT

The logical design of an Internet of Things (IoT) system entails the creation of an abstract
representation of entities and processes, steering clear detailed implementation specifications. It
relies on the utilization of Functional Blocks, Communication Models, and Communication
APIs to effectively establish a functioning system.

IOT Functional Blocks

The Internet of Things (IoT) has several functional blocks. The functional block of the
system provides the capabilities for identification, sensing, actuation, communication and
management. These blocks collectively contribute to its operation. These blocks contain the
device, communication, services, application, management, & security components.

Device:

I. IOT i.e Internet of things, where things refer to the IOT devices which have unique
identities and can perform remote sensing, actuating and monitoring capabilities (ex:
combination of sensors, actuators, Arduino, relay, non IOT devices).
II. The IOT devices can share information with as well as collect information from other
connected devices and applications (directly and indirectly).
III. They can process the data locally or in the cloud to find greater insights and put the min to
action based on temporal and space constraints (i.e space memory, processing capabilities,
communication latencies and speeds and deadlines).
IV. IOT devices can be of varied types. For ex: wearable sensors, smart watches, LED lights,
automobiles and industrial machines.
12
Communications:

It refers to various communication protocols which allows different devices to


communicate with each other by sharing some information. It also allows interoperability among
different devices. It provides seamless data transmission & reception by employing proper
protocols

Services:

IOT system provides various services such as device monitoring, device control services,
data publishing services, device discovery services. These services enhance the functionality and
utility of the IoT system.

Management

The management functional block encompasses a range of functions designed to oversee


an IOT system. These functions enable effective administration and coordination of various
system components.

Security:
It secures the IoT system by providing authentication, authorization, message and content
integrity and data security. The security block is instrumental in defending an IoT system
through several defensive measures implementation. These criteria encompass authorization
mechanisms, data security protocols, authentication processes, & additional security elements
such as two step verification.

Application:

I. IOT applications provide an interface that the users can use to control and monitor
various aspects of the IOT system.
II. Italsoallowsviewingthesystemstatusandvieworanalysingtheprocesseddata.
In summary, an IOT system or application consists of distinct functional blocks that
collectively contribute to its operation. Each block performs specific functions, ranging
from device control and communication to service provision, user interaction, system
management, and security enforcement.

IOT communication model:


To provide communication to various IoT devices, there are various communication
models. Such as

 Request- Response communication model


 Publisher- subscriber communication model
 Push-pull communication model
 Exclusive-pair communication model

13
Request-response communication model:

I. In this communication model client will send request to server. Server will receive
the request then decides how to respond, fetches the data according to client’s
request, retrieves resource representations, prepares the response and then sends
the response to client.
II. Request-response model is a stateless communication model., each request-
response pair is independent of others. Ex: HTTPs requests to log in some secure
sites like IRCTC.
III. Here only client can request to the server. request is unidirectional but data transfer
is bi-directional.
IV. It follows client server architecture. IOT devices act as client. Cloud act as server
or local server serves as server.

Publish-Subscribe communication model:


I. This communication model comprises of publisher, broker and consumer.
II. Publishers are the source of data i.e the devices or applications which generate
data. Publisher publishes the data to the requested topic by the client or consumer
into the server.
III. Broker manages the topics in server. Broker receives the data from the client or
publisher and forwards the message to topics on the topics subscribed by the
clients.
IV. Consumer or clients (applications that process the data) subscribe to various topics
present in side server. When the publisher publishes the data to the requested
topics they will receive it from the broker.
V. The publisher doesn’t know about the client, but knows about the broker. Likewise
client does not know about the publisher but knows about the broker.
VI. It also follows client- server architecture.
Ex1-when one user subscribe to any channel in you-tube. Here let I am a client and I
subscribe to Remo’s dance channel. Remo may directly create his own channel in You-tube

14
and sends the recorded video to the channel. Here Remo act as publisher, you tube as server
and broker. Channel as topic and me as subscriber.
Ex2- sometimes what happened the publisher doesn’t create its own channel rather they
send the data to an intermediate then they send the data to the server and from that to the
subscribed user. That intermediate can be called as broker. There you -tube is called as
server. Ex. Cheers is a broker which manages some of the web series. Here the web series
are topic. You-tube is the server.

Push-Pull communication model:


I. Push-pull is a communication model in which the data producers push the data to
the queues and the consumers pull the data from the queues.
II. Producers do not need to beware of the consumers.
III. Queues act as buffer which helps in situations when there is a mismatch between
the rate at which the producers push the data and the rate at which the consumers
pull the data.

Exclusive pair communication model:


I. Exclusive pair is a bi-directional, full duplex communication model.
II. It uses state-full protocols i.e we don’t need to login again and again.
III. It uses a single http connection i.e persistent connection between the client and the
server i.e once the connection is set up it remains until the client sends the request
to close the connection.
IV. It also supports client-server architecture.

15
V. It is a stateful communication model and the server is aware about all the open
connection.

IOT communication APIs:


What is an API: Application programming interface is a set of requirements that govern
how one application can talk to another. API’s do all these things by exposing some of
program’s internal functions to the outside world in a limited fashion.
Mainly two types of communication APIs are used in IOT.
 REST based communication API
 Web Socket based communication

REST based communication API:

I. REST: Representational State Transfer.


II. It helps to design web services and web APIs that focus on a system’s resource
and how resource states are addressed and transferred.
III. It follows Request-response communication model and unidirectional
communication for request. The clients send request to URIs using methods
defined by the HTTP protocols (GET, PUT, POST, DELETE).
IV. REST ful web service is a “web API” implemented using HTTP and REST
principle. REST ful web service is a collection of resources which are represented
by URIs.
REST ful Web services can support various internet media types (JSON,
XML). JSON: Java script object notation (most popular web service).
XML: Extensible markup language
How REST-based APIs function in IoT:

Resource-Oriented Design:
In a REST ful IoT system, each device or data point is treated as a "resource." For
example, a smart light bulb might be a resource, and its state (on/off) would be its
representation.

16
Standard HTTP Methods:
REST APIs leverage standard HTTP methods to interact with these resources: GET:
To retrieve data or current state of are source (e.g. get the temperature from a sensor).
POST: To create new data or resources (e.g., send sensor readings to a cloud platform).
PUT: To update an existing resource (e.g., set the target temperature of a thermostat).
DELETE: To remove are source (e.g., remove a device from the system).
Stateless Communication:
Each request from a client (e.g., a mobile app) to a server (e.g., an IoT platform)
does not contains all the necessary information, making the communication stateless. This
enhances scalability and simplifies interactions.
Data Formats:
Data exchanged through REST ful APIs in IoT is typically represented in formats
like JSON (JavaScript Object Notation) or XML (Extensible Markup Language), which are
lightweight and easily parsed by various systems.

Benefits of using REST-based APIs in IOT:


Interoperability:
REST's reliance on standard web protocols (HTTP) ensures compatibility across
diverse devices and platforms.
Scalability:
Stateless communication and resource-oriented design allow for easy scaling of IOT
systems as more devices are added.
Simplicity:
The use of familiar HTTP methods and common data formats simplifies
development and integration.
Flexibility:
REST ful APIs can be implemented using various programming languages and can
adapt to different IOT use cases.

17
This communication API follows various constraints such as
 Client-server
 Stateless
 Cache-able
 Layered System
 Uniform interface
 Code on demand
 Scalability

Client-Server: The principle behind the client-server constraint is the separation of concern.
Ex: The server is concerned about the storage part i.e storage of data and the client will not
bother about it. The client should concern about the user interface and the server will not
bother about it. Due to this type of separation client and server can be independently
developed and updated.

Stateless: A stateless application or process does not retain information about the user's
previous interactions. There is no stored knowledge of or reference to past transactions.
Each transaction is made as if from scratch for the first time. Each time the request from
client to server must contain all the information necessary for understanding the request.

Cache-able: It requires that data within a response to request be implicitly or explicitly


labeled as cache-able or non-cache-able. The data can be cached in client side so that it can
be reused when requested for the next time in order to minimize the time. It will increase
the efficiency and scalability.
Layered System: This constraint limits the behavior of components i.e each component
cannot see beyond the immediate layer with which they are interacting. Ex: client cannot
say whether it is connected directly to the end server or to an intermediary. It improves
scalability by allowing intermediaries to respond to requests instead of the end server
without the client having to do anything different.

Uniform interface: The method of communication between a client and a server must be
uniform
Code on demand: Servers can provide executable codes or scripts for clients to execute in
their context.
Scalability: it supports both horizontal and vertical scalability. As it is stateless scalability
is easier to implement.

Web Socket-based Communication APIs:

Web Socket: WebSocket is a communication protocol that is mainly used for


communication between a client and server. WebSocket API allows us to create web
sockets, it is a java script API that is capable of full-duplex communication using a TCP
connection. Web Socket uses port 80 by default. Web Socket APIs follow the exclusive pair
communication model

1. Web Socket API helps to design web services and web APIs.
2. It allows bi-directional, full-duplex communication between clients and servers.
3. It follows the exclusive pair communication model.

18
4. It supports stateful protocols. It does not require a new connection to be set up for each
message to be sent. There is no overload for connection set up and termination request for
each message. So Web socketAPI reduces the network traffic and latency.
5. It is suitable for IoT applications that have low latency or high through put requirements.

In web socket communication first the client sets up connection with the server. This
request is sent over the HTTP and the server interprets as an upgrade request (called
Websocket handshake). If the server supports websocket protocol then only it will respond to
this handshake. If the server supports then client and server can send message to each other in
full-duplex mode

Features of Web Socket are:

 Full-Duplex Protocol: Web Socket is a full-duplex protocol as it allows the application


to send and receive data at the same time.
 Exclusive pair communication: It means the connection between server and client will
notbeterminateduntilandunlessclosedbyanyoneofthemeitherbytheclientorby the server.
Once the connection is terminated from one end it is also closed by another end.
 Stateful applications and processes maintain their state by storing, recording, and
returning to already established information and processes over the internet. In stateful
applications, the server keeps track of the state of each session or interaction and
maintains that information based on the user's past requests. Those sessions can be
returned to again and again, like online banking or email. They’re performed with the
context of previous transactions, and the current transaction may be affected by what
happened during previous transactions. For these reasons, stateful apps use the same
servers each time they process a request from a user.
 3-way handshake: Websocket uses a 3-way handshake also known as TCP connection
for establishing communication between a client and server.
 It uses a single TCP connection for communication between the client and server.
 Mainly used in real-time applications like chat applications, video calls applications
 Fast transmission of data can be achieved using websockets.
 Scaling is possible but only vertically.

19
Use of Web Socket API:
 Online Education Sector: Web sockets are obviously used in online education
applications because these applications need real-time data for video streaming or for
sharing screen which makes websockets a very good choice because It has the capability
to provide all these functionalities.
 Gaming: The world is going crazy after games, users want real-time games to play with
multiple players along with chat and call facilities so to achieve all these things it is a
must for anyone to use web sockets for developing different gaming applications.
 Collaborative applications: We all have used goggle docs which makes it possible for
multiple persons to use the same work space and work concurrently, these applications are
built using HTML5 Web Sockets.
 Real-time data visualization: Visualization of real-time data in an appealing manner was
a quite tough task earlier but with the use of html5 web sockets it is really easy.
 Event Update applications: Web sockets are extensively used in making applications for
giving real-time updates of all platforms to some common platform.
 Tracking User Behavior: Organizations are really interested in knowing users' behavior
while interacting with a web application so to give better recommendations about the
content or product the user is looking for. In achieving all these things web socket is a
must-go choice.

Difference between REST and Websocket:

REST Websocket

It supports Request-response communication It supports Exclusive-pair


model. communication model.

It supports stateless protocol. It supports stateful protocol

It supports unidirectional communication It supports bidirectional communication


between client and server as only client can between client and server i.e client and server
send request to server and server only both can request to each other.
respond to the request.

It is half duplex. It is full duplex.

It uses multiple TCP connection for each It uses single TCP connection for search over
search over HTTP. HTTP.

Since it does not store the request Header over head is less.
information so each time it needs to provide
all the information while creating
communication with server. For this reason
header overhead increases.

It supports both horizontal and Vertical scaling is easier than


vertical scalability horizontal scaling.

20
IOT enabling technologies:

The technologies which are cooperative with IoT those areas follows.
• Wireless sensor networks
• Cloud computing
• Big Data analytics
• Embedded systems
• Communication protocols

Wireless Sensor networks:

1. Wireless sensor network comprises of distributed devices, wireless sensors. These devices
with sensors are used to monitor the environment and physical conditions. Since all the nodes
are wireless so they communicate with each other through wifi or Bluetooth.
2. A WSN consists of several end nodes and routers as well as coordinator.
3. Sensors are attached with end nodes. Each router can also be called a send node.
4. Routers are responsible for routing the data packets from end nodes to the coordinator
nodes. Coordinator node connects the WSN to the internet. The Coordinator node can be
another arduino, raspberry pi or any other IoT device.
5. It collects the data from all the nodes.
6. WSNs are enabled by wireless communication protocols such as IEEE802.15.4.
7. It can also been enabled by ESP 8266 and ZigBee.
8. ZigBee Bluetooth module is based on IEEE802.15.4. It operates at 2.4 GHz frequency. It
offers data rate up to 250 KB/s and ranges from 10 to 100 meters depending upon power
output and environmental conditions. In WSN the devices can reconfigure themselves i.e new
nodes can be added to the networks and software can be updated automatically whenever
they will be connected to the internet.
9. Ex. Of Wireless sensor network: Weather monitoring system, Indoor air quality
monitoring, soil moisture monitoring, surveillance system, smart grids, machine prognosis
and diagnosis.

Cloud Computing:

1. It is an emerging technology which enables on-demand network access to computing


resources like network servers, storage, applications and services that can be rapidly
provisioned and released.
2. On demand: we invoke cloud services only when we need them, they are not permanent
part of IT infrastructure.
3. Pay as you go model: You pay for the cloud services when you use them, either for the
short period of time or longer duration (for cloud based storage).
4. Cloud provides various services such as
i. IAAS : Infrastructure as a service
ii. PAAS : Platform as a service
21
iii. SAAS: Software as a service
IAAS:
Instead of creating a server room we will hire it from a cloud service provider. Here
user will not use its local computer, storage and processing resources rather it will use virtual
machine and virtual storage, servers, networking of third party. Here the client can deploy the
OS (operating system), application of his own choice. User can start, stop, configure and
manage the virtual machine instances and virtual storage.

PAAS:
User can develop and deploy applications. For ex. We are using various online editors
to write codes like online arduino IDE, C IDE, APIs, software libraries. Here we don’t need to
install anything. The cloud service provider will manage servers, network, OS and storage.
The users will develop, deploy, configure and manage applications on the cloud
infrastructure.
SAAS:
It provides complete software application or the user interface to the application itself.
The user is not concerned about the underlying architecture of cloud only service provider is
responsible for this. It is platform independent and can be accessed from various client
devices such as workstation, laptop, tablet and smart phone, running different OS. Ex: The
online software we use like online image converter, doc converter etc.

Big data analytics:

Big data refers to large amount of data which cannot be stored, processed and
analysed using traditional database like (oracle, mysql) and traditional processing tools. In
big data analytics BIG refers to 5 Vs.
• Volume
• Velocity
• Variety
• Veracity
• Value
Volume: volume refers to the massive amount of data generated from the IOT
systems. There is no threshold value for generated data. It is difficult to store, process and
analyze using traditional database and processing tools. Ex: The volume of data generated by
modern IT, industrial and healthcare system.
Velocity: The rate at which the data is generated from the IoT system. This is the
primary reason for the exponential growth of data. Velocity refers to how fast the data is
generated and how frequently it varies. Ex: Modern IT, industrial and other systems like
social networking sites are generating data at increasingly higher speed.
Variety refers to different forms of data. Since there are various domain of IoT so
various type of data are generated from different IoT domain. Those data is called as sparse
data. Those data include text, audio, video etc.. The variety of data is mainly divided into 3
types i.e.
✓ structured
✓ semi structured
✓ unstructured

22
Structured data: The data which has a fixed format to be stored is known as structured
data. The data stored in database like oracle, mysql is an example of structured data. With a
simple query data can be retrieved from the database.
Semi-structured data: The data which has not a fixed format to be stored but uses
some elements and components through which they can be analyzed easily is known as semi
structured data. Ex: HTML, XML, JSON data not any fixed format. It is difficult to store and
analyze. It can be analyzed after converting into structure data. Ex: Audio, video (gif, audio
with lyrics), Text (containing special symbols).
Veracity: The data in doubt is known as veracity. Sometimes it is very difficult to
accept the data stored in data base. This happens due to typical error, corrupted storage or
data.
Value: It is efficient to access big data if we can turn it into values i.e we can find
greater insights from it so that we can perform some action to get the desired output. This will
be beneficial for the organization. Otherwise it has no use.

Embedded Systems:

1. An embedded system is a computer system that has hardware and software embedded to
perform specific task.
2. The key components of an embedded system include microprocessor or microcontroller,
memory (RAM, ROM, Cache), networking units (Ethernet, Wi-Fi adapter), input/output units
(display, keyboard, etc) and storage (flash memory). They use some special types of
processor such as digital signal processor, graphics processor and application specific
processor). Embedded system uses embedded OS like RTOS.
3. Eg: Of embedded systems: digital watch, digital camera, vending machines.

Communication protocols:

1. Protocol is nothing but rules and regulations. Communication protocol is the backbone of
the IoT system.
2. It allows interoperability among various devices. It enables network connectivity and
coupling to applications.
3. It allows devices to exchange data over the network. These protocols define data exchange
format, data encoding, addressing schemes for devices and routing of packets from source to
destination. It also includes sequence control, flow control and retransmission of lost packets.

IoT Levels & Deployment Templates


IoT levels:
Based up on the number of monitoring nodes used, type of data base, complexity/
simplicity of analysis, computation there are 6 levels of IoT. Different applications are
implemented based on this level. The IoT systems consist of these following components.

 Device
 Resources
 Controller Service
 Database

23
 Web Service
 Analysis Component
 Application
Device: An IoT device allows identification, remote sensing, actuating and remote
monitoring capabilities.
Resource: 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 the software components that enable network access for the device.
eg: The programs that we have written for object detection using IR sensor, to find out the
distance using ultra sonic sensor etc.
Controller Service: Controller service is a native service that runs on the device
and interacts with the web services. Controller services sends data from the device to the
web service and receives commands from the application (via web services) for controlling
the web services. For ex: The ESP 8266 programming, setting of API keys, SSID etc. .
Data base: Data base can be either local or in the cloud and stores the data generated
by the IOT device.
Web Service: Web services serve as a link between the IOT device, application, data
base and analysis components. Web service can be either implemented using HTTP and
REST principles or using Web Socket protocol.
Analysis Component: The analysis component is responsible for analyzing the IOT
data and generated result in a form which are easy for the user to understand. Analysis can be
performed either locally or in the clouds.
Application: IOT applications provide an interface that the users can use to control
and monitor various aspects of the IOT system. Applications also allow users to view the
system status and view the processed data.

IoTLevel-1

24
Single node/device that performs sensing or actuation, stores data, performs analysis and
hosts the application

 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.
 No involvement of cloud. Data involved is not big, so data is stored in local
database.
 Primary analysis requirement is not computationally intensive. So can be analyzed
locally.

o EX: Home automation, controlling the lights or appliances

IoT Level - 2

 Has a single node that performs sensing or actuation and local analysis.
 Data is stored in the cloud and application is usually cloud-based. Cloud used for data
storage but Analysis locally
 Level-2 IoT systems are suitable for solutions where the data involved is big,
however, the primary analysis requirement is not computationally intensive and can
be done locally itself
o Eg: Cloud based irrigation systems

25
IoT level 3:

 It has single node/device for sensing, monitoring, actuating and hosting


application.
 Data involved is big. So data is stored in cloud.
 It uses cloud based application to visualize data.
 Primary analysis requirement is computationally intensive. So can be
aggregated and analyzed in cloud.
 Eg: tracking package handling.

IoT level 4:

26
 It has multiple nodes/devices for sensing, monitoring, actuating, performing analysis
and hosting application.
 Data involved is big. So data is stored in cloud.
 It uses cloud based application to visualize data.
 Primary analysis requirement is computationally intensive. So can be aggregated
and analyzed in cloud.
 It has two observer nodes i.e local and cloud based. They can subscribe to and
receive information collected in cloud from IoT device. They can process and use
those information for various applications
 Observer node does not perform any control function. EX: Noise monitoring

IoT level 5:

 It has multiple nodes/devices for sensing, monitoring, actuating. One coordinator


node for collecting and sending the data to cloud by controller service.
 Data involved is big. So data is stored in cloud.
 It uses cloud based application to visualize data. Suitable for wireless sensor network.
 Primary analyze is requirement is computationally intensive. Analytic component
analyze the data and stores result in cloud and make prediction.
Ex: Forest Fire Detection

27
IoTlevel6:

 Has multiple independent end nodes that perform sensing and/or actuation and send data
to the cloud.
 Data is stored 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.
 Eg: Weather monitoring and structural health monitoring

28

You might also like