Sei sulla pagina 1di 13

Pervasive Computing

Dr. Muhammad Taha Jilani

Lecture - 12
Recap

Pervasive Computing by Dr. M.Taha


Recall
Application Layer Protocols for IoT
To transfer all the
sensor data collected
by a gateway node to a
server, the IoT network
requires a protocol that
is
bandwidth-efficient,
energy-efficient
capable of working with limited
hardware resources (i.e., main
memory and power supply)

Pervasive Computing by Dr. M.Taha


Application Layer Protocols for IoT
Publish-subscribe Architecture:
Another architecture for client-server interaction is based on publish-
subscribe architecture

Sender Comm. Infra. Receivers

Pervasive Computing by Dr. M.Taha


Application Layer Protocols for IoT
Publish-subscribe Architecture:
Another architecture for client-server interaction is based on publish-
subscribe architecture
Dynamic subscriptions Fixed subscription

Pervasive Computing by Dr. M.Taha


Application Layer Protocols for IoT
For WSN networks to transfer data from a gateway to clients can use
publish-subscribe architecture:
client that needs data (known as subscriber), registers its interests
with a server (also known as broker).
The client producing data (known as publisher) sends the data to a
server and this server forwards the updated data to the subscriber

Pervasive Computing by Dr. M.Taha


Application Layer Protocols for IoT
For WSN networks to transfer data from a gateway to clients can use
publish-subscribe architecture:
client that needs data (known as subscriber), registers its interests
with a server (also known as broker).
The client producing data (known as publisher) sends the data to a
server and this server forwards the updated data to the subscriber

Server

Publisher
(Client)

Subscriber
(Client)
Pervasive Computing by Dr. M.Taha
Application Layer Protocols for IoT
One of the major advantage of this publish-subscribe architecture is
decoupling of the clients needing data (i.e. Subscriber) and the clients
sending data, i.e., sensor nodes (publisher) need not know the
identities of clients that are interested in their data and on the other
hand, clients does not need to know the identities of sensor nodes
generating the sensor data.
This decoupling enables the architecture to be highly scalable.

Pervasive Computing by Dr. M.Taha


Application Layer Protocols for IoT
Message Queue Telemetry Transport (MQTT)
Message Queue Telemetry Transport (MQTT) was released by IBM in 1999
and targets lightweight M2M communications.
It is an asynchronous publish/subscribe protocol that runs on top of TCP.
Similar to HTTP, MQTT also relies on TCP/IP but comparing the overhead
with HTTP and others, MQTT have a lower protocol overhead
In MQTT there is a broker (server) that contains topics. Each client can be
a publisher that sends information to the broker at a specific topic or/and
a subscriber that receives automatic messages every time there is a new
update in a topic he is subscribed.
Designed to use bandwidth and battery efficiently
Currently used by Facebook Messenger

Pervasive Computing by Dr. M.Taha


Application Layer Protocols for IoT
Message Queue Telemetry Transport (MQTT)
A topic-based publish-subscribe architecture, defines that when a client
publishes a message M to a particular topic T , then all the clients
subscribed to the topic T will receive the message M.
MQTT-based brokers support many thousands of concurrent device connections

Pervasive Computing by Dr. M.Taha


Application Layer Protocols for IoT
Message Queue Telemetry Transport (MQTT)
The reliability of messages in MQTT is taken care by three Quality of
Service (QoS) levels.
QoS level 0 means that a message is delivered at most once and no
acknowledgement of reception is required.
QoS level 1 means that every message is delivered at least once and
confirmation of message reception is required.
QoS Level 2, a four-way handshake mechanism is used for the delivery of a
message exactly once
This reliability is suited for large companies who depend on messaging to
integrate applications and move data around their organisation.
Therefore a good choice for building large scale, reliable or clustered
messaging infrastructures

Pervasive Computing by Dr. M.Taha


Application Layer Protocols for IoT
Message Queue Telemetry Transport (MQTT)
To ensure security, MQTT brokers may require username/password
authentication which is handled by TLS/SSL (Secure Sockets Layer), i.e., the
same security protocols that ensure privacy for HTTP transactions all over
the Internet.

Pervasive Computing by Dr. M.Taha


Application Layer Protocols for IoT
Message Queue Telemetry Transport (MQTT)
MQTT vs HTTP - Power Profiling

average of 1 message per 10 minute


Pervasive Computing by Dr. M.Taha
http://stephendnicholas.com/posts/power-profiling-mqtt-vs-https

Potrebbero piacerti anche