XMPP

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Official logo

Extensible Messaging and Presence Protocol (XMPP) is a communications protocol for message-oriented middleware based on XML (Extensible Markup Language).[1] The protocol was originally named Jabber,[2] and was developed by the Jabber open-source community in 1999 for near real-time, instant messaging (IM), presence information, and contact list maintenance. Designed to be extensible, the protocol has also been used for publish-subscribe systems, signalling for VoIP, video, file transfer, gaming, Internet of Things applications such as the smart grid, and Social networking services.

Unlike most instant messaging protocols, XMPP is defined in an open standard and uses an open systems approach of development and application, by which anyone may implement an XMPP service and interoperate with other organizations' implementations. Because XMPP is an open protocol, implementations can be developed using any software license; although many server, client, and library implementations are distributed as free and open-source software, numerous freeware and commercial software implementations also exist.

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 Working group produced four specifications (RFC 3920, RFC 3921, RFC 3922, RFC 3923), which were approved as Proposed Standards in 2004. In 2011, RFC 3920 and RFC 3921 were superseded by RFC 6120 and RFC 6121 respectively, with RFC 6122 specifying the XMPP address format. In addition to these core protocols standardized at the IETF, the XMPP Standards Foundation (formerly the Jabber Software Foundation) is active in developing open XMPP extensions.

XMPP-based software is deployed widely across the Internet, and by 2003, was used by over ten million people worldwide, according to the XMPP Standards Foundation.[3]

Contents

[edit] History

Jeremie Miller began working on the Jabber technology in 1998 and released the first version of the jabberd server on January 4, 1999.[4] The early Jabber community focused on open-source software, mainly the jabberd server (e.g., version 1.0 in May 2000, version 1.2 in October 2000, and version 1.4 in February 2001), but its major outcome proved to be the development of the XMPP protocol.

