0% found this document useful (0 votes)
5 views36 pages

Data Protocols - 250813 - 112557

Uploaded by

hbinmaqsood
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)
5 views36 pages

Data Protocols - 250813 - 112557

Uploaded by

hbinmaqsood
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/ 36

Functionality-based IoT Protocol

Organization

✓ Connectivity (6LowPAN, RPL)


✓ Identification (EPC, uCode, IPv6, URIs)
✓ Communication / Transport (WiFi, Bluetooth, LPWAN)
✓ Discovery (Physical Web, mDNS, DNS‐SD)
✓ Data Protocols (MQTT, CoAP, AMQP, Websocket, Node)
✓ Device Management (TR‐069, OMA‐DM)
✓ Semantic (JSON‐LD, Web Thing Model)
✓ Multi‐layer Frameworks (Alljoyn, IoTivity, Weave, Homekit)

Source: Internet of Things Protocols (Online)

Introduction to Internet of Things 2


Message Queue Telemetry
Transport (MQTT)

Introduction to Internet of Things 3


Introduction
✓ Message Queue Telemetry Transport.
✓ ISO standard (ISO/IEC PRF 20922).
✓ It is a publish‐subscribe‐based lightweight messaging protocol for
use in conjunction with the TCP/IP protocol.
✓ MQTT was introduced by IBM in 1999 and standardized by OASIS in
2013.
✓ Designed to provide connectivity (mostly embedded) between
applications and middle‐wares on one side and networks and
communications on the other side.

Source: “MQTT”, Wikipedia (Online)

Introduction to Internet of Things 4


✓ A message broker controls the publish‐subscribe messaging
pattern.
✓ A topic to which a client is subscribed is updated in the form
of messages and distributed by the message broker.
✓ Designed for:
▪ Remote connections
▪ Limited bandwidth
▪ Small‐code footprint

Source: “MQTT”, Wikipedia (Online)

Introduction to Internet of Things 5


MQTT Components

Publishers • Lightweight sensors

Subscribers • Applications interested in sensor data

Brokers • Connect publishers and subscribers


• Classify sensor data into topics

Source: “MQTT”, Wikipedia (Online)

Introduction to Internet of Things 6


MQTT Methods

Connect
Disconnect
Subscribe
Unsubscribe
Publish

Source: “MQTT”, Wikipedia (Online)

Introduction to Internet of Things 7


Communication
✓ The protocol uses a publish/subscribe architecture (HTTP uses a
request/response paradigm).
✓ Publish/subscribe is event‐driven and enables messages to be
pushed to clients.
✓ The central communication point is the MQTT broker, which is in
charge of dispatching all messages between the senders and the
rightful receivers.
✓ Each client that publishes a message to the broker, includes a topic
into the message. The topic is the routing information for the
broker.

Source: “MQTT 101 – How to Get Started with the lightweight IoT Protocol”, HiveMQ (Online)

Introduction to Internet of Things 9


✓ Each client that wants to receive messages subscribes to a
certain topic and the broker delivers all messages with the
matching topic to the client.
✓ Therefore the clients don’t have to know each other. They
only communicate over the topic.
✓ This architecture enables highly scalable solutions without
dependencies between the data producers and the data
consumers.

Source: “MQTT 101 – How to Get Started with the lightweight IoT Protocol”, HiveMQ (Online)

Introduction to Internet of Things 10


MQTTTopics
✓ A topic is a simple string that can have more hierarchy levels,
which are separated by a slash.
✓ A sample topic for sending temperature data of the living
room could be house/living‐room/temperature.
✓ On one hand the client (e.g. mobile device) can subscribe to
the exact topic or on the other hand, it can use a wildcard.

Source: “MQTT 101 – How to Get Started with the lightweight IoT Protocol”, HiveMQ (Online)

Introduction to Internet of Things 11


Applications
✓ Facebook Messenger uses MQTT for online chat.
✓ Amazon Web Services use Amazon IoT with MQTT.
✓ Microsoft Azure IoT Hub uses MQTT as its main protocol for
telemetry messages.
✓ The EVRYTHNG IoT platform uses MQTT as an M2M protocol
for millions of connected products.
✓ Adafruit launched a free MQTT cloud service for IoT
experimenters called Adafruit IO.

Introduction to Internet of Things 13


SMQTT
✓ Secure MQTT is an extension of MQTT which uses encryption
based on lightweight attribute based encryption.
✓ The main advantage of using such encryption is the broadcast
encryption feature, in which one message is encrypted and
delivered to multiple other nodes, which is quite common in
IoT applications.
✓ In general, the algorithm consists of four main stages: setup,
encryption, publish and decryption.

Source: M. Singh, M. Rajan, V. Shivraj, and P.Balamuralidhar, "Secure MQTT for Internet of Things (IoT)," in Fifth International Conference on
Communication Systems and Network Technologies (CSNT 2015), April 2015, pp. 746‐751

Introduction to Internet of Things 14


✓ In the setup phase, the subscribers and publishers register
themselves to the broker and get a master secret key according to
their developer’s choice of key generation algorithm.
✓ When the data is published, it is encrypted and published by the
broker which sends it to the subscribers, which is finally decrypted
at the subscriber end having the same master secret key.
✓ The key generation and encryption algorithms are not standardized.
✓ SMQTT is proposed only to enhance MQTT security features.

Source: M. Singh, M. Rajan, V. Shivraj, and P.Balamuralidhar, "Secure MQTT for Internet of Things (IoT)," in Fifth International Conference on
Communication Systems and Network Technologies (CSNT 2015), April 2015, pp. 746‐751

Introduction to Internet of Things 15


Constrained Application
Protocol (CoAP)

Introduction to Internet of Things

2
Introduction
✓ CoAP – Constrained Application Protocol.
✓ Web transfer protocol for use with constrained nodes and
networks.
✓ Designed for Machine to Machine (M2M) applications such
as smart energy and building automation.
✓ Based on Request‐Response model between end‐points
✓ Client‐Server interaction is asynchronous over a datagram
oriented transport protocol such as UDP

Source: Z. Shelby , K. Hartke, C. Bormann, “The Constrained Application Protocol (CoAP)”, Internet Engineering Task Force (IETF), Standards Track,
2014

Introduction to Internet of Things


✓ Built over UDP, instead of TCP (which is commonly used with HTTP) and
has a light mechanism to provide reliability.
✓ CoAP architecture is divided into two main sub‐layers:
▪ Messaging
▪ Request/response.
✓ The messaging sub‐layer is responsible for reliability and duplication of
messages, while the request/response sub‐layer is responsible for
communication.
✓ CoAP has four messaging modes:
▪ Confirmable
▪ Non‐confirmable
▪ Piggyback
▪ Separate

Source: V. Karagiannis, P. Chatzimisios, F. Vazquez‐Gallego, and J. Alonso‐Zarate, "A survey on application layer protocols for the internet of
things," Transaction on IoT and Cloud Computing, vol. 3, no. 1, pp. 11‐17, 2015

Introduction to Internet of Things 5


CoAP Position

Application

Request
CoAP
Messages

UDP

Source: Z. Shelby , K. Hartke, C. Bormann, “The Constrained Application Protocol (CoAP)”, Internet Engineering Task Force (IETF), Standards Track,
2014

Introduction to Internet of Things


CoAP Message Types

Message Types‐CoAP
Confirmable

Non‐Confirmable

Piggyback

Separate

Source: Z. Shelby , K. Hartke, C. Bormann, “The Constrained Application Protocol (CoAP)”, Internet Engineering Task Force (IETF), Standards Track,
2014

Introduction to Internet of Things


Features
✓ Reduced overheads and parsing complexity.
✓ URL and content‐type support.
✓ Support for the discovery of resources provided by known
CoAP services.
✓ Simple subscription for a resource, and resulting push
notifications.
✓ Simple caching based on maximum message age.
Source: ”Constrained Application Protocol”, Wikipedia (Online)

Introduction to Internet of Things 11


Extensible Messaging
and Presence Protocol
(XMPP)

Introduction to Internet of Things 12


Introduction
✓ XMPP – Extensible Messaging and Presence Protocol.
✓ A communication protocol for message‐oriented middleware
based on XML (Extensible Markup Language).
✓ Real‐time exchange of structured data.
✓ It is an open standard protocol.

Source: “XMPP”, Wikipedia (Online)

Introduction to Internet of Things 13


✓ XMPP uses a client‐server architecture.
✓ As the model is decentralized, no central server is required.
✓ XMPP provides for the discovery of services residing locally or
across a network, and the availability information of these
services.
✓ Well‐suited for cloud computing where virtual machines,
networks, and firewalls would otherwise present obstacles to
alternative service discovery and presence‐based solutions.
✓ Open means to support machine‐to‐machine or peer‐to‐peer
communications across a diverse set of networks.

Source: “XMPP”, Wikipedia (Online)

Introduction to Internet of Things 14


