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, 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.


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

  1. Bogomips | July 11, 2007 at 8:45 am | Permalink

    XMPP is just full of neat stuff 🙂 I don't use priorities very much myself, especially since there's offline message support. I don't need to be logged in all the time to make sure I receive all the messages addressed to me.

    You should also have explained resources, as it goes hand in hand with priorities in determining where a message will get routed to.

  2. Kevin | July 11, 2007 at 6:49 pm | Permalink

    Well you've already convinced me that its better. Only problem is, is that all my contacts are on msn. And convincing some of them who think "msn is the only IM there is cause that what windows had" could be a little difficult.

  3. Al | July 11, 2007 at 10:56 pm | Permalink

    Interesting... still, offline message support in ICQ, Skype, MSN, Yahoo, and probably a dozen other, makes priorities a bit redundant. I'd much rather log in from wherever I am and receive all the messages I've been sent while away, than have to ssh into different machines to check them (essentially like emails). It also helps keep your message history central - at least to that particular time period when you weren't logged in.

  4. Aaron | July 12, 2007 at 7:19 am | Permalink

    @Bogomips- Offline message support is a wonderful feature, but unfortunately, not al XMPP/Jabber providers support it. And a post on resources is forthcoming.

    @Kevin- Converting friends and family to XMPP/Jabber as well, can be a pain. Fortunately, this issue is resolved through transports, which is also in a forthcoming post.

    @Al- Offline messaging really doesn't relate much to priorities. Priorities, coupled with resources allow you to be logged in more than once, completely transparently to users in your roster. Offline messaging is built into XMPP/Jabber as well, but as mentioned above, not all providers support it. And, with keeping a central message history, I'm not worried about that too much, so my priorities in using IM are different.

  5. russ | July 12, 2007 at 12:13 pm | Permalink

    A while back I tried setting up a Jabber server (on Ubuntu, of course) but didn't have any luck. Any info on that?

  6. Everett | July 12, 2007 at 3:02 pm | Permalink

    AIM has supported multiple simultaneous sessions for years now. Not sure about the other major protocols.

  7. Aaron | July 12, 2007 at 4:33 pm | Permalink

    @Everett- I've had an AIM account, and I never remember it supporting multiple connections. Every time I ran the client, it would disconnect the other. However, if it does (and I was doing something wrong), how does it know where to send the message without setting priorities?

  8. Jason | July 12, 2007 at 4:44 pm | Permalink

    Start educating. Giving up prematurely isn't any better.

    AIM doesn't have it.
    Also, your second sentence tells me you misunderstood something:
    "I’d much rather log in from wherever I am and receive all the messages I’ve been sent while away, than have to ssh into different machines to check them (essentially like emails)."
    You don't have to tunnel everywhere to get your offline messages.
    If you are offline, and messages are queued, whenever you log in, from anywhere, you receive them.

    Regarding central log storage; GMail/GTalk already does this, and there's a XEP in the works to address this on a more broad scale.

    Simultaneous Sessions is only one part of the grand scheme of things. AIM doesn't do offline message delivery.

    It does, and there are some general circumstances. I think it's also a TOC vs. OSCAR thing, but I'm not sure.

    It sends the messages to all sessions, at all times.
    There is no logic to it.

    By the way, what is your Jabber address? 😛

  9. Aaron | July 12, 2007 at 4:48 pm | Permalink

    @Jason- Jabber here in my colophon page. Feel free to add me to your roster anytime.

  10. Anonymous | July 13, 2007 at 10:32 am | Permalink

    @#8 When signing into a second AIM session, you'll receive an IM notifying you that you're signed in to multiple locations, and that you can disconnect the other session, if you'd like, by replying to that IM with a certain number.

    I believe that on AIM, incoming IMs will be sent to all connected clients, though outgoing ones won't be mirrored in such a way.

  11. vonderer | July 16, 2007 at 9:32 am | Permalink

    Good time of the day. 🙂
    Nice posts about Jabber, thank you very much. Don't you mind if I translate your posts about XMPP into Russian and post them at my blog? Of course, links to your posts will be given and you will be mentioned as original author of the posts.

  12. Aaron | July 16, 2007 at 9:40 am | Permalink

    @vonderer- YES!! That would be wonderful! As long as the license is adhered, I have absolutely no problem with it, and hope that people would redistribute my content as often as they wish under the terms of that license.

{ 2 } Trackbacks

  1. [...] Link to Article drm Why XMPP Part 1- It’s All About Priority » Posted at Aaron Toponce on [...]

  2. [...] Оригінал: “Why XMPP Part 1- It’s All About Priority”, Aaron [...]

Post a Comment

Your email is never published nor shared.