[JDEV] priority question

Casey Crabb debug at nafai.dyndns.org
Tue Apr 16 22:36:16 CDT 2002


In my answers here I'll assume you are talking about a transport component 
dealing with a JID from multiple resources. These answers are my opinion 
only.

Here's a couple of the questions I'm wondering

- What is the behavior when a lower-priority resource changes presence?

The presence broadcast through the transport is always the presence of the 
resource with highest priority. If a resource with lower priority changes 
status, nothing changes on the transport side.


- What is the behavior when a lower-priority resource changes to the 
highest priority, or vice-versa? (keep in mind that some clients change 
priority when they go auto-away, and any presence change within a priority 
level makes that client have the highest priority)

Again, the primary presence broadcast should be the presence of the 
resource with highest priority.

- What is the behavior when the highest-priority resource logs out? (I'm 
assuming a lower-priority resource is ignored)

The transport looks for the resource with next-highest priority and 
transmits it's presence if it is different from the presence of the 
resource that just logged out.


- How should invisible mode interact, in both the case where the remote 
system does and does not support invisible mode?

In the case where it does support invisible:
Broadcast the presence of the resource with the highest priority.

In the case where it does not support invisible:
(this one I'm not quite sure about)
Broadcast unavailable, even if lower priorities have non-invisible status.

- What is the correct behavior when a message is sent from a resource 
which is not the highest priority?

Replies should always go to the resource from which they were sent, that 
said it is difficult to determine if something is a reply through a 
transport. Therefore I would suggest the following:

if a message from bob at jabber.org/lowpriority is sent to a 
bob at aim.jabber.org Then a message coming from bob at aim.jabber.org to 
bob at jabber.org would go to bob at jabber.org/lowpriority under the following 
conditions:
Only a small amount of time from the original message to the 'reply' has 
elapsed
bob at jabber.org/lowpriority is still available.

otherwise it would go to the resource with highest priority.

Messages coming from all other aim users to bob at jabber.org will go to the 
resource with highest priority.



I hope I was clear enough to understand.

--
Casey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2639 bytes
Desc: not available
URL: <https://www.jabber.org/jdev/attachments/20020416/d377aa6f/attachment-0002.bin>


More information about the JDev mailing list