Extensible Messaging and Presence Protocol
From Wikipedia, the free encyclopedia
The five layer TCP/IP model |
5. Application layer |
DHCP • DNS • FTP • HTTP • IMAP4 • IRC • NNTP • XMPP • MIME • POP3 • SIP • SMTP • SNMP • SSH • TELNET • BGP • RPC • RTP • RTCP • TLS/SSL • SDP • SOAP • L2TP • PPTP • … |
4. Transport layer |
3. Network layer |
2. Data link layer |
ATM • DTM • Ethernet • FDDI • Frame Relay • GPRS • PPP • ARP • RARP • … |
1. Physical layer |
Ethernet physical layer • ISDN • Modems • PLC • SONET/SDH • G.709 • Wi-Fi • … |
Extensible Messaging and Presence Protocol, or XMPP, is an open, XML-based protocol for near-real-time, extensible instant messaging and presence information. It is the core protocol of the Jabber Instant Messaging and Presence technology which is currently deployed on thousands of Jabber servers across the Internet and is used by millions of people worldwide.
The Internet Engineering Task Force (IETF) formed an XMPP Working Group in 2002 to formalize the core Jabber protocols as an IETF Instant Messaging and presence technology. The four specifications produced by the XMPP WG were approved by the IESG as Proposed Standards in 2004. RFC 3920 and RFC 3921 are currently undergoing revisions in preparation for advancing them to Draft Standard within the Internet Standards Process. The Jabber Software Foundation is active in proposing and publishing standard XMPP extensions.
Contents |
[edit] Specifications
The IETF XMPP working group has produced a number of RFC protocol documents:
- RFC 3920, Extensible Messaging and Presence Protocol (XMPP): Core which describes client-server messaging using two open ended XML streams. XML streams consist of <presence/>, <message/> and <iq/> (info/query) as illustrated in the example client-server conversation. A connection is authenticated with Simple Authentication and Security Layer (SASL) and encrypted with Transport Layer Security (TLS).
- RFC 3921, Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence describes instant messaging (IM), the most common application of XMPP.
- RFC 3922, Mapping the Extensible Messaging and Presence Protocol (XMPP) to Common Presence and Instant Messaging (CPIM) relates XMPP and the Common Presence and Instant Messaging (CPIM) specifications.
- RFC 3923, End-to-End Signing and Object Encryption for the Extensible Messaging and Presence Protocol (XMPP) describes end to end encryption of XMPP messages using S/MIME. Conflicting this proposal, many clients currently use GPG for encrypting messages (see XEP-0027).
The Jabber Software Foundation (JSF) develops and publishes extensions to XMPP through a standards process centered around XMPP Extension Protocols[1] (XEPs, previously known as Jabber Enhancement Proposals - JEPs). The following extensions are in especially wide use:
- XEP-0004: Data Forms
- XEP-0030: Service Discovery
- XEP-0045: Multi-User Chat
- XEP-0071: XHTML-IM
- XEP-0096: File Transfer
- XEP-0115: Entity Capabilities
- XEP-0124: HTTP Binding
XMPP is also currently being extended to handle signalling / negotiation for Voice over internet protocol (VoIP) and other media sessions. This signalling protocol is called Jingle. Jingle is designed to be consistent with the Google Talk service and interoperable with the Session Initiation Protocol.
[edit] Implementations
- XMPP is implemented by a large number of Jabber/XMPP clients, servers, and code libraries
- Google Talk, Google's instant messaging product, uses an implementation of the protocol.
- The Gizmo Project, primarily a Voice over IP system using Session Initiation Protocol (SIP), uses XMPP as its instant messaging protocol and can interoperate with Google Talk for text.
- The open source peer-to-peer WiredReach Universal Content Sharing System, an example of social networking software, depends upon XMPP.
[edit] Example client-server conversation using the XMPP protocol
A client (Alice) connects to Jabber server (example.org on TCP port 5222), sends a message (Subject: "Hello!" and Body: "Can't wait to see you tomorrow.") to another client (Bob) and logs out.
Alice (client):
<?xml version="1.0"?> <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="example.org">
example.org (server):
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' from='example.org' id='1461777714'>
Alice:
<iq type="set" id="auth_2" to="example.org" > <query xmlns="jabber:iq:auth"> <username>alice</username> <password>password</password> <resource>Work</resource> </query> </iq>
example.org:
<iq from="example.org" id='auth_2' type='result'/>
NOTE: The foregoing authentication example shows the old Non-SASL Authentication process originally defined in the Jabber open-source project and currently documented in XEP-0078. XMPP as formalized within the IETF uses Simple Authentication and Security Layer instead.
Alice:
<message to="bob@example.com" > <subject>Hello!</subject> <body>Can't wait to see you tomorrow.</body> </message> <presence type="unavailable" > <status>Logged out</status> </presence> </stream:stream>
example.org:
</stream:stream>