Introduction to XMPP you can use it to build decentralised applications on the web

Lloyd Watkin

Work for Surevine

Member of the XSF + editorial team



Creator/lead on:, XMPP-FTW, node-xmpp, buddycloud server

What is XMPP?

eXtensible Messaging and Presence Protocol
(aka Jabber)

Started around 1998

Became part of IETF in 2002

Does anyone use it?

  • Google: talk/hangouts, GCM
  • Facebook: Chat interface
  • Whatsapp: Hacked version
  • Atlassian: HipChat

Its usage is often not advertised

What is it used for?


Why are you talking
about a crusty old



...are snippets of XML

There are three types:
<message/>, <presence/>, & <iq/>


[user@] [/mobile-phone]

  • local: The user/device (i.e. client)
  • domain: Server you are addressing
  • resource: Multiple connections?


Thin clients, leave the work to the server

Connect over TCP/BOSH (Long polling)/WebSockets

Data is pushed to clients, clients push data


Routes messages

Allow users to talk across servers

Handles authentication and security


Provide extended functionality

Can send messages on behalf of clients

Server + language agnostic

Building applications with XMPP

...web-based of course

<XMHELL/> the last couple of years we've attempted to make XMPP more web-developer friendly

There's also Strophe.js and node-xmpp-client


Powerful XMPP, simple JSON

  • Event-based system
  • Translates between XML and JSON
  • Written in nodejs
  • Attempts to make building XMPP applications really easy

What can I build???

You can build many applications with basic XMPP functionality


XMPP has many other advantages

✓ 1-to-1 and multi-user chat

✓ presence (online status)

✓ roster (address book)

✓ publish subscribe

✓ federation (multi-server communications)

✓ security

✓ authentication

✓ large, helpful community

✓ well thought-out standards

Here's some interoperable webrtc demo clients from different projects:


XMPP is a powerful, proven, open, secure, standards-based protocol

...great match for decentralized applications

Lots of servers/clients/libraries
(many open source)

Great helpful community, who are actively helping to push the web forward:

XMPP security days, WebRTC signalling over XMPP, New IoT extensions,
Extensions to help accessibility

Get started today

Install an XMPP server: prosody

npm i xmpp-ftw-demo

node index

open http://localhost:3000/demo


Slides available @

Get an XMPP account quickly: