This is an old revision of this page, as edited by Rich Farmbrough (talk | contribs) at 08:50, 16 November 2009 (delinking ISO style dates using AWB). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Revision as of 08:50, 16 November 2009 by Rich Farmbrough (talk | contribs) (delinking ISO style dates using AWB)(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)Extensible Messaging and Presence Protocol (XMPP) (formerly named Jabber) is an open, XML-based protocol originally aimed at near-real-time, extensible instant messaging (IM) and presence information (e.g., buddy lists), but now expanded into the broader realm of message oriented middleware. It was developed by the Jabber open-source community in 1999. Built to be extensible, the protocol has been extended with features such as Voice over Internet Protocol and file transfer signaling.
Unlike most instant messaging protocols, XMPP is an open standard. Like e-mail, it is an open system where anyone who has a domain name and a suitable Internet connection can run their own XMPP server and talk to users on other servers. The standard server implementations and many clients are also free and open source software.
The Internet Engineering Task Force (IETF) formed an XMPP Working Group in 2002 to formalize the core protocols as an IETF instant messaging and presence technology. The XMPP WG produced four specifications which were approved by the IESG as Proposed Standards in 2004. RFC 3920 and RFC 3921 are now undergoing revisions in preparation for advancing them to Draft Standard within the Internet Standards Process. The XMPP Standards Foundation (formerly the Jabber Software Foundation) is active in developing open XMPP extensions.
XMPP-based software is deployed on thousands of servers across the Internet and by 2003 was used by over ten million people worldwide, according to the XMPP Standards Foundation.
Google Wave's federation protocol is an open extension to the XMPP protocol.
Internet protocol suite |
---|
Application layer |
Transport layer |
Internet layer |
Link layer |
History
Jeremie Miller began the Jabber project in 1998. Its first major public release occurred in May 2000. The project's main software was jabberd, a XMPP server. Its main product was the XMPP protocol.
This early Jabber protocol formed the basis for XMPP, published as RFC 3920. It has often been regarded as a competitor to SIMPLE, based on the Session Initiation Protocol (SIP) protocol, as the standard protocol for instant messaging and presence notification.
The first IM service based on XMPP was Jabber.org, which was run by a small group of volunteers. Jabber.org has operated since 1999. The first users of XMPP could sign up for a free account.
In August 2005, Google introduced Google Talk, a combination VoIP and IM system which uses XMPP for its instant messaging function and as a base for its voice and file transfer signalling protocol. The initial launch did not include server-to-server communications, but since January 17, 2006, server-to-server communications is enabled.
Strengths
- Decentralization: The architecture of the XMPP network is similar to email; anyone can run their own XMPP server and there is no central master server.
- Open standards: The Internet Engineering Task Force has formalized XMPP as an approved instant messaging and presence technology under the name of XMPP, and the XMPP specifications have been published as RFC 3920 and RFC 3921. No royalties are required to implement support of these specifications and their development is not tied to a single vendor.
- History: XMPP technologies have been in use since 1998. Multiple implementations of the XMPP standards exist for clients, servers, components, and code libraries, with the backing of large companies such as Sun Microsystems and Google.
- Security: XMPP servers may be isolated from the public XMPP network (e.g., on a company intranet), and robust security (via SASL and TLS) has been built into the core XMPP specifications. To encourage use of channel encryption, the XMPP Standards Foundation also runs an intermediate certification authority at xmpp.net offering free digital certificates to XMPP server administrators under the auspices of the StartCom Certification Authority (which is the root CA for the intermediate CA).
- Flexibility: Custom functionality can be built on top of XMPP; to maintain interoperability, common extensions are managed by the XMPP Software Foundation. XMPP applications beyond IM include network management, content syndication, collaboration tools, file sharing, gaming, and remote systems monitoring.
Weaknesses
- Presence data overhead: With typically over 70% of XMPP inter-server traffic being presence data and close to 60% of it being redundantly transmitted, XMPP currently has a large overhead in delivering presence data to multiple recipients. New protocols are being researched to alleviate this problem.
- In-band binary data transfer is inefficient: Because XMPP is encoded as a single long XML document, binary data must be first base64 encoded before it can be transmitted in-band. Therefore any significant amount of binary data (e.g., file transfers) is best transmitted out-of-band, using in-band messages to coordinate. The best example of this is the Jingle XMPP Extension Protocol, XEP-0166.
Decentralization and addressing
The XMPP network is server-based (i.e. clients do not talk directly to one another) but decentralized: by design there is no central authoritative server, as there is with services such as AOL Instant Messenger or MSN Messenger. Some confusion often arises on this point as there is a public XMPP server being run at "gmail.com", to which a large number of users subscribe. However, anyone may run their own XMPP server on their own domain. The standard TCP port for XMPP is 5222.
Every user on the network has a unique Jabber ID (usually abbreviated as JID). To avoid the need for a central server with a list of IDs, the JID is structured like an e-mail address with a username and a DNS address for the server where that user resides separated by an at sign (@), such as username@domain.com.
Since a user may wish to log in from multiple locations, the clients specify a further string known as a resource, which identifies which of the user's clients it is (for example home, work and mobile). This may then be included in the JID by adding a forward slash followed by the name of the resource. Each resource may have specified a numerical value called priority. For example, the full JID of a user's mobile account would be username@domain.com/mobile. Messages that are simply sent to username@domain.com will go to the client with highest priority, but those sent to username@domain.com/mobile will only go to the mobile client.
JIDs without a username part are also valid and may be used (with or without a resource part) for system messages and control of special features on the server.
Message delivery scenario
Suppose juliet@capulet.com wants to chat with romeo@montague.net. Juliet and Romeo each respectively have accounts on the capulet.com and montague.net servers. When Juliet types in and sends her message, a sequence of events is set in motion:
- Juliet's client sends her message to the capulet.com server
- If montague.net is blocked on capulet.com, the message is dropped.
- The capulet.com server opens a connection to the montague.net server.
- If capulet.com is blocked on montague.net, the message is dropped.
- If Romeo is not currently connected, the message is stored for later delivery.
- The montague.net server delivers the message to Romeo.
Juliet | → | capulet.com | → | montague.net | → | Romeo |
Connecting to other protocols
Another useful feature of the XMPP system is that of transports, also known as gateways, which allow users to access networks using other protocols. This can be other instant messaging protocols, but also protocols such as SMS or E-mail. Unlike multi-protocol clients, XMPP provides this access at the server level by communicating via special gateway services running on a remote computer. Any user can "register" with one of these gateways by providing the information needed to log on to that network, and can then communicate with users of that network as though they were XMPP users. This means that any client which fully supports XMPP can be used to access any network for which a gateway exists, without the need for any extra code in the client and without the need for the client to have direct access to the Internet. This may violate terms of service on the protocol used; however, such terms of service are not legally enforceable in several countries.
XMPP via HTTP transport
Another aspect of XMPP is the HTTP binding for users behind restricted firewalls. In the original specification, XMPP could use HTTP in two ways: polling and binding.. The polling method, now deprecated, essentially implies messages stored on a server-side database are being fetched (and posted) regularly by an XMPP client by way of HTTP 'GET' and 'POST' requests. With HTTP binding, the client uses longer-lived HTTP connections to receive messages as soon as they are sent. This push model of notification is more efficient than polling, where many of the polls return no new data.
Because the client uses HTTP, most firewalls allow clients to fetch and post messages without any hindrances. Thus, in scenarios where the TCP port used by XMPP is blocked, a server can listen on the normal HTTP port and the traffic should pass without problems. There also are various websites which allow people to sign in to XMPP via their browser. Furthermore, there are open public servers, that listen on standard http (port 80) and https (port 443) ports and hence allow connections from behind most firewalls.
Implementations
Main article: List of XMPP client softwareXMPP is implemented by a large number of XMPP clients, servers, and code libraries. The main article contains a list of several XMPP clients for multiple platforms.
Development
The IETF XMPP working group has produced a number of RFC protocol documents: RFC 3920, RFC 3921, RFC 3922, RFC 3923, RFC 4622, RFC 4854, RFC 4979
- 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). 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.
The XMPP Standards Foundation (XSF) develops and publishes extensions to XMPP through a standards process centered on XMPP Extension Protocols (XEPs, previously known as Jabber Enhancement Proposals - JEPs). The following extensions are in especially wide use:
- Data Forms
- Service Discovery
- Multi-User Chat
- XHTML-IM
- File Transfer
- Entity Capabilities
- HTTP Binding
- Personal Eventing Protocol
XMPP is currently being extended to handle signaling / negotiation for Voice over Internet Protocol (VoIP) and other media sessions. This signaling protocol is called Jingle. Jingle is designed to be consistent with the Google Talk service and bridgeable with the Session Initiation Protocol.
See also
- Comparison of instant messaging clients
- Comparison of instant messaging protocols
- List of XMPP client software
- List of XMPP programming libraries
- List of XMPP server software
- Secure communication
- SIMPLE
References
- Jabber Inc. - About Us
- Johansson, Leif (18 April 2005), "XMPP as MOM" (PDF), Greater NOrdic MIddleware Symposium (GNOMIS), Oslo: University of Stockholm
- "Jabber Instant Messaging User Base Surpasses ICQ" (Press release). XMPP Standards Foundation. 22 September 2003. Retrieved 30 November 2007.
- "Google Wave Federation Protocol". Google.
- Jabber Software Foundation Renamed to XMPP Standards Foundation January 16, 2007 - jabber.org is still maintained (March 2008)
- Chatting Up the Chef Linux Journal March 1, 2003 by Marcel Gagné
- Burd, Gary (17 January 2006). "XMPP Federation". Retrieved 30 November 2007.
- [Standards-JIG] Distribution of stanza types
- [Standards-JIG] proto-JEP: Smart Presence Distribution
- JabberLive! (2007-03-09) Can I use Jabber when I'm behind a firewall?
- XEP-0025: Jabber HTTP Polling
- ^ XEP-0124: Bidirectional-streams Over Synchronous HTTP (BOSH)
- XEP-0027: Current Jabber OpenPGP Usage
- 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-0163: Personal Eventing Protocol
External links
- XMPP Standards Foundation
- Jabber User Guide - End user introduction to XMPP (archive)
- IETF Publishes XMPP RFCs
- XMPP Case Studies
- IM Protocol Wiki
- Podcast: FLOSS 49: XMPP Peter Saint-Andre interviewed by Randal Schwartz and Leo Laporte