XMPP on the web

Lloyd Watkin

Work for Surevine

Member of the XSF + editorial team

lloyd@evilprofessor.co.uk

@lloydwatkin

lloydwatkin

Creator/lead on:
pinitto.me, 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?


"X"

Why are you talking
about a crusty old
protocol?

Fundamentals

Stanzas

...are snippets of XML


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

The JID


[user@] example.org [/mobile-phone]


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

Clients

Thin clients, leave the work to the server

Connect over TCP/BOSH (Long polling)/WebSockets

Data is pushed to clients, clients push data

Servers

Routes messages

Allow users to talk across servers

Handles authentication and security

Why XMPP with WebRTC?

But I can write my own signaling?!

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

XMPP on the web

<XMHELL/>

Big moves in the past 14 months to make XMPP more web-developer friendly



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

Here's interoperable demo clients from all those projects:

legastero.github.io/jingle-interop-demos/

XMPP-FTW

Powerful XMPP, simple JSON

https://xmpp-ftw.jit.su/

  • Event-based system
  • Translates between XML and JSON
  • Written in nodejs
  • Demo system generated from the manual
  • Attempts to make building XMPP apps quick and easy
    (I built it for one of my projects)
  • Quick demo

Summary

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

...great match for WebRTC 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

Questions


Slides available @ http://talks.evilprofessor.co.uk/mozilla-munich-xmpp-webrtc

Get an XMPP account quickly: demo.buddycloud.org