XMPP Resources

Revision as of 16:40, 23 February 2010 by Nyco (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In Jabber you are able to log in several client programs simultaneously. You don't need to have different Jabber accounts for work and for home. You can chat at home, then go to work, log in again with the same JID and your home Jabber client will not go offline after that.

This is because Jabber has a thing named resources. When you log in, you are usually asked for for the Resource Name. For example, you could have a resource "Home" at your home Jabber client and "Work" at you work client. Some programs like to use their names as a resource name, for example: "iChat", "GAIM".

When other people look at "you" in their rosters, they usually see a list of resources you are available through. They could send a message to your particular resource, using these JIDs: you@jabber.org/Home or you@jabber.org/Work. You could even log in twice at the same computer through different Jabber clients and chat between different incarnations of yourself!

But when Romeo sends a message to Juliet using her usual JID juliet@capulet.com, how she will actually receive a message - through juliet@capulet.com/balcony or through juliet@capulet.com/bedroom?

User can set different priorities for his/her resources. A priority of resource shows user's availability through this resource. When you are at home, you have "Available" status in your home Jabber client and high priority for it. When you are at work, your home Jabber client probably have status "Extended away" and low priority, while your work client is "Available". So all messages for you are coming to your work client.


Let's imagine you working at your office. At 2:00 PM you decide to go to lunch. You lock your computer causing your Jabber client to fall into "Away" status. But on your way to a restaurant you could start small J2ME Jabber application at your cellphone (for example, mobber or Bombus). So now you are "Available" again, and all messages will be delivered to your phone while you are out of the office. You come to a restaurant and make an order. Wow, there is a free Wi-Fi service at the restaurant! So you load your PDA and connect. One more of your Jabber client starts, and now you already have at least three available resources at your resource list: "work" (office PC), "cellphone" and "pda". Both "cellphone" and "pda" have "Available" status. You probably prefer chatting through PDA because it has larger screen, easier text input and free Wi-Fi access. So PDA should have higher priority than cellphone for the same status.

Most Jabber clients allow you to tune priority values for every status. Cellphone clients often have predefined priority values that are lower than usual. Check some Additional Settings at your Jabber client!

Template:Technical Page