I try to get creative with my post titles. I think I failed at this attempt.
In my last XMPP post, I talked about priorities, the single #1 feature in a Jabber client that I look for. If I can’t change the priority number to suit my needs, then I’m not interested in using that Jabber client (Pidgin devs, paying attention?). Well, priorities are cool and all, but they don’t do much without our next Jabber feature- resources.
As I mentioned previously, the XMPP specification allows multiple simultaneous connections. However, when we are connected more than once to our Jabber provider, the server needs a way to tell the connections apart. This is where resources come in. Some providers automatically set a unique resource. However, while definitely a solution to the problem, I actually prefer the ability to change the resource myself, rather than have my provider do it for me. Okay, so how do I change a resource, and why would I want to?
From client to client, this differs, but essentially, the process is the same. When creating a new account, or modifying your current account, there should be a box labeled “Resource”. Change this to fit your needs. As I mentioned earlier, the server needs to tell your multiple connections apart, so, the resource always needs to be unique. If you try connecting a second time, and your immediately disconnected, check your resource. Chances are, it’s conflicting with a connection already made with the same resource name.
Most clients will auto-fill this in for you. For Gajim, the resource is already set to “Gajim” by default, “centericq” for the CenterICQ client and “bitlbee” for the Bitlbee client. As mentioned, I prefer to change the resource to fit my needs. See the screenshot of my Gajim client below:
As I mentioned earlier, some providers prefer to set the resource for you, without your ability to change it, or, you’re given the false sense that your changing the resource, when in fact, a random string of characters called a hash, are being appended anyway. For example, the Google Talk devs have taken this stance of appending a hash after your resource name. The hash is randomly created upon connection to ensure that no two resources are the same. The motivation behind the idea is that lay users will not be familiar with resources and priorities, so the client takes care of everything under the hood. Where the development falls short, is not giving the ability for those who know what they’re doing, the flexibility to change their resource and priority. This is why I don’t use the Gmail.com Jabber service, as I don’t want random resources set for me.
Why change your resources? What’s the big deal? Well, again, we need unique connections for each connection. On the flip side, however, using a resource can tell the users in your roster your physical location, like “Home”, “Work” and “School”, your operating system such as “Mac” and “Linux” or the hostname the client is installed on, like “hercules” and “athena”. There are a number of reasons why you may want to have the control over your resource. Why change the resource? Because you can.
Coupled with priorities, this makes XMPP a pretty powerful reason to switch from your old proprietary IM protocols to Jabber. XMPP gives you the flexibility you need to establish your presence online, rather than just connect a dummy client to a dummy service hoping for the best. As I’ve just recently learned, AIM allows multiple connections, but when someone sends a message to you, it’s sent to every connection made. In my opinion, this is sloppy. XMPP/Jabber cleans it up very well. And we’ve just reached the tip of the iceberg. There are more reasons to switch than you can shake a stick at, and I plan on covering every last one of them, hoping you’ll see the reason to switch to the single greatest IM protocol around.
UPDATE: I have bee corrected by Evan Schoenberg about Pidgin and other clients based on the libgaim/libpurple libraries. These clients do not append a random hash string after the resource name as I thought was happening. Rather, this is a provider issue, specifically, for Gmail.com users. However, I still see no place to change the priority to fit my needs with these clients, such as Gaim/Pidgin, Adium and others. Bitlbee just recently changed their Jabber code to allow such functionality. Also, it has been brought to my understanding that Jabber providers will be setting resource strings in the upcoming XMPP specification. I am unclear of the details, but apparently, it is to fill a security hole with the client setting the resource string. I’ll provide information when I understand the changes and get more details.