You are on page 1of 16

Communication Models in IoT (Internet of

Things )

IoT••devices are found everywhere and will enable circulatory intelligence in the
future. For operational perception, it is important and useful to understand how
various IoT devices communicate with each other. Communication models used in
IoT have great value. The IoTs allow people and things to be connected any time,
any space, with anything and anyone, using any network and any service.
Types of Communication Model :
1. Request & Response Model –
This model follows a client-server architecture.
• The client, when required, requests the information from the server. This
request is usually in the encoded format.
• This model is stateless since the data between the requests is not retained
and each request is independently handled.
• The server Categories the request, and fetches the data from the database
and its resource representation. This data is converted to response and is
transferred in an encoded format to the client. The client, in turn, receives
the response.
• On the other hand — In Request-Response communication model client
sends a request to the server and the server responds to the request.
When the server receives the request it decides how to respond, fetches
the data retrieves resources, and prepares the response, and sends it to
the client.
2. Publisher-Subscriber Model –
This model comprises three entities: Publishers, Brokers, and Consumers.
• Publishers are the source of data. It sends the data to the topic which are
managed by the broker. They are not aware of consumers.
• Consumers subscribe to the topics which are managed by the broker.
• Hence, Brokers responsibility is to accept data from publishers and send
it to the appropriate consumers. The broker only has the information
regarding the consumer to which a particular topic belongs to which the
publisher is unaware of.
3. Push-Pull Model –
The push-pull model constitutes data publishers, data consumers, and data queues.
• Publishers and Consumers are not aware of each other.
• Publishers publish the message/data and push it into the queue. The
consumers, present on the other side, pull the data out of the queue. Thus,
the queue acts as the buffer for the message when the difference occurs in
the rate of push or pull of data on the side of a publisher and consumer.
• Queues help in decoupling the messaging between the producer and
consumer. Queues also act as a buffer which helps in situations where
there is a mismatch between the rate at which the producers push the data
and consumers pull the data.
4. Exclusive Pair –
• Exclusive Pair is the bi-directional model, including full-duplex
communication among client and server. The connection is constant and
remains open till the client sends a request to close the connection.
• The Server has the record of all the connections which has been opened.
• This is a state-full connection model and the server is aware of all open
connections.
• WebSocket based communication API is fully based on this model.
Internet of Things (IoT) Enabling Technologies
•••
IoT(internet of things) enabling technologies are
1. Wireless Sensor Network
2. Cloud Computing
3. Big Data Analytics
4. Communications Protocols
5. Embedded System
1. Wireless Sensor Network(WSN) :
A WSN comprises distributed devices with sensors which are used to monitor
the environmental and physical conditions. A wireless sensor
network consists of end nodes, routers and coordinators. End nodes have
several sensors attached to them where the data is passed to a coordinator
with the help of routers. The coordinator also acts as the gateway that
connects WSN to the internet.
Example –
• Weather monitoring system
• Indoor air quality monitoring system
• Soil moisture monitoring system
• Surveillance system
• Health monitoring system
2. Cloud Computing :
It provides us the means by which we can access applications as utilities over the
internet. Cloud means something which is present in remote locations.
With Cloud computing, users can access any resources from anywhere like
databases, webservers, storage, any device, and any software over the internet.
Characteristics –
1. Broad network access
2. On demand self-services
3. Rapid scalability
4. Measured service
5. Pay-per-use
Provides different services, such as –
• IaaS (Infrastructure as a service)
Infrastructure as a service provides online services such as physical
machines, virtual machines, servers, networking, storage and data center
space on a pay per use basis. Major IaaS providers are Google Compute
Engine, Amazon Web Services and Microsoft Azure etc.
Ex : Web Hosting, Virtual Machine etc.
• PaaS (Platform as a service)
Provides a cloud-based environment with a very thing required to support
the complete life cycle of building and delivering West web based (cloud)
applications – without the cost and complexity of buying and managing
underlying hardware, software provisioning and hosting. Computing
platforms such as hardware, operating systems and libraries etc. Basically,
it provides a platform to develop applications.
Ex : App Cloud, Google app engine
• SaaS (Software as a service)
It is a way of delivering applications over the internet as a service. Instead
of installing and maintaining software, you simply access it via the
internet, freeing yourself from complex software and hardware
management.
SaaS Applications are sometimes called web-based software on demand
software or hosted software.
SaaS applications run on a SaaS provider’s service and they manage
security availability and performance.
Ex : Google Docs, Gmail, office etc.
3. Big Data Analytics :
It refers to the method of studying massive volumes of data or big data. Collection of
data whose volume, velocity or variety is simply too massive and tough to store,
control, process and examine the data using traditional databases.
Big data is gathered from a variety of sources including social network videos,
digital images, sensors and sales transaction records.
Several steps involved in analyzing big data –
1. Data cleaning
2. Munging
3. Processing
4. Visualization
Examples –
• Bank transactions
• Data generated by IoT systems for location and tracking of vehicles
• E-commerce and in Big-Basket
• Health and fitness data generated by IoT system such as a fitness bands
4. Communications Protocols :
They are the backbone of IoT systems and enable network connectivity and linking
to applications. Communication protocols allow devices to exchange data over the
network. Multiple protocols often describe different aspects of a single
communication. A group of protocols designed to work together is known as a
protocol suite; when implemented in software they are a protocol stack.
They are used in
1. Data encoding
2. Addressing schemes
5. Embedded Systems :
It is a combination of hardware and software used to perform special tasks.
It includes microcontroller and microprocessor memory, networking units
(Ethernet Wi-Fi adapters), input output units (display keyword etc. ) and storage
devices (flash memory).
It collects the data and sends it to the internet.
Embedded systems used in
Examples –
1. Digital camera
2. DVD player, music player
3. Industrial robots
4. Wireless Routers etc.

