Silo-free federated realtime applications

@lloydwatkin

Why silo-free applications?

Open standards

"When they succeed they dramatically lower the cost of creating something" - TBL

Data

Freedom

Terms & Conditions may apply

Why federated applications?

Why don't we see more open federated systems?

Its hard(er)!

Companies often lean on these technologies, grow big, make their apis properietary

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

Components

Provide extended functionality

Can send messages on behalf of clients

Server + language agnostic

Working with XMPP in nodejs

node-xmpp-client



            var Client = require('node-xmpp-client')
            var client = new Client({ /* options */ })
            
            client.on('online', console.log.bind)
            client.on('stanza', function(stanza) {
                stanza.attrs.to = stanza.attrs.to
                delete stanza.attrs.from
                client.send(stanza)
            })
            

node-xmpp-component


  • Build components
  • Implement your own business logic
  • Send messages as local users

node-xmpp-server


Not ready as a full XMPP server, but you can start up and connect clients to handle job management and messaging

XMPP-FTW


Powerful XMPP; Simple JSON

What can I build???

You can build many applications with basic XMPP functionality

Components

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:

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

...and what if?


buddycloud.org

Otalk

meet.jit.si

Summary

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

New IoT extensions,
Extensions to help accessibility

♫ HEY ♫

I just met you...

...and this is crazy...

♫ ..but here's my JID... ♫


lloyd@evilprofessor.co.uk


♫ I.M. me maybe ♫

Slides available @ http://talks.evilprofessor.co.uk/


Get your own federated social network like *so* fast:
hosting.buddycloud.com


@lloydwatkin