Highlights
✓ Decentralization – No central server; anyone can run their
own XMPP server.
✓ Open standards – No royalties or granted permissions are
required to implement these specifications
✓ Security – Authentication, encryption, etc.
✓ Flexibility – Supports interoperability

Source: “XMPP”, Wikipedia (Online)

Introduction to Internet of Things 15


Core XMPP Technologies
Core
• information about the core XMPP technologies for XML streaming
Jingle
• multimedia signalling for voice, video, file transfer
Multi‐user Chat
• flexible, multi‐party communication
PubSub
• alerts and notifications for data syndication
BOSH
• HTTP binding for XMPP

Source: “XMPP: Technology Overview”, XMPP.org (Online)

Introduction to Internet of Things 17


Weaknesses
✓ Does not support QoS.
✓ Text based communications induces higher network
overheads.
✓ Binary data must be first encoded to base64 before
transmission.

Introduction to Internet of Things 18


Applications
✓ Publish‐subscribe systems
✓ Signaling for VoIP
✓ Video
✓ File transfer
✓ Gaming
✓ Internet of Things applications
▪ Smart grid
▪ Social networking services

Introduction to Internet of Things 19


Advanced Message Queuing
Protocol (AMQP)

Introduction to Internet of Things 2


Introduction
✓ Advanced Message Queuing Protocol.
✓ Open standard for passing business messages between
applications or organizations.
✓ Connects between systems and business processes.
✓ It is a binary application layer protocol.
✓ Basic unit of data is a frame.
✓ ISO standard: ISO/IEC 19464

Source: “Advanced Message Queuing Protocol”, Wikipedia (Online)

Introduction to Internet of Things 3


Source: “The‐amqp‐model‐for‐wikipedia.svg”, Wikimedia Commons (Online)

Introduction to Internet of Things 4


AMQP Features

Organizations Technologies Time Space

Connects across

Introduction to Internet of Things 5


Features
Security
Reliability
Interoperability
Routing
Queuing

Open standard

Introduction to Internet of Things 6


Message Delivery Guarantees
✓ At‐most‐once
▪ each message is delivered once or never
✓ At‐least‐once
▪ each message is certain to be delivered, but may do so multiple times
✓ Exactly‐once
▪ message will always certainly arrive and do so only once

Reference: "OASIS AMQP version 1.0, sections 2.6.12‐2.6.13". OASIS AMQP Technical Committee

Introduction to Internet of Things 7


AMQP Frame Types
✓ Nine AMQP frame types are defined that are used to initiate, control and
tear down the transfer of messages between two peers:
▪ Open (connection open)
▪ Begin (session open)
▪ Attach (initiate new link)
▪ Transfer (for sending actual messages)
▪ Flow (controls message flow rate)
▪ Disposition (Informs the changes in state of transfer)
▪ Detach (terminate the link)
▪ End (session close)
▪ Close (connection close)

Source: O.S. Tezer, “An advanced messaging queuing protocol walkthrough ”, DigitalOcean (Online), 2013

Introduction to Internet of Things 8


Components
Exchange • Part of Broker
• Receives messages and routes them to Queues

Queue • Separate queues for separate business processes


• Consumers receive messages from queues

Bindings • Rules for distributing messages (who can access


what message, destination of the message)

Source: O.S. Tezer, “An advanced messaging queuing protocol walkthrough ”, DigitalOcean (Online), 2013

Introduction to Internet of Things 9


AMQP Exchanges
Direct
Fan‐out
Topic
Header

Source: O.S. Tezer, “An advanced messaging queuing protocol walkthrough ”, DigitalOcean (Online), 2013

Introduction to Internet of Things 10


AMQP Features
✓ Targeted QoS (Selectively offering QoS to links)
✓ Persistence (Message delivery guarantees)
✓ Delivery of messages to multiple consumers
✓ Possibility of ensuring multiple consumption
✓ Possibility of preventing multiple consumption
✓ High speed protocol
Source: O.S. Tezer, “An advanced messaging queuing protocol walkthrough ”, DigitalOcean (Online), 2013

Introduction to Internet of Things 11


Applications
✓ Monitoring and global update sharing.
✓ Connecting different systems and processes to talk to each other.
✓ Allowing servers to respond to immediate requests quickly and
delegate time consuming tasks for later processing.
✓ Distributing a message to multiple recipients for consumption.
✓ Enabling offline clients to fetch data at a later time.
✓ Introducing fully asynchronous functionality for systems.
✓ Increasing reliability and uptime of application deployments.

Source: O.S. Tezer, “An advanced messaging queuing protocol walkthrough ”, DigitalOcean (Online), 2013

Introduction to Internet of Things 12

You might also like