XMPP Servers & Clients

XMPP Servers & Clients

BOSH Explained http://metajack.wordpress.com/2008/07/02/xmpp-is-better-with-bosh/ :: XMPP Is Better With BOSH « metajack

XMPP is awesome, but XMPP speaks XML.

Basic Knowledge

JIDs are divided into two categories, bare JIDs and full JIDs. The full JID is always the most spe- cific address for a particular entity, and the bare JID is simply the full JID with any resource part removed.

You can think of bare JIDs as addressing the user’s account as opposed to addressing one of the user’s connected clients.

Three basic stanzas make up the core XMPP toolset. These stanzas are , , and

Before any stanzas are sent, an XMPP stream is necessary. Before an XMPP stream can exist, a con- nection must be made to an XMPP server.

node.js XMPP

node.js servers

Full blown XMPP server in node.js that uses Redis as its datastore http://blog.superfeedr.com/node-xmpp-server/ :: Superfeedr : Node XMPP server https://github.com/superfeedr/xmpp-server/ :: superfeedr/xmpp-server

Connection manager: Connection Manager means - it needs a backend server An XMPP BOSH & WebSocket connection manager written on node.js dhruvbird/node-xmpp-bosh This allows Websocket…

Client side XMPP

http://xmpp.org/extensions/xep-0124.html#technique :: XEP-0124: Bidirectional-streams Over Synchronous HTTP (BOSH)

Strophe.js http://strophe.im/strophejs/ :: Strophe.js - An XMPP library for JavaScript http://metajack.wordpress.com/2008/06/30/strophe-preview-xmpp-in-javascript/ :: Strophe Preview: XMPP In JavaScript « metajack Plugins: https://github.com/metajack/strophejs-plugins :: metajack/strophejs-plugins

Websockets support:
	https://github.com/metajack/strophejs/issues/68 :: Issue #68: Strophe.js needs a roadmap for websockets · metajack/strophejs
	https://gist.github.com/739147 :: Websocket support in strophe.js — Gist

	I'm running this Websocket support branch together with Candy against a Prosody server. Works great!
	[Websocket Support by Gordin · Pull Request #95 · metajack/strophejs](https://github.com/metajack/strophejs/pull/95)

	I tested this branch against websocket plugins for ejabberd and
	Prosody and with the Websocket-over-XMPP proxies node-xmpp-bosh and
	WXG and it seems to be stable.
	[Websocket Support by Gordin · Pull Request #95 · metajack/strophejs](https://github.com/metajack/strophejs/pull/95)

Alternatives to Strophe.js: sstrigler/JSJaC · GitHub maxpowel/jQuery-XMPP-plugin · GitHub

With very nice examples.
[Libraries – The XMPP Standards Foundation](http://xmpp.org/xmpp-software/libraries/#javascript)

Good sources of info (list of projects): https://github.com/eldonilo/lightstring#readme :: eldonilo/lightstring

XMPP libraries on node.js

astro/node-xmpp :: https://github.com/astro/node-xmpp http://xmppjs.prosody.im/ :: Like Strophe.js library, but on server in node.js

Websockets support in ejabberd server

A module that adds websocket support for the ejabberd XMPP server. It’s a more elegant, modern and faster replacement to Bosh.

http://blog.superfeedr.com/xmpp-over-websockets/ :: Superfeedr : XMPP over websockets.
https://github.com/superfeedr/ejabberd-websockets :: superfeedr/ejabberd-websockets

We also had to branch Jack ’s amazing Strophejs to split the core.js and bosh.js part, so we could easily replace bosh.js with websocket.js

https://github.com/superfeedr/strophejs/tree/protocol-ed :: superfeedr/strophejs at protocol-ed · GitHub


http://stackoverflow.com/questions/5453029/pros-and-cons-of-xmpp-servers/5457654#5457654 :: pros and cons of XMPP servers - Stack Overflow Prosody IM - Server for Jabber/XMPP written in Lua :: http://prosody.im/

ejabberd - the Erlang Jabber/XMPP daemon - http://www.ejabberd.im/ Module that adds websocket support for the ejabberd XMPP server :: https://github.com/superfeedr/ejabberd-websockets

Ignite Realtime: Openfire Server

Which BOSH Server do you need? :: http://metajack.im/2008/09/08/which-bosh-server-do-you-need/

http://www.olympum.com/future/will-xmpp-be-the-messaging-middleware-for-the-rest-web/ :: Will XMPP be the messaging middleware for the REST Web?

XMPP Server Benchmarking Tool: http://www.process-one.net/en/tsung/desc/ :: About Tsung - High Performance Benchmarking Framework - ProcessOne

Reasons for XMPP

Compatibility with social networks (Facebook, GMail, etc)

XMPP: because of mobile clients like this one: https://github.com/redsolution/xabber-android

abhinavsingh/JAXL PHP Library Asynchronous, non-blocking I/O, event based PHP library for writing custom TCP/IP client and server implementations.

BOSH connection manager PunJab · GitHub Written in Python There is an abhinavsingh/ebosh, but not stable, written in Erlang.

Random Goo: Adding Facebook Chat To Your NodeJS Site

Ejabberd modules

candy-chat/mod_log_chat_mysql5 · GitHub


Prosody - ArchWiki Installing Prosody XMPP Server on Ubuntu Setting up a BOSH server

Prosody modules prosody-modules - Add-on modules for Prosody IM Server List of embedded modules is: ls /usr/lib/prosody/modules

Register a user vagrant@devbox.lan with a password devbox:

    prosodyctl register vagrant devbox.lan devbox (Compatibility arguments with ejabberd)

candy-chat/mod_log_chat_mysql5 · GitHub https://github.com/candy-chat/mod_log_chat_mysql5

Chat server in Ruby: http://www.getvines.org/

Very actively developed fork of Prosody: Metronome IM | LW.Org jappix/jappix-xmppd · GitHub

jcbrand/converse.js · GitHub Converse.js: XMPP instant messaging with Javascript

Links: [ws://:5280/xmpp-websocket/](Websocket clients) [http://:5280/http-bind/](Enable BOSH clients, aka “Jabber over HTTP”)

Prosody XMPP

Interesting sources: http://prosody.im/files/ Prosody author - Mercurial repositories index Wiki Pages - prosody-modules - Add-on modules for Prosody IM Server - Google Project Hosting

support-chat: Summary prosody.im/files/prosody-chatlogger.lua

Broadcast on all resources

When you ommit a resource in message:

Broadcast message for a user on all the resources, if resource is not specified. The only thing to do is to change configuration variable ignore_presence_priority.

Configuration directives: ignore_presence_priority and maybe conflict_resolve.

Configuring Prosody - Prosody.im

We can force to be broadcasted to every resource

But we need to use a small plugin - here it is.


  1. Compress
  2. libevent bindings for Lua

Using JSON encoding instead of XML

Fuck you! It’s aprils fool! XEP-0295: JSON Encodings for XMPP mod_json_streams + Strophe.js plugin

date 01. Jan 0001 | modified 28. May 2021
filename: XMPP