[Standards-JIG] Presence priority Question

Venkat Mani venkat.m at geodesiconline.com
Fri Feb 3 04:54:27 UTC 2006

Hi All,


I have been facing a peculiar problem while developing a jabber client. This
problem relates to the presence priority being set by clients. Here is a
typical scenario that occurs, using different client implementations in each
case. I have used pandion, gaim and mundu(native implementation)  to test
out the same.


1.	Login from home using pandion, priority set to 8.   JID
<mailto:–venkat.m at geodesiconline.com/home> –xyz at server/home  
2.	Login from office using gaim, priority set to 0.  JID
<mailto:–venkat.m at geodesiconline.com/office> –xyz at server/office
3.	Login from pda using mundu, priority set to 0.    JID
<mailto:–venkat.m at geodesiconline.com/pda> –xyz at server/pda


RFC 3921 section states


“For message stanzas, the server SHOULD deliver the stanza to the
highest-priority available resource (if the resource did
not provide a value for the <priority/> element, the server SHOULD consider
it to have provided a value of zero).  If two
or more available resources have the same priority, the server MAY use some
other rule (e.g., most recent connect
time, most recent activity time, or highest availability as determined by
some hierarchy of <show/> values) to choose
between them or MAY deliver the message to all such resources.  However, the
server MUST NOT deliver the stanza 
to an available resource with a negative priority; if the only available
resource has a negative priority, the server
SHOULD handle the message as if there were no available resources” 


This implies that any message sent to xyz at server will ALWAYS be sent by the
‘server’ to the user logged in from ‘home’ resource assuming that xyz is
present and available at ‘home’ since it has the highest priority. This
might not guarantee that the message is delivered to the right resource, the
user may be on the move and only messages sent to xyz at server/pda will reach
the user instantly. The problem is compounded by the fact that most client
implementations (eg pandio,gaim) do not have a provision to allow users to
set their presence priorities and it is left to the client implementation to
set the same.



This brings me to my question


Should it be left to client implementations to figure out from which
resource a user is currently active by sending a message to each and every
available resource from which he is connected ? .Or should it be the
server’s prerogative to send the message stanza to all connected resources
having priority greater than or equal to 0 ? . If the answer is no on both
counts ,should there be a guideline for client implementations on setting
presence priorities?


My apologies if the question sounds naïve.






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/standards/attachments/20060203/85e1b808/attachment.html>

More information about the Standards mailing list