Jiva Technology

XMPP, Jabber, BOSH and all that

Until now, we’ve not given much in the way of technical updates from Planet Jiva, but with the impending release of Tutorhub, I thought it would be worth sharing some of our technical trials and tribulations. From the word go, our technical vision required a need for real time ‘conversation’, blending IM style features with those found in run of the mill web applications. This is known as making life hard for yourself.

In contrast to the fundamentally asymmetric, request-response model that underlies almost all web based communication (even Web 2.0 sites that provide dynamic updates of information), instant messaging applications require any connected party to be able to send or receive a message at any time.  Not all messages receive, or require, a response. The established open standard, used by Jabber, Google Chat and Facebook Chat, is XMPP. The recent release of the draft standard for the BOSH protocol, together with the emergence of a couple of open source JavaScript libraries which support XMPP over BOSH, allowed us to embed XMPP based communication channels within Tutorhub, our new web application for the online tutoring market. It’s been a complex undertaking. It necessitates moving from a two party request-response communication pattern to an architecture where the web browser must communicate both with the web server (via HTTP) and with the IM server (via XMPP over BOSH). In addition the IM server and the web server must route messages to one another, mediated by software ‘bots’. These messages must be queued to ensure that they are reliably received and processed asynchronously without causing undue delay in the request-response communication. We used AMQP for this, another emerging open standard developed for use in high volume transaction processing environments such as banking. XMPP allows us to effectively route queries to relevant tutors based on the subject of the query, without requiring tutors to constantly poll the server for updates, a practice known as ‘semantic query routing’. The result? Hopefully, a much more scalable architecture.


Regus House
1 Friary

Temple Quay
United Kingdom