0% found this document useful (0 votes)
22 views12 pages

XMPP

The document discusses the Extensible Messaging and Presence Protocol (XMPP), including where it fits in the Internet Protocol Suite, who uses it, its origins as Jabber, its basic architecture and messaging process, how entities are named in XMPP, and an example usage scenario.

Uploaded by

learningshubh26
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)
22 views12 pages

XMPP

The document discusses the Extensible Messaging and Presence Protocol (XMPP), including where it fits in the Internet Protocol Suite, who uses it, its origins as Jabber, its basic architecture and messaging process, how entities are named in XMPP, and an example usage scenario.

Uploaded by

learningshubh26
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/ 12

XMPP

(Extensible Messaging and Presence Protocol)

1
Where are
we?

We are here!
Internet Protocol Suite
HTTP, Websockets, DNS, Application layer
XMPP, MQTT, CoAp
TLS, SSL Application Layer (Encryption)
TCP, UDP Transport
IP(V4, V6), 6LowPAN Internet Layer
Ethernet, 802.11 WiFi, Link Layer
802.15.4

2
2
Who Uses XMPP?
• Note: Short Message Service (SMS) is based on cellular
connections. Here we are talking about instant
messaging over the internet.
• Cisco Webex
• WhatsApp uses a trimmed down version.
• WhatsApp is one-to-one chat plus multi-user chat plus presence
plus contact list management
• Google’s Firebase use XMPP Json and Google’s Android
• Adopted by Sensor Andrew
• So, what does a messaging system have in common with IoT?
• IoT is all about messaging
XMPP was originally named
Jabber

• Jabber is best known as “the Linux of instant messaging”.


Implemented by ejabberd in Erlang.

• It is an open, secure, ad-free alternative to consumer instant


messaging services like AIM, ICQ, MSN, and Yahoo.

• Under the hood, Jabber is a set of streaming XML protocols


and technologies that enable any two entities on the internet to
exchange messages, presence, and other structured
information in close to real time. (Jabber.org)
XMPP From
• In IM, the
IETF
central point of focus is a list of one's contacts or
"buddies" (in XMPP this list is called a "roster").

• Exchange relatively brief text messages with particular contacts in


close to real time The catalyst for exchanging messages is "presence" --
i.e., information about the network availability of particular contacts
(thus knowing who is online and available for a one-to-one chat session).

• Presence information is provided only to contacts that one has


authorized by means of an explicit agreement called a "presence
subscription".

• Thus at a high level XMPP needs to be able to complete the


following use cases:
– Manage items in one's contact list (list is maintained on the
server)
– Exchange messages with one's contacts
– Exchange presence information with one's contacts (send
communication status to the server)
– Manage presence subscriptions to and from one's contacts
SMTP
Architecture
XMPP
Architecture
XMPP Basic
1.
connection
Client initiates a TCP connection
2. Client sends presence information to the server
3. The client requests and receives its roster
4. The client interacts with roster members
5. The client disconnects

This is all done with standard XML messages using the


XMPP vocabulary and grammar.
Naming Things
• (1)
A lot like an email address, XMPP uses Jabber ID’s (JIDs)
• All of these JIDs could be logged on at the same time.

[email protected] Called a “bare JID”


[email protected]/mobile A full JID includes a
resource.
[email protected]/tablet A resource is used for
[email protected]/auto message delivery
Useful if logged in from
On Whatsapp: several devices
[email protected]
Naming Things
(2)
An Example (from
IBM)

The XML is being


Transferred in pieces.
The TCP connection
only closes at the end.

There are two


XML documents
involved.

Would this work


over websockets?
Sure. It involves a
bidirectional
conversation.
XMPP From the perspective
of the application
• Wedeveloper
do not want to work at the level of XML or JSON.
• We want middleware to provide support.
• Middleware separates concerns. It hides the details associated
with messaging.
• Details include marshalling and un-marshaling of parameters
and addressing.
• Details include generating the correct XMPP message to send.
• Details include reading and writing messages to the TCP layer.
• At the application programmer level, WE WANT NONE OF
THAT!
• Use middleware to hide all of that!

You might also like