Extensible Messaging and Presence Protocol Details
Size: 183.17 KB
Language: en
Added: Sep 05, 2015
Slides: 9 pages
Slide Content
XMPP Protocol
The Extensible Messaging and Presence Protocol
Tehran Linux User Group
Hamidreza Soleimani
September 01, 2014
What is it
It is
- eXtensible
- Messaging & Presence
- Protocol
It is not
- Binary Protocol
- General Purpose
- Server or Daemon
And also
- Open Protocol
- Application Layer
- XML Based
- Asynchronous
- Long Lived Connection
History
1998Jabber Protocol Was Invented
By Jeremie Miller to scratch his itch
1999First Release of JabberD
2000Open-Source Community and Jabber
Many open-source clients were developed
Its Java and Perl library were developed
Details of its wire protocol was documented
JabberD version 1.0 was released
2004IETF and Jabber
XMPP Protocol published [RFC 3290-1]
2005Google and XMPP
GTalk launched over XMPP
2008Cisco and XMPP
Jabber Inc. was acquired by Cisco Co.
2010Facebook and XMPP
Facebook opened up XMPP interface for its chat
2011Modified XMPP by IETF
[RFC 6120-1]
Primitives
XMPP
Server
XMPP
Client
X
M
L
XMPP
Client
X
M
L
m
e
@
t
e
h
lu
g
.
im
/
p
id
g
in
X
M
L
X
M
L
y
o
u
@
t
e
h
lu
g
.
im
/
p
s
i
t
e
h
lu
g
.
im
<presence
from=”[email protected]/pidgin”
to=”tehlug.im”/>
<iq type=”get”>
<query xmlns=”jabber:iq:roster”/>
</iq>
<message
from=”[email protected]/pidgin”
to=”[email protected]”>
<body>Hello dude!</body>
</message>
[ ... ]
<presence
from=”[email protected]/pidgin”
to=”tehlug.im”
type=”unavailable”/>
X
M
L
S
t
r
e
a
m S
t
a
n
z
a
Usage
Group Chat
VOIP
Whats app
Gtalk
Nimbuzz
Instant
Messaging
GamingChesspark Collaboration
VM
Management
ArchipelGeo-location
Cisco WebEx
Vehicle
Tracking
vs. HTTP
XMPP
Server
XMPP
Server
XMPP
Client
XMPP
Client
HTTP
Server
HTTP
Server
HTTP
Client
HTTP
Client
XMPP
Asynchronous
Federated
Limited Purpose
HTTP
Synchronous
Unfederated
General Purpose
vs.
Transports
TCP
Transmission Control
Protocol
BOSH
Bidirectional stream Over
Synchronous HTTP
WebSocket
Long Lived Connection
Over HTTP
C
lie
n
t
(
P
id
g
in
/
W
h
a
t
s
A
p
p
) S
e
r
v
e
r
(
E
ja
b
b
e
r
d
,
T
ig
a
s
e
)
Open TCP Connection
Open XML Stream
Preferably Negotiate TLS
Authenticate by SASL
Exchange XML Packets
Close XML Stream
Close TCP Connection
C
lie
n
t
(
F
ir
e
f
o
x
/
C
h
r
o
m
e
)
S
e
r
v
e
r
(
E
ja
b
b
e
r
d
, T
ig
a
s
e
)
Open by HTTP Request
Send XML Stanza
... Keep Alive ...
Get XML Stanza
C
lie
n
t
(
F
ir
e
f
o
x
/
C
h
r
o
m
e
)
S
e
r
v
e
r
(
E
ja
b
b
e
r
d
,
T
ig
a
s
e
)
Open by HTTP Request
Upgrade to WebSocket
WebSocket Handshake
Open XML Stream
Exchange XML Frames
Close XML Stream
Close WS Connection
... Keep Alive ...
Send XML Stanza
... Keep Alive ...
D
I
R
E
C
T
P
2
P
Offer session & parameters
Initiator ResponderXMPP Server
- Application Type: RTP / Stub / ibb
- Media Codec: Speex / G.711 / H.264
- Transport Method:
- Streaming: ibb / S4b
- datagram: raw-UDP / ICE-UDP Accept session & parameters
TURN
Server
STUN
Server
TURN
Server
STUN
Server
N
A
T
Get/Send public IP:Port
Get/Send relay IP:Port
Get/Send relay IP:Port
Get/Send public IP:Port
S
T
U
N
P
2
P
T
U
R
N
R
E
L
A
Y
S
y
m
.
N
A
T
N
A
T
S
y
m
.
N
A
T
ICE Signaling Channel
Media Exchange Channel
XMPP Signaling Channel
STUN: Session Traversal Utilities for NAT
TURN: Traversal Using Relay around NAT
ICE: Interactive Communication Establishment
Jingle
Terminate session Terminate session