XMPP facts for kids
Communication protocol | |
![]() |
|
Purpose | Instant messaging |
---|---|
Introduction | 1999 |
OSI layer | Application layer |
Port(s) | TCP 5222, 5269, 8010 |
RFC(s) | RFC 6120 (Core), RFC 6121 (IM & Presence), RFC 7622 (Address Format), RFC 3922 (CPIM), RFC 3923 (Encryption) |
Extensible Messaging and Presence Protocol (XMPP), first called Jabber, is like a special language that computers use to talk to each other. It's an open way for different apps to send instant messages, show if someone is online (called presence information), and keep track of friends' contact lists.
XMPP uses XML (which stands for Extensible Markup Language) to send information very quickly between computers. Because it's designed to be flexible, XMPP can do much more than just chat. It can help with VoIP (like internet phone calls), video calls, sending files, and even online gaming.
Unlike many chat apps that have one main company running everything, XMPP is an open standard. This means anyone can set up their own XMPP server, just like anyone can run their own email server. There isn't one big central server controlling everything. This federated system lets users on different servers talk to each other. You use a 'JID' account, which is like an email address. Many XMPP programs are free to use and change.
The XMPP system was first made by people who believe in open-source software. In 2004, it became an official standard for instant messaging. Since then, new features and improvements have been added. Many XMPP chat apps are available for computers and phones. By 2003, over ten million people around the world were using XMPP.
Contents
How XMPP Chat Works
Even though XMPP can do many things, its main use is for instant messaging. It allows different chat services to connect and talk to each other. This is called federated instant messaging.
Imagine Alice wants to send a message to Beth. Alice's XMPP address is "alice@example.com" and Beth's is "beth@example.com". Alice sends her message to her server, example.com. If Beth is online, the server sends the message right away. If Beth is offline, the server holds the message until she comes online. Alice will also know if Beth is online or offline.
If Alice wants to message Charles, whose address is "charles@example.net", her example.com server connects to Charles's example.net server using XMPP. The message is then sent to Charles or held for him. Alice is also told if Charles is online.
Once they start chatting, both Alice and Beth (or Charles) are updated on each other's status.
How Computers Talk Using XMPP
When you use an XMPP chat app, it talks to its server using a secure connection (called SSL-encrypted TCP) on port 5222. When two XMPP servers need to talk to each other, they also use a secure connection on port 5269.
Cool Things About XMPP
No Central Boss
The XMPP network is set up like email. There's no single company or server that controls everything. Anyone can run their own XMPP server. This is different from services like WhatsApp or Telegram, which have one main company. Some people get confused because there's a public XMPP server called `jabber.org`. But remember, anyone can start their own XMPP server on their own website.
Your XMPP Address
Every user on the XMPP network has a special address called a Jabber ID (JID). It looks a lot like an email address. It has a username and a domain name (or server address) separated by an "at" sign (`@`). For example, "alice@example.com
" means Alice is the username and `example.com` is the server she uses.
Since you might log in from different places, like your phone or computer, you can add a resource to your JID. This tells people which device you're using. You add a slash (`/`) and then the resource name. For example, "username@example.com/mobile
" means you're on your mobile device.
Each device (resource) can have a priority number. Messages sent to "username@example.com
" will go to the device with the highest priority. But if you send a message to "username@example.com/mobile
", it will only go to your mobile device.
XMPP on the Web
Normally, XMPP uses a direct connection (TCP). But for web apps or people behind strict firewalls, XMPP can also work over HTTP, which is what websites use. This means you can often use XMPP chat right in your web browser.
The most common way to use XMPP over HTTP is called BOSH. It lets servers send messages to your web browser as soon as they arrive, which is faster than constantly checking for new messages. Because HTTP is usually allowed through firewalls, XMPP can work even when other connections are blocked.
Adding New Features
The XMPP Standards Foundation (XSF) helps create new features for XMPP, called XMPP Extension Protocols (XEPs). But anyone can create their own extensions. To make sure everything works together, the XSF manages the common extensions. XMPP can be used for many things beyond chat, like:
- Online chat rooms
- Managing computer networks
- Sharing files
- Online games
- Controlling systems from far away
- Finding locations (geolocation)
- Cloud computing (where you use computer services over the internet)
- VoIP (internet phone calls)
What XMPP Can't Do Easily
Because XMPP uses text-based XML, it can sometimes use more internet data than systems that send information in a simpler, binary way. Also, sending large files directly within XMPP messages isn't ideal. For big files, XMPP usually helps coordinate the transfer outside the main chat, like using a special link to upload the file. For voice and video calls, XMPP uses a special extension called Jingle.
XMPP Features
Talking Directly (Peer-to-Peer)
With the Jingle extension, XMPP can allow two devices to talk directly to each other. This is often used for IP telephony (VoIP) calls.
Group Chats
XMPP supports group chats with many users, similar to Internet Relay Chat (IRC). This feature is called Multi-User Chat (MUC).
Keeping Things Safe
XMPP servers can be set up to be very private, like inside a company's network. The core XMPP system has built-in ways to keep your conversations secure. It uses SASL to check who you are and TLS to encrypt your messages.
For even more security, there are extensions like OMEMO (XEP-0384). This provides end-to-end encryption, meaning your messages are scrambled on your device and only unscrambled on the receiver's device. This way, even the server operator can't read your messages. You can also encrypt messages using OpenPGP.
Finding Services
XMPP can help devices find services or other users on a network, and see if they are available. This is useful for many different applications.
Connecting to Other Chat Systems
One of the first goals of Jabber (XMPP) was to let users connect to different chat systems, even non-XMPP ones, using just one app. This is done through special programs called transports or gateways. These gateways can connect to services like ICQ, AIM, Yahoo Messenger, SMS, IRC, or even email.
Instead of your chat app needing to know how to talk to every different service, the XMPP server handles it. You "register" with a gateway by giving it your login details for the other service. Then, you can chat with users on that other service as if they were XMPP users. This means any XMPP app can talk to any network with a gateway, without needing extra code.
However, using these gateways might go against the rules of some services. Also, you have to trust the third-party site running the transport with your login information, which could be a privacy concern.
XMPP Programs
Many different programs use XMPP, including chat apps, servers, and code libraries that developers use.
Servers
Some popular XMPP server programs include ejabberd and Prosody.
Chat Apps
There are many XMPP chat apps for different devices and operating systems. Some popular ones include:
- Conversations, Cheogram, Monocles, and Quicksy for Android phones.
- Dino for BSD, Windows, Unix, and Linux computers.
- Converse.js for web browsers, Linux, Windows, and macOS.
- Gajim for Windows and Linux.
- Monal for macOS and iOS (iPhones/iPads).
- Swift.IM for macOS, Windows, and Linux.
Other well-known XMPP apps include Miranda NG, Pidgin, Psi, and Trillian.
Where XMPP is Used
Thousands of XMPP servers are running around the world. Many are public, and many are run by individuals or organizations just for their own use. You can find lists of public XMPP servers online where you can create an account.
Some big chat services have used XMPP, like LiveJournal's "LJ Talk" and HipChat. Many web hosting companies also let their customers use XMPP services. There are even special services that host XMPP for you, so you don't have to run your own server.
Most of these services are federated, meaning users on one service can chat with users on another.
XMPP is also used in other areas, like smart energy systems and as a way to send text messages on many smartphones, sometimes replacing SMS.
Big Companies and XMPP
Some of the largest messaging companies have used XMPP in their systems, even if users didn't always know it.
- Google used XMPP for its Google Talk service, which combined voice and instant messaging. They later stopped supporting server-to-server XMPP connections for Google Talk.
- AOL Instant Messenger (AIM) also tried using XMPP for a while, but later limited its support.
- Facebook used XMPP for its chat feature for third-party apps, but stopped supporting it in 2014.
- Microsoft Messenger service also had an XMPP connection.
XMPP is also a common choice for private chat in gaming platforms like Origin and PlayStation. However, Steam and Xbox LIVE use their own special chat systems.
History of XMPP
Jeremie Miller started working on the technology that became Jabber in 1998. The first version of the `jabberd` server was released on January 4, 1999. The early Jabber community focused on open-source software, and this work led to the creation of the XMPP protocol.
In 2002, a group called the Internet Engineering Task Force (IETF) started working to make XMPP an official standard for instant messaging. The original Jabber protocol became the basis for XMPP, which was officially published in 2004. Important additions during this time included TLS for encryption and SASL for logging in securely.
The first chat service based on XMPP was Jabber.org, which has offered free accounts since 1999.
The XMPP Standards Foundation (XSF) continues to develop and publish new XMPP features through a process called XMPP Extension Protocols (XEPs). Some widely used extensions include:
- Multi-User Chat (for group chats)
- File Transfer
- HTTP Binding (for web-based XMPP)
- Jingle (for voice and video calls)
XMPP and the Internet of Things
XMPP's features, like connecting different systems and secure communication, are being used to help build the Internet of Things (IoT). IoT refers to everyday objects that are connected to the internet and can send and receive data. XMPP extensions are being developed to help these devices talk to each other, share sensor data, and be controlled remotely.
Official Rules and Standards
The IETF XMPP working group has created several official documents called Request for Comments (RFCs) that describe how XMPP works.
The most important and widely used of these rules are:
- RFC 6120, which explains how XMPP clients and servers send messages using XML. It also covers how connections are made secure with SASL and TLS.
- RFC 6121, which describes how XMPP is used for instant messaging and showing if someone is online. This is the most common use of XMPP.
- RFC 7622, which sets the rules for XMPP addresses, also known as JabberIDs or JIDs.
Other Standards
XMPP is sometimes compared to SIMPLE, another protocol for instant messaging. The XMPP group chat feature can be seen as a competitor to IRC, though IRC is much simpler.
See also
In Spanish: Extensible Messaging and Presence Protocol para niños
- Comparison of instant messaging clients
- Comparison of instant messaging protocols
- Matrix (protocol)
- Secure communication
- XMPP clients