The early Jabber protocol, as developed in 1999 and 2000, formed the basis for XMPP as published in RFC 3920 and RFC 3921 (the primary changes during formalization by the IETF's XMPP Working Group were the addition of TLS for channel encryption and SASL for authentication). Note that RFC 3920 and RFC 3921 have been superseded by RFC 6120 and RFC 6121, published in 2011.

The first IM service based on XMPP was Jabber.org, which has operated continuously since 1999 and has offered free accounts to users of XMPP.[5] From 1999 until February 2006, the service used jabberd as its server software, at which time it migrated to ejabberd (both of which are free software application servers). In January 2010, the service migrated to the proprietary M-Link server software produced by Isode Ltd.[6]

In August 2005, Google introduced Google Talk, a combination VoIP and IM system that uses XMPP for instant messaging and as a base for a voice and file transfer signaling protocol called Jingle. (The initial launch did not include server-to-server communications; Google enabled that feature on January 17, 2006).[7] Google has since added video functionality to Google Talk, also using the Jingle protocol for signaling.

In January 2008, AOL introduced experimental Extensible Messaging and Presence Protocol (XMPP) support for its AOL Instant Messenger (AIM) service,[8] allowing AIM users to communicate using the standardized, open-source XMPP. However, in March 2008, this service was discontinued.[citation needed] As of May 2011, AOL offers limited XMPP support.[9]

In September 2008, Cisco Systems acquired Jabber, Inc., the creators of the commercial product Jabber XCP.[10]

In February 2010, the social-networking site Facebook opened up its chat feature to third-party applications via XMPP.[11] The Facebook developers' site notes that Facebook Chat does not actually run an XMPP server internally, but merely presents an XMPP interface to clients; consequently, some server-side features like roster editing cannot be done via XMPP.[12]

Similarly, in December 2011, Microsoft released an XMPP interface to its Microsoft Messenger service.[13] Skype also provides limited XMPP support.[14] However, these are not native XMPP implementations.

[edit] 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 (the latest specifications are RFC 6120 and RFC 6121). 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 1999. Multiple implementations of the XMPP standards exist for clients, servers, components, and code libraries.
Security
XMPP servers can be isolated from the public XMPP network (e.g., on a company intranet), and strong security (via SASL and TLS) has been built into the core XMPP specifications.
Flexibility
Custom functionality can be built on top of XMPP; to maintain interoperability, common extensions are managed by the XMPP Standards Foundation. XMPP applications beyond IM include groupchat, network management, content syndication, collaboration tools, file sharing, gaming, remote systems control and monitoring, geolocation, middleware and cloud computing, VoIP and Identity services.

[edit] Weaknesses

In-band binary data transfer is inefficient
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.

[edit] Decentralization and addressing

The XMPP network uses a client–server architecture (clients do not talk directly to one another). However, it is decentralized—by design, there is no central authoritative server, as there is with services such as AOL Instant Messenger or Windows Live Messenger. Some confusion often arises on this point as there is a public XMPP server being run at jabber.org, to which a large number of users subscribe. However, anyone may run their own XMPP server on their own domain.

Every user on the network has a unique Jabber ID (usually abbreviated as JID). To avoid requiring a central server to maintain a list of IDs, the JID is structured like an email address with a username and a domain name (or IP address[15]) for the server where that user resides, separated by an at sign (@), such as username@example.com.

Since a user may wish to log in from multiple locations, they may specify a resource. A resource identifies a particular client belonging to the user (for example home, work, or mobile). This may be included in the JID by appending a slash followed by the name of the resource. For example, the full JID of a user's mobile account would be username@example.com/mobile.

Each resource may have specified a numerical value called priority. Messages simply sent to username@example.com will go to the client with highest priority, but those sent to username@example.com/mobile will go only to the mobile client. The highest priority is the one with largest numerical value.

JIDs without a username part are also valid, and may be used for system messages and control of special features on the server. A resource remains optional for these JIDs as well.

[edit] XMPP via HTTP and WebSocket transports

The original and "native" transport protocol for XMPP is Transmission Control Protocol (TCP), using open-ended XML streams over long-lived TCP connections.

As an alternative to the TCP transport, the XMPP community has also developed an HTTP transport for web clients as well as users behind restricted firewalls. In the original specification, XMPP could use HTTP in two ways: polling[16] 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. The binding method, implemented using Bidirectional-streams Over Synchronous HTTP (BOSH),[17] allows servers to push messages to clients 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. Various websites let people sign in to XMPP via a 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. However, the IANA-registered port for BOSH is actually 5280, not 80.

A perhaps more efficient transport for real-time messaging is WebSocket, a web technology providing for bi-directional, full-duplex communications channels over a single TCP connection. Experimental implementations of XMPP over WebSocket exist, and a (now-expired) Internet-Draft documenting this approach was published at the IETF but not yet standardized.

[edit] Implementations

XMPP is implemented by a large number of clients, servers, and code libraries. These implementations are provided under a variety of software licenses.

[edit] Deployments

Several large public IM services natively use XMPP, including Google Talk and LiveJournal's "LJ Talk",[18] Nimbuzz, and Ovi (Nokia). Various hosting services, such as DreamHost and GMX, enable hosting customers to choose XMPP services alongside more traditional web and email services. Specialized XMPP hosting services also exist so that domain owners need not directly run their own XMPP servers, including WebEx Connect, Chrome.pl, Flosoft.biz, i-pobox.net, and hosted.im.

XMPP is also used in deployments of non-IM services, including smart grid systems such as demand-response applications, message-oriented middleware, and as a replacement for SMS to provide text messaging on many smartphone clients.

[edit] Extensions

The XMPP Standards Foundation or XSF (formerly the Jabber Software Foundation) is active in developing open XMPP extensions. However, extensions can also be defined by any individual, software project, or organization. For example, Google has defined a number of non-XSF extensions, which are used in Google Talk and Google+ (e.g., for signalling related to Google Hangouts). Another example is the federation protocol in Apache Wave, which is based on XMPP.[19]

[edit] Competing Standards

XMPP 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.[20][21]

The XMPP extension for multi-user chat [22] can be seen as a competitor to Internet Relay Chat (IRC), although it is not as widely used as IRC.

Similarly, the XMPP extensions for publish-subscribe [23] provide many of the same features as the Advanced Message Queuing Protocol.

[edit] Connecting to other protocols

Alice sends a message through the XMPP net to the ICQ transport. The message is next routed to Bob via the ICQ network.

One of the original design goals of the early Jabber open-source community was enabling users to connect to multiple instant messaging systems (especially non-XMPP systems) through a single client application. This was done through entities called transports or gateways to other instant messaging protocols, but also to protocols such as SMS or email. Unlike multi-protocol clients, XMPP provides this access at the server level by communicating via special gateway services running alongside an XMPP server. 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. Thus, such gateways function as client proxies (the gateway authenticates on the user's behalf on the non-XMPP service). As a result, any client that fully supports XMPP can access any network with a gateway without extra code in the client, and without the need for the client to have direct access to the Internet. However, the client proxy model may violate terms of service on the protocol used (although such terms of service are not legally enforceable in several countries) and also requires the user to send their IM username and password to the third-party site that operates the transport (which may raise privacy and security concerns).

Another type of gateway is a server-to-server gateway, which enables a non-XMPP server deployment to connect to native XMPP servers using the built in interdomain federation features of XMPP. Such server-to-server gateways are offered by several enterprise IM software products, including:

[edit] Development

The IETF XMPP working group has produced a number of RFC protocol documents: RFC 3920 (superseded by RFC 6120), RFC 3921 (superseded by RFC 6121), RFC 3922, RFC 3923, RFC 4622, RFC 4854, RFC 4979, and RFC 6122. The most important and most widely implemented of these specifications are:

  • RFC 6120, 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 6121, Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence describes instant messaging (IM), the most common application of XMPP.
  • RFC 6122, Extensible Messaging and Presence Protocol (XMPP): Address Format describes the rules for XMPP addresses, also called JabberIDs or JIDs. Currently JIDs use Stringprep (as defined in RFC 3454) for handling of Unicode characters outside the ASCII range, but this will be changed in the future to use the technology produced by the IETF's PRECIS Working Group.

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[27]
  • Service Discovery[28]
  • Multi-User Chat[22]
  • Publish-Subscribe [23] and Personal Eventing Protocol[29]
  • XHTML-IM[30]
  • File Transfer[31]
  • Entity Capabilities[32]
  • HTTP Binding[17]
  • Jingle for voice and video

[edit] See also

[edit] References

  1. ^ Johansson, Leif (April 18, 2005). "XMPP as MOM". Greater NOrdic MIddleware Symposium (GNOMIS). Oslo: University of Stockholm 
  2. ^ "Jabber Inc". Cisco.com. Retrieved 2012-11-24. 
  3. ^ "Jabber Instant Messaging User Base Surpasses ICQ" (Press release). XMPP Standards Foundation. September 22, 2003. Retrieved November 30, 2007. 
  4. ^ "Open Real Time Messaging System". Tech.slashdot.org. 1999-01-04. Retrieved 2012-11-24. 
  5. ^ Chatting Up the Chef Linux Journal March 1, 2003 by Marcel Gagné
  6. ^ "Jabber.org – XMPP Server Migration". August 12, 2009. Retrieved December 14, 2009. 
  7. ^ Burd, Gary (January 17, 2006). "XMPP Federation". Retrieved November 30, 2007. 
  8. ^ Florian Jensen (2008-01-17). "AOL adopting XMPP aka Jabber". Archived from the original on 20 January 2008. Retrieved 2008-01-17. 
  9. ^ "AOL XMPP Gateway". 2011-05-14. Archived from the original on 22 May 2011. Retrieved 2011-05-14. 
  10. ^ "Cisco Announces Definitive Agreement to Acquire Jabber". Retrieved January 2, 2010. 
  11. ^ "Facebook Chat Now Available Everywhere". Retrieved February 11, 2010. 
  12. ^ "Facebook Chat API". Retrieved November 29, 2011. 
  13. ^ Dare Obasanjo (2011-12-14). "Anyone can build a Messenger client—with open standards access via XMPP". Windowsteamblog.com. Retrieved 2012-11-24. 
  14. ^ Janko Roettgers (2011-06-28). "Skype adds XMPP support, IM interoperability next? — Tech News and Analysis". Gigaom.com. Retrieved 2012-11-24. 
  15. ^ RFC 6122
  16. ^ Joe Hildebrand, Craig Kaes, David Waite (2009-06-03). "XEP-0025: Jabber HTTP Polling". Xmpp.org. Retrieved 2012-11-24. 
  17. ^ a b Ian Paterson, Dave Smith, Peter Saint-Andre, Jack Moffitt (2010-07-02). "XEP-0124: Bidirectional-streams Over Synchronous HTTP (BOSH)". Xmpp.org. Retrieved 2012-11-24. 
  18. ^ "Question FAQ #270-What is LJ Talk?". Livejournal.com. 2010-09-27. Retrieved 2012-11-24. 
  19. ^ "Google Wave Federation Protocol". Google. 
  20. ^ "XMPP rises to face SIMPLE standard", Infoworld magazine, April 17, 2003 XMPP rises to face SIMPLE standard
  21. ^ "XMPP vs SIMPLE: The race for messaging standards", Infoworld magazine, May 23, 2003 Infoworld.com
  22. ^ a b XEP-0045: Multi-User Chat
  23. ^ a b XEP-0060: Publish-Subscribe
  24. ^ "Lotus Sametime 7.5 Interoperates with AIM, Google Talk", eWeek, December 6, 2006 Eweek.com
  25. ^ "Lotus ships gateway to integrate IM with AOL, Yahoo, Google", Network World, December 6, 2006 Networkworld.com
  26. ^ "Unified Communications: Uniting Communication Across Different Networks", Microsoft Press Release, October 1, 2009 Microsoft.com
  27. ^ XEP-0004: Data Forms
  28. ^ XEP-0030: Service Discovery
  29. ^ XEP-0163: Personal Eventing Protocol
  30. ^ XEP-0071: XHTML-IM
  31. ^ XEP-0096: File Transfer
  32. ^ XEP-0115: Entity Capabilities

[edit] External links