You are on page 1of 25

Pervasive Computing

Dr. Muhammad Taha Jilani

Lecture - 13
Recap

Pervasive Computing by Dr. M.Taha


Application Layer Protocols for IoT
Advanced Message Queuing Protocol (AMQP)
The businesses need to efficiently exchange info within and b/w
enterprises
A protocol that has ubiquitous capability and can exchange the data that
is directly addresses business requirements
business interactions without including technicalities
Developing a new standard is not enough also a commercial
implementation is not suitable
Open-source AMQ Protocol
Developed in 2003 by ISO/IEC 19464
It sets the foundation for innovation
Autonomous computing
Cloud portability (Mobile Cloud Computing)
Secure IoT
Pervasive Computing by Dr. M.Taha
Application Layer Protocols for IoT
Advanced Message Queuing Protocol (AMQP)
AMQP provides asynchronous publish/subscribe communication while
based on TCP
Similar to MQTT, but the difference is that the broker is divided into two
main components: exchange and queues

AMQP exchanges route


messages directly by topic

Restrict others to access


to queues

Pervasive Computing by Dr. M.Taha


Application Layer Protocols for IoT
Advanced Message Queuing Protocol (AMQP)
Its main advantage is its store-and-forward feature that ensures reliability
even after network disruptions.
Mostly used in financial applications
It ensures reliability with the following message-delivery guarantees
1. At most once: means that a message is sent once either if it is delivered or not.
2. At least once: means that a message will be definitely delivered one time, possibly
more.
3. Exactly once: means that a message will be delivered only one time.
Security is handled with the use of the TLS/SSL protocols over TCP.

Pervasive Computing by Dr. M.Taha


Application Layer Protocols for IoT
Advanced Message Queuing Protocol (AMQP)
Comparing with others:
has low success rate at low bandwidths, but it increases as bandwidth
increases
can send a larger amount of messages per second htan CoaP
an AMQP environment with 2,000 users spread across five continents can
process 300 million messages per day
JPMorgan which is an American banking and financial services company uses AMQP
to send 1 billion messages per day
One of the worlds largest biometric databases Indias Aadhar project, home to 1.2
billion identities
NASA uses it for Nebula Cloud Computing
Google uses it for complex event processing
a bit complex and diverse (as opposed to focused) than MQTT

Pervasive Computing by Dr. M.Taha


Application Layer Protocols for IoT
Extensible Messaging and Presence Protocol (XMPP)
Standardized by the IETF (RFC 3920) over a decade ago, designed for for
chatting and message exchanging.
Well-proven protocol that has been used widely all over the Internet
Unable to provide the required services for some of the new arising data applications
In 2014, Google stopped supporting the XMPP standard due to the lack of worldwide
support
Recently, it re-gained attention as an IoT protocol
XMPP runs over TCP and provides publish/subscribe (asynchronous) and
also request/response (synchronous) messaging systems.
It is designed for near real-time communications and thus, it supports
small message footprint and low latency message exchange

Pervasive Computing by Dr. M.Taha


Application Layer Protocols for IoT
Extensible Messaging and Presence Protocol (XMPP)
XMPP has TLS/SSL security built in the core of the specification. However,
it does not provide QoS options that make it impractical for M2M
communications.
Only the inherited mechanisms of TCP ensure reliability.
As the name explicitly states, XMPP uses XML messages (eXtensible
Markup Language) that create additional overhead due to unnecessary
tags and also require additional computational ability which increases
power consumption.

Pervasive Computing by Dr. M.Taha


Application Layer Protocols for IoT
MQTT-SN (Aensor Node)
Still not much well supported
Problem with MQTT
Based on TCP with more overheads
Long string name for topics (in hierarchical form),such as:
Karachi /universities/PAF-KIET/GSSE/CoCIS/Pervasive Computing
Draft released in 2013 particularly support for Constrained Devices/Sensors.
Few major changes
Support for UDP is included (also a serial link for non-IP with SLP can also be used)
MQTT-SN GW (gateway) is included between Server and Clients (actually it
interprets between MQTT server and MQTT-SN clients)
Topic names are replaced by two-byte long Topic IDs.
Pre-defined topic ids (to both Server/GW) and short topic names are also
introduced, for which no registration is required with Broker/Server.
Topic name to topic ID can be preconfigured in MQTT-SN gateway, so that even
registration message can be skipped before publish
Application Layer Protocols for IoT
MQTT-SN Architecture
MQTT-SN GW may or may not be integrated with a MQTT
server. In case of a stand-alone GW, it provides translation
between MQTT and MQTT-SN
MQTT-SN clients can also access a GW via a forwarder in
case the GW is not directly attached to their network.
(similar to Router in ZigBee network)

