Availability Tracker

The Jabber server (specifically, the presence handler within the JSM) has a mechanism called the Availability Tracker. As its name implies, its job is to track the availability of entities that have previously made an availability announcement (in a <presence/> element).

The concept of exchange of availability information via an exchange agreement recorded in the roster was introduced In Section 5.4.2.3. This mechanism covers the automatic distribution of availability notification based upon prearranged presence subscriptions.

However, Jabber services (which are connected to the jabberd backbone; see Section 4.1 in Chapter 4) may need to know an entity’s availability or, more importantly, when they suddenly become unavailable. These Jabber services usually won’t have a prior presence subscription agreement recorded in anyone’s roster.

The Conferencing service, which provides group chat facilities, allowing users to join discussion “rooms” and chat, is one of these services. The service maintains data for each room’s participants, and, so that it can manage its memory usage effectively, needs to know when a user ends his connection with the Jabber server—in other words, when he becomes unavailable—so it can free that user’s data. Normally, a user leaving a room is information enough for the service to know that data can be freed. But what if the user disconnects (or is disconnected) from his Jabber server without first leaving the room?

The availability ...

Get Programming Jabber now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.