Here are some differences between contactless smart cards and RFID tags:

• Range

Contactless smart cards operate at a short range (less than 4 inches), while RFID tags can operate
over long ranges (25 feet).

• Security

Contactless smart cards can support the equivalent security capabilities of a contact smart card
chip. RFID tags can be read by any compatible reader.

• Applications

Contactless smart cards are used for applications that require secure transactions or the
protection of personal information. RFID tags are used for low-cost applications like tracking
animals and goods, and replacing bar codes at retailers.

• Durability

Contactless cards are longer lasting than other cards because they are not swiped.
Feature Contactless Smart Card RFID Tag

Radio-Frequency
Radio-Frequency
Technology Identification (RFID) with
Identification (RFID)
embedded chip

Diverse - Stickers, labels, key


Form Factor Credit Card sized plastic card
fobs, etc.

Less storage capacity


More storage capacity (can hold
Data Storage (typically holds a unique
kilobytes of data)
identifier)

Read/Write
Read/Write (can be programmed) Read-only (pre-programmed)
Capability

Processing
Can perform basic computations No processing power
Power

More secure due to encryption Less secure due to simpler


Security
and authentication design

Cost More expensive Less expensive

Inventory tracking, asset


Secure transactions (payments,
Applications management, product
access control), identification
authentication
COAP - Constrained Application Protocol.

COAP is an IoT Protocol.

COAP is designed to allow simple devices to join IoT through the low

bandwidth-restricted network.

COAP is designed for M2M and IoT applications.

COAP is an Application Layer Protocol that follows the request-response model

COAP runs over UDP Protocol.

COAP uses fewer resources than HTTP.

COAP client can use GET, PUT, and DELETE commands.

Message Types CoAP

■ COAP Supports Four different message types:

1. Confirmable Message {Reliable Message} (Con):

A Confirmable message requires a response, either a Positive Acknowledgement or a


Negative Acknowledgement.

If acknowledgement is not received then retransmissions are made until all attempts are

exhausted.

The Acknowledgement message contains the same ID as the confirmation message.

If the server has trouble managing the incoming request, it

message (RST) instead of an acknowledge message (ACK).

2. Non-confirmable Message {Unreliable Message} (Non):

☐ A Non-confirmable message doesn't require a response in the form

Acknowledgement.

These messages do not contain critical information, like a request for

sensor measurement made in periodic basis.

Even if one value is missed, there is not too much impact.

Even if these messages are unreliable, they have a uniquen

3. Acknowledgement (Ack):

☐ It is sent to Acknowledge a confirmable message (Con).

4. Reset (RST):

It represents negative Acknowledgment.

☐ It generally indicates some kind of failure, like unable to process received.


Basics of 6LOWPAN

▪ 6LOWPAN - IPV6 over Low Power Wireless Personal Area Network.

■ It combines the latest Internet Protocol IPV6 and Low Power Wireless Personal

Area Networks.

■ So, 6LOWPAN allows the smallest device with limited processing ability to

transmit information wirelessly on the internet using IPV6.

▪ 6LOWPAN is low-cost, Short Range, Low Memory usage, low bit-rate, and

comprises of edge router & sensor nodes.

▪ Using 6LOWPAN, the smallest of the loT devices can be pa

talk to the outside world. (Example: LED Streetlights)

■ 6LOWPAN Technology makes individual nodes IP-enabled.

Edge Router is the core of the 6LOWPAN network which connects

the 6LOWPAN network with the internet.

