Chapter 3. Presence

Is Anybody Home?

Imagine that you want to contact a friend or colleague. In the old days, you might have sent the person a letter (you know, one of those pieces of paper that is delivered to your home or office), and then waited for a reply. Or you might have phoned the person and hoped she was around (if not, you would have left a message with a person or an automated system, perhaps playing “phone tag” for a few days). Or, more recently, you might have sent an email, perhaps receiving a reply in 10 minutes or so, but perhaps days later.

In XMPP, you can know when a contact of yours is online and available for communication, using a technology called presence. So instead of waiting and wondering, or just getting lucky, your Jabber client will show you the network availability of your contacts, usually with an indicator such as a light bulb icon (on the theory that if someone is home, the lights will be on). Figure 3-1 shows an example of such a presence-enabled contact list in an IM client.

Your roster provides a visual representation of the people you know and trust on the network, including information about their network availability or “presence”
Figure 3-1. Your roster provides a visual representation of the people you know and trust on the network, including information about their network availability or “presence”

However, presence is not limited to pretty little icons; it enables you to get real work done. In this chapter, we delve more deeply into presence, and explore how you can use it to build smarter, more interactive ...

Get XMPP: The Definitive Guide 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.