Image of the glider from the Game of Life by John Conway
Skip to content

Why XMPP Part 1- It's All About Priority

First, before I continue, I just want to let my readers know that the DRM post is forthcoming, I just don't know when. As of right now, the post is exceptionally lengthy, and just getting longer. It's far from finished as well. I've also had conflicting ideas on how to present the paper regarding DRM, its ramifications and overall social impact. So, as such, it's looking like I may actually move this to my wiki, which I designed for essays, and not blog posts to begin with. At any event, I haven't forgotten, I just don't know what to do with it. I'll keep you posted.

Okay, so with that out of the way, I want to talk about one of my most passionate topics- XMPP. I hope with the goal of these upcoming series of posts, to convince my readers why XMPP is a superior protocol to the rest. When all is said and done, there should be no doubt in your mind why you should be using XMPP as your primary method of IM communication. To start, I want to talk about priority.

Before I begin, however, why XMPP and not Jabber? Well, in reality, they are one and the same, and I don't put preference in using one term over the other, as long as they are being used correctly. But there are subtle differences. XMPP is the core protocol for Jabber, which is the wrapper, for lack of a better term, that is used for Google Talk, Jabber.org and other Jabber servers. Jabber, rather, is used to refer to much more than the protocol. Jabber is a company, server daemon and an open source application. XMPP is just the engine under the hood. So, from here on out, for simplicity sake, and clarity, I'll be referring to both XMPP and Jabber as "Jabber" throughout this post, and the rest of the series.

With that bit out of the way, let's discuss the #1 feature, in my opinion, about Jabber, and that's priority. Let's create a small scenario. Pretend that you are using ICQ for all you instant messaging needs. When at home, you stay logged in, chatting with your friends and family keeping on touch. Then, you go to work, and login to your ICQ account again. What happens? You are logged off at home, and logged in at work. In other words, you can only be logged into a single instance at any given time with ICQ. Same holds true for most protocols: MSN, AIM, Yahoo! IM and others.

Now you leave work. You log off of your computer, and head home. Because your login at work logged you off at home, and now you have just logged off of your computer, you are no longer logged into your ICQ account. If your client supports reconnecting, then you may be. However, if you are not logged in, what happens when your friend or family member wants to get in touch with you? Sure, they could call your cell, or send you and email. There are probably numerous ways to get in touch, but why be limited with your IM client and provider? If I want to be logged in 24/7 regardless of location, I cannot do this with ICQ, or others, very easily. Fortunately, Jabber makes this easy.

First, Jabber supports multiple connections to your provider, regardless of location or client. This means that you could stay logged in at home, go to work, and login a second time, keeping the connection at home alive. Regardless if you logout at work or not, you will always be connected at home (unless your Internet dies, or other environmental circumstances). Cool, eh? You can be logged in at home, work, school, your friends house, and home again. You want to be connected with family and friends, there is no problem with Jabber.

However, I have a question. Say you are logged in at home twice at your laptop and desktop, as well as being logged in at work. So, you are logged in 3 times. Now, your friend wants to send you a message. Where does it go? Luckily, Jabber addresses this issue. On each connection, you can set a priority number. The highest priority number gets the message. Consider the graphic below (shamelessly borrowed from O'Reilly) which shows a sender and a receiver. The receiver is logged in twice, once on his laptop with a priority 1, and once on his desktop with a priority 2. The desktop receives the message.

jab_0501.gif

So, if your laptop connection had a priority of 5, your desktop connection a priority of 15, and your work connection a priority of 8, then your desktop would get the message, as it has the highest priority- 15. Easy, no? Wherever you are, you want to make sure that that connection has the highest priority out of all your current connections. That way, you'll get any and all messages that are sent to you. The highest number that you can have is 127, and the lowest 0.

So there you have it. My #1 reason why you should make the switch to Jabber for all your instant messaging needs- changing priority. Can you do this with your legacy protocols? I think not. For me, I run an always-connected centericq in screen on my server. The priority is low at 5 and set to always be away. I use this, as when I'm not at home or work (say in commute), and someone wants to send me an IM, I'm always available, and will be able to retrieve the message as long as I have access to an SSH client. When at home or work, I'm logged into Gajim which is set to a higher priority, to ensure that I receive the message to my current location (home is usually set to 10, and work to 15 (in case I forget to logout of home)). If you check my presence at any given time, usually, you'll see me logged in twice.

{ 12 } Comments