■ 6LOWPAN can communicate with ZigBee devices (IEEE 802.15.4

and Wi-Fi devices (IEEE 802.11).

■ 6LOWPAN uses AES-128 {Advanced Encryption Standard} link


layer security, which is defined in IEEE 802.15.4 and it provides

Requirements of 6LOWPAN

■ The device must have sleep mode to support battery savings.

■ Minimal Memory requirements. {16kB RAM and 128kB ROM}

■ Routing Overhead should be lower.

▪ Low Computations are required with 6LOWPAN.

Features of 6LOWPAN

is used with IEEE 802.15.4 (ZigBee) in 2.4GHz (ISM Band).

Outdoor range is up to 200m at Max.

Maximum data rate is 200kbps.

Advantages of 6LOWPAN

■ 6LOWPAN is a Mesh Network that is robust, scalable, and self-healing.

▪ 6LOWPAN delivers low-cost, and secure communication in loT devices.

▪ 6LOWPAN uses IPV6 protocol, so data can be routed directly to the cloud.

▪ 6LOWPAN offers one-to-many, and many-to-one routing.

■ 6LOWPAN works efficiently with open IP standards like TCP, UDP, COAP, HTTP,

MQTT, and WebSocket.

■ For power saving, leaf nodes can stay in sleep mode for a longer duration.

▪ 6LOWPAN offers a large network, which can be used by millions of IoT devices.

A Compare between mutable and non-


mutable data types (data structures) in Python with appropriate examples. make table compare

Phind

In Python, data types can be broadly categorized into mutable and non-mutable types. Mutable
data types can be changed after they are created, while non-mutable data types cannot be
changed after they are created. This distinction is crucial for understanding how data is
manipulated in Python programs. Let's compare mutable and non-mutable data types with
examples in a table format.

Mutable Data Types

Mutable data types can be changed after they are created. This means that you can modify the
content of the data type without changing its identity.
Data
Description Example
Type

A collection of items that can be of


List my_list = [1, 2, 3]; my_list[0] = 10
different types.

my_dict = {'name': 'John', 'age': 30};


Dictionary A collection of key-value pairs.
my_dict['age'] = 31

Set A collection of unique items. my_set = {1, 2, 3}; my_set.add(4)

Non-Mutable Data Types

Non-mutable data types cannot be changed after they are created. This means that if you try to
modify a non-mutable data type, you will get a new object instead.

Data
Description Example
Type

A whole number, positive or negative, without


Integer x = 10; y = x; y = 20
decimals.

A number, positive or negative, containing


Float x = 10.5; y = x; y = 20.5
one or more decimals.

String A sequence of characters. x = "Hello"; y = x; y = "World"

A collection of items that are ordered and my_tuple = (1, 2, 3); # This will raise an
Tuple
immutable. error: my_tuple[0] = 10

Key Differences

• Mutability: Mutable data types can be changed after they are created, while non-mutable
data types cannot.

• Identity: For mutable data types, the identity of the object can change as its content
changes. For non-mutable data types, the identity of the object remains the same even if its
content changes.

• Use Cases: Mutable data types are useful when you need to change the content of the data
type. Non-mutable data types are useful when you want to ensure that the data remains
constant.
List

A list in Python is a mutable, ordered collection of items. The items in a list can be of
any type, and they can be changed, added, or removed. Lists are defined by
enclosing a comma-separated sequence of items in square brackets [].

Key Features:

• Mutable: Items in a list can be changed, added, or removed.


• Ordered: The order of items in a list is preserved.
• Indexed: Items in a list can be accessed by their index, starting from 0.
• Duplicates Allowed: A list can contain duplicate items.

Example:

my_list = [1, 'hello', 3.14, True]


print(my_list[1]) # Output: hello
my_list.append(42) # Adds 42 to the end of the list
print(my_list) # Output: [1, 'hello', 3.14, True, 42]

Tuple

A tuple in Python is an immutable, ordered collection of items. Once a tuple is


created, its items cannot be changed, added, or removed. Tuples are defined by
enclosing a comma-separated sequence of items in parentheses ().

Key Features:

• Immutable: Items in a tuple cannot be changed, added, or removed after


creation.
• Ordered: The order of items in a tuple is preserved.
• Indexed: Items in a tuple can be accessed by their index, starting from 0.
• Duplicates Allowed: A tuple can contain duplicate items.

Example:

my_tuple = (1, 'hello', 3.14, True)


print(my_tuple[1]) # Output: hello
# my_tuple.append(42) # This would raise an error because tuples are immutable

Dictionary
A dictionary in Python is an unordered collection of key-value pairs. Each key in a
dictionary is unique and must be of an immutable type (such as strings, numbers, or
tuples). The values can be of any type and can be changed, but the keys cannot be
changed. Dictionaries are defined by enclosing a comma-separated list of key-
value pairs in curly braces {}.

Key Features:

• Unordered: The order of items in a dictionary is not preserved.


• Key-Value Pairs: Each item in a dictionary is a pair of a key and a value.
• Keys Must Be Unique: Each key in a dictionary must be unique.
• Keys Are Immutable: The keys in a dictionary must be of an immutable type.
• Values Can Be Mutable: The values in a dictionary can be of any type and can
be changed.

Example:

my_dict = {'name': 'John', 'age': 30, 'is_student': True}


print(my_dict['name']) # Output: John
my_dict['age'] = 31 # Changes the value associated with the key 'age'
print(my_dict) # Output: {'name': 'John', 'age': 31, 'is_student': True}

You might also like