User Tools

Site Tools


how_jabber_xmpp_works

XMPP as an IM protocol

XMPP (formerly named Jabber) is a protocol and an open system for Instant Messaging. XMPP is a distributed system, which means that there isn't one single server or one centralized service where everybody has to have an account. There are multiple servers and providers, just like with email. You simply log on to your provider's server and start chatting with your friends. The servers will take care of exchanging the messages between the providers.

It is based on XML, so a typical snippet of XMPP traffic looks like this:

XMPP servers and clients exchanging messages

 <message
     to='romeo@example.net'
     from='juliet@example.com/balcony'
     type='chat'
     xml:lang='en'>
   <body>Wherefore art thou, Romeo?</body>
 </message>

This example also shows something special to XMPP: you can provide “resources” (the “/balcony” part), enabling you to be logged in with several clients at the same time. Messages can be directed at either the “plain” Jabber ID, then the actual recipient is determined by something called “priority” (some numerical value specifying how much priority this login shall have) or some fallback method, otherwise the message is sent to the client where the recipient is logged in with the specified resource.

Another XMPP-only feature are “pubsub services”. These enable you to publish your mood or the title of the tune you're currently listening to. Not all servers/clients do support these features though.

There are already quite a lot of XMPP servers, but since XMPP is an open system, you can even setup your own server and become part of the network. For this purpose, you can use some of these open source server implementations:

You may also visit http://xmpp.org/xmpp-software/servers/ for a list of more server software.

This fact also makes XMPP the ideal choice for creating a company's internal IM solution, as you do not have to trust your messages to a third-party provider over a public network.

The communication between clients and servers is protected with TLS (if supported by client/server). That means that the communication between users and their servers is secret and nobody can read it. If the servers support it, server-to-server traffic is enrcrypted, too.

It is also possible to use end-to-end encryption like GPG or OTR.

Servers can have additional services rather than just messaging and presence. Most servers have chatrooms (XMPP is not only one-to-one communiation), many also have gateways to open networks (like IRC) and to closed ones (MSN, Yahoo!, AIM).

Other uses of Jabber/XMPP

There are several other ways Jabber/XMPP can be used:

If you want to learn more about XMPP's technical details, you may want to read the Wikipedia entry on XMPP, Technology Overview or even one of the specifications/RFCs on xmpp.org.

how_jabber_xmpp_works.txt · Last modified: 2013/10/29 15:17 by neustradamus