With Transparent GW, Server having a


MQTT connection for each connected
client.
An aggregating GW will have only one
MQTT connection to the server. All
message exchanges between a MQTT-SN
client and an aggregating GW end at the
GW.
Application Layer Protocols for IoT
MQTT-SN Architecture

MQTT-SN MQTT
Application Layer Protocols for IoT
Comparison
Application Layer Protocols for IoT
Two most popular protocols: CoAAP and MQTT
When to use CoAP and MQTT?
First of all, it will depend on application
In a system connected via cellular network where data is very
expensive, you might want to consider CoAP, because it can use UDP
which eliminates the overhead of TCP/IP, which is significant (both
MQTT and HTTP require TCP/IP).
Specially if you have 1000s of nodes, and are trying to keep the monthly
usage of each one under 5MB.

Pervasive Computing by Dr. M.Taha


Application Layer Protocols for IoT
Two most popular protocols: CoAAP and MQTT
When to use CoAP and MQTT?
MQTT protocol supports n:n messaging, b/w multiple clients and
broker
If the various machines need to talk to each other (M2M), then MQTT
would be a good choice.
CoAP is, primarily 1:1 protocol for transferring state information
between client and server
MQTT with publish/subscribe enable persistence, so useful for live
data that will be an event-based mode,
COAP with request/response has support for observing resources,
therefore best suited to a state transfer model, not purely event
based.

Pervasive Computing by Dr. M.Taha


Application Layer Protocols for IoT
IoT System: CoAP and MQTT

Pervasive Computing by Dr. M.Taha


USER INTERFACES

Pervasive Computing by Dr. M.Taha


User Interfaces for Ubiquitous
Computing
It represents the point of contact between a ubiquitous system and a
human, both in terms of input to the system and output from the system.
In conventional system, the most common interface is
Graphical user interface (GUI)
Keyboard Screen
Ouse Speaker
Is this can be applied to a
Microphone Ubicomp system?
Joystick/Gamepad

No, in a ubicomp system, there will be various aspects, from low-level


sensor technologies in the environment, through the collection,
management, and processing of context data through to the middleware
required to enable the composition of devices and services.

Pervasive Computing by Dr. M.Taha


User Interfaces for Ubiquitous
Computing
Graphical user interface (GUI)

Pervasive Computing by Dr. M.Taha


User Interfaces for Ubiquitous
Computing
Graphical user interface (GUI)
+ M2M

Pervasive Computing by Dr. M.Taha


User Interfaces for Ubiquitous
Computing
Weisers vision
weave itself into the fabric of our lives, until it is indistinguishable
from it
From GUI to Context Data develops the Ubicomp User
Interface (UUI)
Classes of UUI
Tangible User Interface
Surface User Interface
Ambient User Interface

Pervasive Computing by Dr. M.Taha


User Interfaces for Ubiquitous
Computing
Tangible User Interface
User engagement : Physical representation and control

Shacking MIT Media Lab


Mobile/Screen Tangible Media Group

Pervasive Computing by Dr. M.Taha


User Interfaces for Ubiquitous
Computing
Surface User Interface
User engagement : Physical interaction with screen

Microsoft surface detecting device and user touch

Pervasive Computing by Dr. M.Taha


User Interfaces for Ubiquitous
Computing
Ambient User Interface
User engagement : Ambient provides the information, using
display, sound, movement, smell, by constant feedback

Power-aware cord, visualize the Data fountain displaying relative Smart Umbrella
energy in use currency rates

Pervasive Computing by Dr. M.Taha


User Interfaces for Ubiquitous
Computing
Ambient User Interface
User engagement : Ambient provides the information, using
display, sound, movement, smell, by constant feedback

Ambient Orb

Other Projects:
Context-aware Visual Calendar, Ambient trolley, Information Art, CareNet, BusMobile, Daylight Display

Pervasive Computing by Dr. M.Taha


PC Course
Course Work Marks Distribution

Assignments 5
Quizzes 5
Mid Term Exam 30
Class Discussion 10
Project Presentation/Report 10
Final Term Exam 40 50% : Research Proj.
Total 100

Pervasive Computing by Dr. M.Taha

You might also like