IoT Overview for Electrical Students
IoT Overview for Electrical Students
• existing Technology
• Infrastructure
IoT is a new revolution to the internet due to the advancement in sensor networks,
mobile devices, wireless communication, networking and cloud technologies.
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:
Various characteristics of IoT are:
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.
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.
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 ssid 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 analysed to predict the weather.
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.
The functional block of the system provides the capabilities for identification, sensing,
actuation, communication and management. Various components of IoT functional block are
as follows.
• Device
• Communications
• Services
• Management
• Security
• Application
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 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.
Communications:
Services:
IoT system provides various services such as device monitoring, device control
services, data publishing services, device discovery services.
Management:
Security:
It secures the IoT system by providing authentication, authorization, message and
content integrity and data security.
Application:
I. IoT applications provide an interface that the users can use to control and monitor
various aspects of the IoT system.
II. It also allows viewing the system status and view or analysing the processed data.
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 i.e 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. i.e 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.
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 be aware 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.
Mainly two types of communication APIs are used in IoT. Those are as follows
Stateless: Each time the request from client to server must contain all the information
necessary for understanding the request.
Layered System: This constraint limits the behaviour 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.
Refer Book for Exclusive pair model used by web socket API.
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.
REST Websocket
1. It supports Request-response 1. It supports Exclusive-pair
communication model. communication model.
2. It supports stateless protocol. 2. It supports stateful protocol.
3. It supports unidirectional 3. It supports bidirectional
communication between client communication between client
and server as only client can send and server i.e client and server
request to server and server only both can request to each other.
respond to the request. 4. It is full duplex.
4. It is half duplex. 5. It uses single TCP connection for
5. It uses multiple TCP connection search over HTTP.
for each search over HTTP. 6. Header overhead is less.
6. Since it does not store the request 7. Vertical scaling is easier than
information so each time it needs horizontal scaling.
to provide all the information
while creating communication
with server. For this reason header
overhead increases.
7. It supports both horizontal and
vertical scalability.
IoT enabling technologies:
The technologies which are cooperative with IoT those are as follows.
Cloud Computing:
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 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 analyse 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: 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
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 analysed easily is known as semi-
structured data. Ex: HTML, XML, JSON data
Unstructured data: The data which has not any fixed format. It is difficult to store and
analyse. It can be analysed after converting into structured data. Ex: Audio, video (gif,
audio with lyrics), Text (containing special symbols).
Veracity: The data in doubt is known as veracity. Sometimes what happen it is very difficult
accept the data stored in database. 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 organisation. 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 micro
controller, 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. Ex. Of embedded systems: digital watch, digital camera, vending machines.
Communication protocols:
• Data
• Information
• Knowledge
Data: It refers to raw and unprocessed values that are generated by the IoT devices. It does
not have meaning until it is contextualised and processed into useful information.
Ex: Consider a series of raw sensor measurement ((72, 45); (84, 56);) generated by a weather
monitoring station. This does not have some meaning. To give meaning to the data, a context
is added ex: in this example we can add that the data represents the temperature and humidity
measured every minute. After adding this we get the information about the data tuple. Further
information is obtained by categorising, condensing or processing the data. For ex: the
average temperature and humidity reading for last five minutes is obtained by averaging the
last five data tuples. The next step is to organise the information and understand the
relationships between pieces of information to infer knowledge which can be put into actions.
For ex: an alert is raised if the average temperature in last five minutes exceeds 120F.
Generic Block Diagram of IoT devices:
For diagram refer to Book.
Connectivity (RJ 45, 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.
I/O interfaces: This is used to connect sensors, actuators, relay or any external devices.
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.
I2C: Inter integrated circuit. Here multiple masters can communicate with multiple
slaves.
Suchismita Mohanty
Refer the note book for the diagram
CAN: Controller area network. It is designed to allow micro controller and devices to
communicate with each other in applications without a host computer.
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.
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 the resolution of the screen and used for high
end games.
Memory: There are used for temporary storage and for execution of instruction.
IoT levels:
Based upon the number of monitoring nodes used, type of data base used, 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
• Web Service
• Analysis Component
• Application
Device: The IoT device allows identification, remote sensing, actuating, and remote
monitoring capabilities.
Resource: Resources are the software components on the IoT device for accessing,
processing and storing sensor information, or controlling actuators connected to the
device Resources include the software components that enable network access for the
device. For ex: 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 service sends data from the device to the
web service and receives commands from the application for controlling the web
services. For ex: The ESP 8266 programming, setting of API keys, SSID etc. .
Suchismita Mohanty
Database: Database can be either local or in the cloud and stores the data generated
by the IoT device.
Web Service: This act as an interface between IoT device, application, database and
analysis components. Web services can be implemented using HTTP and REST
principle or using WebSocket protocol.
Analysis Component: The analysis component is responsible for analysing the IoT
data and generates results inform 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 user can use to control and
monitor various aspects of the IoT system.
IoT level 1:
IoT level 2:
IoT level 3:
Suchismita Mohanty
EX: tracking package handling.
IoT level 4:
IoT level 5:
IoT level 6:
Networking Model:
Suchismita Mohanty
It explains how to facilitate communication between two different systems without requiring
changes to the logic of underlying hardware and software i.e to allow interoperability.
OSI model: It is a model for understanding and designing a network architecture which is
flexible, robust and interoperable. It is a layered framework. The layers of OSI model define
a part of the process of moving information. Each layer defines a family of functions distinct
from those of the other layer.
Open System: Set of protocols that allow any two different systems to communicate
regardless of their underlying architecture.
Network support layer: It comprises of Physical link layer, data link layer, network layer. It
deals with physical aspects of moving data from one device to other (such as electrical
specification, physical connection, physical addressing, and transfer timing and reliability). It
is implemented using hardware and software.
User support layer: It comprises of session layer, presentation layer, and application layer. It
allows interoperability among unrelated software system. It is implemented using software.
Transport layer: It links the two subgroups and ensures that what the lower layer have
transmitted is in a form that the upper layer can use.
Suchismita Mohanty
I. The protocol data unit (PDU) is bits/ signal. It coordinates the function which
will help carrying bit streams over a physical media.
II. It deals with electrical and mechanical specification of transmission medium
and interface.
III. It describes the physical characteristics of interface and transmission medium,
representation of bits, data rate, transmission rate, synchronisation of bits, line
configuration, and transmission mode.
I. PDU is message.
II. It provides dialog control.
III. It allows a process to add a check point or synchronisation points to a stream
of data (to provide synchronisation).
Presentation layer:
I. PDU is message.
II. It is concerned with syntax and semantics of the information exchanged
between two systems.
III. It is responsible for translation, encryption, and compression.
Application Layer:
Suchismita Mohanty
I. PDU is message.
II. It defines how the application interface with the lower layer protocols to send
the data over the network.
TCP/IP:
✓ Link layer
✓ Network layer/ Internet layer
✓ Transport layer
✓ Application layer
HTTP:
CoAP:
Suchismita Mohanty
IV. It uses UDP 5683 port number in transport layer.
V. It uses request- response model.
VI. It uses client server architecture.
VII. It uses PUT, GET, POST, DELETE, HEAD, TRACE, OPTIONS.
VIII. It is designed to work with HTTP.
Websocket:
MQTT:
XMPP:
I. It is a decentralised protocol.
II. It is suitable for real time communication and streaming small chunk of XML
data between network entities in real time.
III. It uses TCP as transport layer protocol.
IV. Client server architecture allows client to server and server to server
communication.
V. It provides range of application such as messaging, multiparty chat, voice/
video call, gaming.
DDS:
AMQP:
Suchismita Mohanty
Transport Layer:
Network layer:
Suchismita Mohanty
The network layer protocols are as follows:
IPv4 IPv6
Internet protocol version 4 Internet protocol version 6
It is 32 bit dotted decimal It is 128 bit colon hexa decimal
It supports 232 number 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 connection less. It is connection oriented.
Here at each router fragmentation and Here at each router fragmentation and
defragmentation takes place. defragmentation takes place.
6LoWPAN:
IPv6 over low power personal area network. It brings IP protocol to the low power
devices which have limited processing capability. It operates in 2.4 GHz frequency. It
supports data transfer rate up to 250kb/s. 6LoWPAN works with the 102.15.4 link
layer protocol.
Link layer:
IEEE802.3:
I. It is a standard for coaxial cable, twisted pair cable and fiber optic
cable as a shared medium.
II. 802.3 is the standard for 10Base5 Ethernet over coaxial cable as shared
medium. 10 means10Mbps and 5 means 500 meter.
III. 802.3 i is the standard for 10Base-T Ethernet over copper twisted-pair
connection.
IV. 802.3 j is the standard for 10Base-F Ethernet over copper twisted-pair
connection. 802.3 ae is the standard for 10 Gbits /Ethernet over fiber.
V. It provides data transfer rate from 10 Mb/s to 40 Gb/s and higher.
Suchismita Mohanty
for microwave access.
Official release 1997 2004
IEEE standard Defined under IEEE802.11 x Is standardised under 802.16
standard where x is various y family of wireless
wifi versions. networking where y refers to
various wimax versions
Versions of the standards 802.11a, 802.11b, 802.11g, 802.16a, 802.16d, 802.16e,
802.11n, 802.11ac, 802.11ad, 802.16 m.
802.11i This is wireless broadband
This is wireless LAN standard.
standard. Data transfer rate
from 1Mbps to 6.75 Gbps
Frequency band Defines under ISM band No bar on frequency usage in
where user has to pay no the WiMAX i.e protocols
extra charging for utilisingmight wirk in the ISM bands
those bands. or they might use a licensed
frequency version for which
the user probably would be
charged.
Range An idle wifi based network An idle wi-max network can
reaches around 100 m, as it reach about 80-90 kms
maximum range.
Data transfer rate Can transfer data at speeds Can exchange data at speed
up to 54mbps. upto 40 mbps.
Channel bandwidth 20 MHz Ranges from 1.25 MHz to 20
MHz
802.15.4- LR WPAN:
It is for low rate wireless personal network. Zigbee supports this protocol. It provides
data transfer rate from 40 kbps to 250 kbps. It is applicable for power constrained device
providing low cost and low speed communication.
Sensor:
❖ Sensor is a device/ module/ subsystem which purpose is to detect the event or change
in its environment and send the information to other electronics frequently a computer
processor.
❖ We can say it as a device which detects and measures a physical property and records,
indicates or otherwise responds to it.
Suchismita Mohanty
❖ It responds to some type of input from the physical environment. The specific input
could be light, heat, motion, moisture, pressure or any one of a great number of other
environmental phenomena. The output is generally a signal i.e converted to human
readable display at the sensor location or transmitted electronically over a network for
reading or further processing. It responds to electrical or optical signal.
Actuator:
It is a device which converts energy into motion.
Suchismita Mohanty
M2M IoT
1. M2M is subset of IoT 1. IoT is super set of M2M. It is a vast
network of connected devices that
may or may not include human
interaction.
2. Point to point communication usually 2. Multipoint Communication. Ex: By
embedded within hardware at the showing the ID card then your
customer site. Ex (Tap to pay, NFC). attendance will be registered.
The service in Samsung taps to pay Monitoring the health parameters
without using card. You just need to through the help of android app or
bring your mobile near the swipe web app.
machine. Using your ID card to open
or close the door.
3. It uses cellular or wired network. 3. It uses wireless network.
4. Do not necessarily require internet 4. Majority of cases require Internet
connection. connection.
5. It is more hardware based. 5. It is more software based.
6. On premises applications. (i.e 6. It uses cloud based application such as
software and technology i.e located analytic applications, enterprise
within the physical confines of an applications, and remote diagnosis and
enterprise or company’s data centre.) management applications.
Ex. Diagnosis applications, Service
management applications and on-
premises enterprises applications.
7. Data collection and analysis is done 7. Data collection and analysis is done in
in on premises storage infrastructure. cloud mostly.
8. Non IP based communication. 8. IP based communication.
9. M2M protocols include ZigBee, 9. IoT protocols include HTTP, CoAP,
Bluetooth, ModBus, M-Bus, Wireless Web Socket, MQTT, XMPP, DDS,
M-Bus, Power Line communication AMQP etc.. The protocols work above
(PLC), 6LoWPAN, IEEE 802.15.4, the network layer.
Z-wave. These protocols work below
the network layer.
10. The devices used are homogeneous 10. The devices used are heterogeneous
type within an M2M area network. type such as fire alarms, door alarms,
lighting control devices, etc..
i. ZigBee
ii. Bluetooth
iii. 6LoWPAN
iv. IEEE 802.15.4
v. ModBus
vi. M-Bus
vii. Wireless M-Bus
viii. PLC
Suchismita Mohanty
ZigBee:
1. It is a new wireless technology based on IEEE802.15.4 standards.
2. It is created for remote control and sensor networks.
3. It is created by ZigBee Alliance. The members of these alliances are Philips,
Motorola, intel, HP.
4. It is implemented with low cost. It provides reliable data transfer, short range
operations, very low power consumptions, adequate security features.
5. Useful for home automation.
ModBus:
1. It is a serial communication protocol.
2. It is developed by Modicon published by Modicon in 1979.
3. It is used for PLC (programmable logic controllers).
4. It is a method for transmitting information over serial lines between electronic
devices.
5. It is an open protocol i.e it’s free for manufacturers to build into their equipment
without having to pay royalties.
6. It is typically used to transmit signals from instrumentation and control devices back
to main controller or data gathering system. Ex: A system measures temperature and
humidity and communicate the result to computer. ModBus is generally used to
connect a supervisory computer with remote terminal unit in supervisory control and
data acquisition (SCADA).
SDN is defined as a network architecture that separates the control plane from the data plane
and centralises the network controller.
1. So the main components of SDN are Control Plane, Data Plane and centralised SDN
controller, programmable open APIs, standard communication interface (open flow).
2. Control Plane (CP): It is the pat of the network that carries the signalling and routing
message traffic. It takes the decision about how the packets should flow through the
network. It decides the path as well as the metrics to be followed in order to decrease
Suchismita Mohanty
the traffic. The CP allows dynamic access and administration. A network
administrator can shape the traffic from a centralised controller console without
touching individual switches to change the metrics in the preloaded program in
switches and routers (i.e the administrator can change any network switches rules
when necessary). Prioritising, de-prioritising or even blocking specific type of packets
i.e called dynamic routing. This is especially helpful in cloud computing.
3. Data plane: It is the part of the network that carries the payload data traffic from one
place to other.
4. SDN controller: SDN controller manages the data traffic. The SDN controller is a
software installer in server at data centre. It is based on protocols. It acts in between
network devices at one end and applications at other end. Any communication
between applications and devices has to go through controller.
5. Programmable open APIs: The SDN applications can be deployed through
programmable open APIs. It acts as an interface between SDN application and control
layers (north bound interface). This helps to implement various network services like
routing, access control and quality of service (QoS).
6. Standard communication interface (Openflow): It is the interface between the
control and infrastructure layers (south bound interface). OpenFlow is defined by
Open networking Foundation (ONF). With the OpenFlow the forwarding plane of the
network devices can be directly accessed and manipulated. It uses concept of flows to
identify network traffic based on predefined match rules. Flows can be programmed
statically or dynamically by the SDN control software.
6.1. Working of OpenFlow Switch:
i. The components of OpenFlow switch are one or more flow tables and
group table, which perform packet lookups and forwarding and openflow
channel to an external controller.
ii. The OpenFlow protocol is implemented on both the sides of the interface
between the controller and the network devices.
iii. The controller manages the switch via OpenFlow switch protocol. The
controller can add, update, and delete flow entries.
6.2. OpenFlow flow table:
1. Each flow table contains set of flow entries.
2. Each flow entry consists of match fields. Counters and set of instructions
to apply to matching packets.
3. Matching starts at the first flow table and may continue to additional flow
table of the pipeline.
Benefits of SDN over conventional network architecture:
1. It makes networks flexible with the help of software by removing the demerits of
traditional or conventional network architecture.
2. It reduces the complexity of increasing number of distributed protocols and the use of
proprietary hardware and interfaces which are used to be implemented in conventional
network. It uses simple packet forwarding technique as opposing to conventional
network.
Suchismita Mohanty
3. It separates control plane from the data plane and centralises the network controller. But
in conventional network architecture the control plane and data plane are coupled.
4. The other benefit of SDN is network management and end to end visibility. The
network admin only deal with one centralised controller to distribute policies to the
connected switches instead of configuring multiple individual devices.
5. SDN applications can be deployed through programmable open APIs so this speeds up
the innovation as the network administrators no longer need to wait for the device
vendors to embed new features in their proprietary hardware.
SDN architecture:
Challenges of SDN:
If the controller will be hacked or corrupted then whole system will not work.
Note: ONF is the broadly accepted SDN protocol for the southbound interface.
Suchismita Mohanty
Python Keywords:
Key words are also known as reserved words whose meaning is already defined to the
compiler. We cannot use keywords as variable name. In Python 2.7 there are 31 keywords
and in python 3.3 there are 33 key words. Depending upon the versions the keywords may
vary. But we will discuss some of the common keywords.
Instructions to find the keywords in any version of Python are
>>>import keyword
>>>print ([Link])
Various keywords:
Del: This key word is used to delete the reference of a variable or an object from the memory.
Ex:
>>> a=b=5
>>>del a
>>>print a
Suchismita Mohanty
Since we have deleted the reference of the variable ‘a’ so while printing ‘a’ it is showing
error.
True+True=2
and , or, not: These are the logical operators in python. These are used to combine two or
more statements or instructions or invert one instruction. Those statements are called
operands.
and: if truth value of both the operands are true then only the result is true otherwise false.
Suchismita Mohanty
Truth table of AND
or: if the truth value of one of the operands is true then the result is true otherwise false.
Operand Not A
A
True False
False True
Truth table of Not
Suchismita Mohanty
assert: assert is used for debugging purpose. It helps to find out the bugs conveniently. It is
used to check internal state or whether any assumption is true or false. It is associated with a
condition. If the condition is true then it will not return anything but if the condition is false
then it will return an AssertionError. If we want to print some error message then also we can
do. i.e
>>> assert condition, “message you want to print”
The above instruction is equivalent to >>> if not condition:
raise AssertionError (message)
Import: Import key word is used to import a module to the current program or namespace.
>>> import module name
Ex: let we want to import “math module” which contains all mathematical as well as
trigonometric attributes and functions. Math module is a standard module in python.
>>> import math
>>>print [Link]()
>>>print [Link]()
From: if we want to import a specific attributes or functions of the module then we use from--
-import.
>>> from module name import attribute name.
Ex: let we want to use only sin () from the math module then
>>>from math import sin
Suchismita Mohanty
As: This is used to create an alias while importing a module. It gives a user defined name to
the module while importing it.
Ex: we want to find the result of sin pi
>>> import math as myalias
>>> print [Link]([Link])
In: it is used to check whether a sequence (list, string, tuple, dictionary, set) contains a value
or not. It returns true if the value is present in the sequence and returns false if the value is
not in sequence. For this you first need to define a sequence. It is also used to traverse
through a sequence in for loop.
Suchismita Mohanty
Print: It is a standard library function in python. It is used to print a string or value of an
expression or value of a variable etc.
While, for: these are loop control instructions. If want to execute two or more statements
repeatedly until and unless the condition is false or a break statement incidents. Generally for
loop is used when we know the total number of iterations. We can use for with any type of
sequence also.
Break, continue: These are used with for and while to alter their normal behaviour. When
Break statement will be encountered it will terminate the smallest loop it is in and the control
will directly move to the statement just below the loop. Continue terminates the current
iteration but not the whole loop.
Suchismita Mohanty
Def, lambda: def is used to define a user defined function. Lambda is used to create an
anonymous function i.e the name of the function is not known. Function is a block of related
statements to perform a specific task. It organises the code and do some repetitive task. It is
defined once and can be called many times inside the program. It may or may not contain
return statement. If it does not contain return statement explicitly then it implicitly returns
none. Lambda is associated with an expression. That expression is evaluated and returned. It
is an inline function. It does not contain any return statement explicitly. The important parts
of function are function definition, function call. Function definition is used to mention the
instructions that will be executed repeatedly. Those statements will be executed only when
the function will be called.
Return: return statement is used inside a function to exit and return a value. If the return
statement is not written explicitly then it will return the’ none’ implicitly.
None: it is a special constant in python. It represents the absence of a value i.e null in python.
It is an object of its own data type i.e NoneType. We cannot create multiple ‘none’ but we
Suchismita Mohanty
can assign it to variables. And those variables will be equal to each other. If a function does
not return any value explicitly then ‘none’ will be returned implicitly. ‘None’ should not
imply false, zero, empty list, dictionary or string.
If, else, elif: these are used as selection statement. If we have many choices then for decision
making or condition branching these are used. When we want to execute a block of
statements if the condition is true then we will use if, elif. If the condition is false then the
else statement will be executed. ‘elif’ is used for else if.
Try, except, raise: these are used with exceptions in python. Exceptions are errors which
occur in our program if something goes wrong during execution. Ex of some exceptions:
ZeroDivisionError, IOError, ValueError, ImportError, NameError, TypeError. Try....except
blocks are used to handle the exceptions in the program. If an exception can be caught then
try...except block will return ‘none’. We can also return an exception message with the help
of ‘raise’ keyword.
Suchismita Mohanty
Finally: Finally is used with try....except block to close up resources or file streams. The
block of codes inside finally is executed even if there exists some unhandled error or
exception.
Global : it is used to define a variable as global inside a function. Because generally the
variables inside the functions are local so those cannot be accessed outside. If we want to
read the value of a global variable then it is not required to declare it inside the function but if
we want to modify the value of a global variable inside a function then we must declare it as
global inside the corresponding function. If we will not mention global and create a variable
then that will be a local variable.
Suchismita Mohanty
Nonlocal: it is used to define that a variable inside a nested function (function inside
function) is not local to that function. If we want to change the value of the non-local variable
inside the nested function then we need to declare it as nonlocal. Otherwise a local variable
with a same name is created inside the method.
Class: class is used to create new user defined class. It is a collection of related attributes and
functions that try to represent a real time situation. It is a concept of object oriented
programming.
Ex: class ExampleClass:
def fun1(parameters):
..............
Def fun2 (parameters):
..............
Is: It is used to check the identity of an object while the= = operator is used to test whether
two variables are equal or not. ‘Is’ is used to check if two variables refer to same object or
not. It returns true if the variables are identical else returns false. None, True, False refer to
only one object so they will always give true. List, and Dictionary are mutable. There value
can be changed. If value will be changed they can refer to two objects in memory. So they
will give False while compared through ‘is’ operator. But string and tuple are immutable. We
cannot change their value once defined. So they will give True while compared through ‘is’
operator.
Pass: pass statement is a null statement in python. It works like a place holder. Nothing
happens when it is executed. If we want to implement a function in near future and it is not
implemented yet. If we will write like
>>> Def future (parameters): Then it will give indentation error in the middle of the program.
So we will write as:
Suchismita Mohanty
>>>def future(parameters):
Pass
Note: We can use this while finding whether the given number is prime or not.
Same thing can be done with a class.
Range: This statement in python a list of numbers in arithmetic progression.
Suchismita Mohanty
Limitations and disadvantages of conventional network architecture:
1. Complex Network Devices
2. Management Overhead
3. Limited Scalability
Complex Network Devices:
1. The protocol implementation overhead to improve link speed and reliability and most of the
protocols are designed for specific applications.
2. It supports limited interoperability due to lack of standard and open interfaces i.e hardware and
software of network are proprietary.
3. It has very slow product life cycles which limit the opportunity of innovations.
4. It is well suited for static traffic patterns but difficult to implement the protocols for dynamic
traffic patterns as in IoT and Cloud.
Management Overhead:
1. As it does not support interoperability so it is difficult to manage multiple network devices and
interfaces from multiple vendors.
2. For upgrading the networks it needs configuration changes in multiple devices like switches,
routers, firewalls etc.
Limited scalability:
It is difficult to implement virtualisation, implementation of distributed algorithm and data
analytics for distributed applications and big data with minimal manual configurations.
NFV:(Network Function Virtualisation):
It is a technology which gets maximum benefits by providing virtualisation to the industry
standard high volume servers, switches and storages. So it reduces the hardware cost and power
consumption. It comprises of the software implemented functions that can run in the cloud. So it
is able to differentiate among hardware and software.
NFV provides infrastructure on which SDN can run. SDN and NFV are complementary to each
other. But they can work independently.
Hardware remains same so network functions can be easily tested and upgraded.
NFV is applicable to fixed and mobile network control plane and data plane.
The key components of NFV architecture:
Virtualized Network Function(VNF)
NFV infrastructure(NFVI)
NFV management and orchestration
VNF:
It is the software implementation of the network functionality.
This can run over NFV in cloud so can be shared for multiple network services.
NFVI:
It includes the resources to be virtualised such as computing, network and storage
resources.
NFV Management and orchestration:
It manages the task related to virtualisation.
It deals with the lifecycle management of physical and software resources, VNFs.
EX: Use of NFV for virtualisation of home networks:
The home network includes:
Home Gateway
IP enabled devices
1. Home gateway provides wide area network connectivity to the IP enabled devices such as
IPTV, VoIP.
2. Various functionalities of home gateway are: DHCP (Dynamic Host Configuration
Protocol), NAT (Network Address Translation), application specific gateway and Firewall.
Suchismita Mohanty
3. Through the help of the DHCP the IP enabled devices will be able to get IP addresses
whenever they will switch on and connected to the home gateway. DHCP is configured in
the Home Gateway.
4. Whatever the devices will be connected to the home network they will get the private
address. So to communicate with the internet i.e outer world they need a public IP. That
public IP is configured at the external interface of the home gateway. So whenever the
devices will try to connect to the internet the private address will be translated to one public
address through the help of the NAT.
5. The gateway provides application specific routing for applications such as VOIP and IPTV.
Difference between SDN and NFV:
Services SDN NFV
Abbreviation 1. Software Defined 1. Network Function
Network Virtualisation
Basic Idea 2. SDN separates control 2. NFV transfers
plane from data plane dedicated application to
and centralizes the generic servers.
control and
programmability of the
network
Areas of Operations 3. SDN operates in data 3. It operates in service
centre, campus and/or provider network or
cloud. operators.
Initial application 4. SDN targets cloud or 4. NFV targets router,
Target orchestrations and firewalls, gateways,
networking WAN, CDN, accelerators
and SLA assurance.
Protocols 5. Open Flow 5. None
Supporting 6. Open Networking 6. ETSI NFV working
Organisation Foundation. group
What is IoT orchestration?
1. It is the process of integrating IoT applications with enterprise IT systems, cloud services,
mobile applications within and across the boundaries of the company.
2. It is typically used to automate or improve process, and potentially synchronise data all in
real-time.
Characteristics of M2M:
1. Point to point communication usually embedded within hardware at the customer site. Ex
(Tap to pay, NFC). The service in Samsung taps to pay without using card. You just need to
bring your mobile near the swipe machine. Using your ID card to open or close the door.
2. It uses cellular or wired network.
3. Do not necessarily require internet connection.
4. It is more hardware based.
5. On premises applications. (i.e software and technology i.e located within the physical
confines of an enterprise or company’s data centre.) Ex. Diagnosis applications, Service
management applications and on-premises enterprises applications.
6. Data collection and analysis is done in on premises storage infrastructure.
7. Non IP based communication.
8. M2M protocols include ZigBee, Bluetooth, ModBus, M-Bus, Wireless M-Bus, Power Line
communication (PLC), 6LoWPAN, IEEE 802.15.4, Z-wave. These protocols work below
the network layer.
Suchismita Mohanty
Data Type:
Every value in python has a data type. Generally data types are classes and the variables are object
in python.
type() :is used to know which class a variable or value belongs to.
isinstance(): to check if an object belongs to a class.
Note: Numbers we deal with everyday are decimal (base 10) number system. But computer
programmers (generally embedded programmer) need to work with binary (base 2), hexadecimal
(base 16) and octal (base 8) number systems. In Python, we can represent these numbers by
appropriately placing a prefix before that number. Following table lists these prefix.
Number Prefix
system
Binary 0b or 0B
octal 0o or 0O
Hexadecimal 0x or 0X
Suchismita Mohanty
Sequence Data Type:
String:
1. string is a sequence of Unicode characters. There are no limits to the number of characters in
a string. A string with zero characters is known as an empty string.
2. We can use single quotes, ‘ ’ or double quotes “ ” to represent characters. Multi line string can
be denoted using triple quotes, ’ ’ ’ or “ ” ”.
3. Slicing operator i.e colon ‘:’ and index operator ‘[]’ can be used in string to retrieve range of
character from the existing string. String is immutable i.e once it is defined, memory size will be
fixed. You cannot append anything to the existing string and you cannot change/update any of
the character of the string.
4. Index operator i.e pair of square braces’ []’ can be used in string to retrieve a character from the
existing string. Indexing can be +ve indexing and –ve indexing. +ve indexing starts from 0 i.e
from left to right and –ve indexing starts from -1 from the right to left. Index value must be
integer type.
5. ‘ len()‘is used to find the length of the string. Space is also counted.
Suchismita Mohanty
7. The elements of list can repeated for the mentioned number of times using ‘*’ operator. We can
delete the entire string using ‘del’.
10. Strings are immutable i.e once defined memory is fixed and value is fixed. So changing the
value of a string, appending and removing the characters to/from the existing string is not
possible. But we can assign a new string to the existing with the help of the assignment
operator.
11. ‘In’ is used to check the members of the list. It is also used to traverse the entire list.
List:
1. List is a compound data type used to group together other values. List items can be of any data
type. It contains items separated by commas and enclosed within square brackets.
Suchismita Mohanty
2. List allows duplication of items.
3. Two lists can be combined or merged using ’ +’ operator.
4. The elements of list can repeated for the mentioned number of times using ‘*’ operator.
5. Slicing operator ‘:’ and index operator ’[]’ can be used to extract an item or range of items from
the list. In slicing operator we use the index value to retrieve any element. Index value refers to
the position of the element in a list. The index can only be an integer. It can never be floating. If
the index will be other than integer then it will give TypeError. Type Indexing can be done in
two ways i.e +ve indexing and –ve indexing. +ve indexing starts from zero i.e from left to right
in python. –ve index starts from -1 i.e from right to left. If you will try to retrieve the elements
out of the index range then it will show IndexError.
6. Len(): is used to find the number of items present in the existing list.
7. It is mutable i.e the memory size is not fixed. You can append , remove any item to/from the
existing list. We can also change the individual elements of the existing list. We will use
assignment operator to change an item or range of item.
8. append()is used to add an item at the last position or the index of the existing list.
9. Etend(): is used to add several items at a time at the last position or the index of the existing list.
10. Insert() is used to add an item at the desired position of the existing list.
Suchismita Mohanty
11. Remove()is used to remove an item from the existing list. It can be from any position or index
and assign the remaining items into the existing list.
12. Pop() is used to remove an item from a given location of the existing list and assign the
remaining items into the existing list.
13. Del(): is used to delete an element from the existing list or to delete an entire list.
14. Clear(): is used to clear all the elements of the existing list.(it is not supported in 2.7 but in
higher versions).
15. We can also delete the elements of a list assigning empty list to the desired range of position.
16. ‘In’ is used to check the members of the list. It is also used to traverse the entire list.
17. Lists can be nested i.e another list can be an item in the existing list.
Suchismita Mohanty
Tuples:
1. A tuple consists of a number of values separated by commas and enclosed within parentheses.
2. To create a tuple with single element we need to give a trailing comma.
3. A tuple is a sequence data type that is similar to the list. But it is immutable i.e if once defined
then memory will be fixed. You cannot append, remove items to /from the existing list you
cannot alter the value of the existing tuple . But we can delete the entire tuple using ‘del’ key
word.
4. You cannot alter the items in a tuple once it is defined i.e can be thought as read-only list, but
you can assign another tuple to the previous.
5. Len(): is used to find the number of elements present inside list.
6. Slicing operator’:’ and indexing operator’ []’ is used to retrieve an element or group of elements
from the existing tuple.
7. Two tuples can be merged or combined or concatenate using ‘+’ operator and new memory
location will be allocated to the resultant tuple.
8. The elements of list can be repeated for the mentioned number of times using ‘*’ operator.
9. ‘In’ is used to check the members of the list. It is also used to traverse the entire tuple.
10. Tuple can be nested i.e another tuple is an element of the existing tuple.
11. It allows duplication of elements.
Suchismita Mohanty
Dictionaries:
1. It is a mapping data type or a kind of hash table that maps keys to values and enclosed with curly
braces. It is an unordered collection of values.
2. Keys in a dictionary can be of immutable data type like number, string and tuple and must be
unique.
3. Value in a dictionary can be of any data type or object.
4. Dictionary is mutable so its values can be changed, with the help of the assignment operator. If
the value is not present then a new key: value pair will be created.
5. A value in a dictionary can be another dictionary.
Suchismita Mohanty
9. Items (): is used to get all the items in a dictionary.
10. Keys(): is used to get all the keys in a dictionary.
11. Values(): is used to get all the values in a dictionary.
12. Has_key (): is used to check if dictionary has a key. If present then it returns true otherwise
returns false.
13. Pop(): is used to delete a value, corresponding to the given key inside the pop(), from the
existing dictionary and assign the remaining values to the existing dictionary.
14. Whenever you will print the dictionary elements it will be printed in dictionary order i.e
alphabetical order. The numbers will be printed last.
15. ‘In’ is used to check the members of the list. It is also used to traverse the entire dictionary.
Suchismita Mohanty
Type conversions:
One type of data type converted to another data type is also known as coercion. Operation like
addition, subtraction, multiplication, division coerce the integer data type implicitly to float if one
of the operand is float. To explicitly convert we should use some of the built in methods or
functions as follows.
1. Str(): is used to convert other data type to string. It must contain compatible value.
2. Int(): is used to convert other data type to int
3. Float(): is used to convert other data type to float
4. Long(): is used to convert other data type to long.
5. List(): is used to convert other data type to list.
6. Set():is used to convert other data type to set.
7. tuple():is used to convert other data type to tuple.
Suchismita Mohanty
The client-server model is stateless, meaning each request from a client must contain all information for the server to process it, with no knowledge of previous interactions, leading to higher resource usage since new connections are often established for each transaction . In contrast, the exclusive pair communication model is stateful and maintains a persistent connection between the client and server, utilizing single HTTP connections that persist until explicitly closed, which allows the server to be aware of all open connections and supports session continuity .
In Python, mutable data types like lists and dictionaries can be changed after creation; for example, elements can be added or removed from a list, and dictionary values can be altered by assigning new key-value pairs . Immutable data types, such as strings and tuples, cannot be modified once defined; attempting to alter an immutable object results in the creation of a new object instead . For example, concatenating tuples creates a new tuple, leaving original tuples unchanged, whereas slicing strings results in new string instances . This difference in mutability affects how these data types are managed in memory and manipulated within scripts. Mutable objects can lead to side effects if not handled carefully, unlike immutable objects which provide stability in shared states across program components .
The primary constraints of REST-based communication APIs are statelessness, cache-ability, client-server architecture, and a layered system. Statelessness allows individual requests to be processed independently, which facilitates horizontal scalability by distributing requests across multiple servers . The cache-ability of responses helps improve performance and reduce server load, while the client-server separation of concerns allows independent development and scaling of the client and server sides without affecting each other .
Wireless Sensor Networks (WSNs) enhance the adaptability of an IoT environment by allowing devices to communicate wirelessly, thus offering flexibility in deployment and the ability to reconfigure or expand the network by adding new nodes. This dynamic adaptability is crucial in varying environmental conditions, as the network can automatically update software, integrate new sensors, or modify data collection parameters in real-time, ensuring consistent monitoring and performance without manual intervention .
The Layered System constraint in REST architecture contributes to network scalability by allowing intermediate servers (like gateways and proxies) to handle requests instead of directly communicating with end servers. Each layer operates independently, without knowledge of whether the intermediary is involved, thus enabling load balancing, resource caching, and request routing. This setup not only improves the scalability but also the flexibility of adding more intermediary layers to enhance performance without altering client-server interactions .
WebSocket API supports IoT applications that require low latency or high throughput by providing a bi-directional, full-duplex communication model that reduces latency and network traffic. This is achieved by maintaining a single persistent TCP connection after an initial HTTP handshake, eliminating the need for repeated connection setups and teardowns for each message .
The "Pay As You Go" model in cloud computing offers cost-efficiency by charging organizations only for the resources they consume, which can lead to significant savings compared to maintaining an on-premises infrastructure. This allows for scalability and flexibility, as organizations can easily adjust their resource use in response to demand fluctuations without upfront investments . However, potential drawbacks include unpredictable costs, as usage spikes can lead to unexpectedly high expenses, and dependency on the cloud provider's pricing and service availability, which might affect operational continuity if adjustments in plans or downtimes occur without prior notice .
In Python, try...except blocks are used to handle exceptions during program execution. The code within the try block is executed, and if an exception occurs, control is passed to the corresponding except block where the exception can be managed, thus preventing the program from crashing . The finally block, if included, contains code that runs after the try and except blocks, regardless of whether an exception was raised or caught. This feature is useful for cleanup actions like closing files or releasing resources .
Dictionaries in Python use a hash table internally to store key-value pairs, where each key is unique and immutable, facilitating fast access to values by key through constant time complexity operations such as retrieval and insertion . Compared to lists, dictionaries are more suitable for scenarios requiring quick lookups by unique identifiers or keys, as lists necessitate O(n) time complexity for similar operations by search index. Additionally, dictionaries are ideal for maintaining associations between related data elements, offering flexibility and speed in handling complex data relationships .
The push-pull communication model enhances buffering by using queues as intermediaries, which store data pushed by producers until consumers are ready to pull it, thereby balancing the mismatch in data production and consumption rates . Producers do not need to be aware of consumers because the queue decouples the systems, allowing producers to push data without knowing who will consume it or when, which increases system scalability and flexibility .