[jdev] That presence problem again

Bruce Campbell b+jabber at bruce-2007.zerlargal.org
Fri Apr 20 13:38:02 CDT 2007


This more of a 'what are people doing now' question, not a 'what should 
the implementations be doing'.

Lets say that my Jabber client has an avid desire to know the accurate 
online status of remote JIDs, and the roster subscriptions are 'both'.  To 
that end, my client makes the assumption that if no update to the status 
has been received in an hour, then something has possibly happened to the 
remote JID that hasn't been properly pushed to my client (remote server 
restart normally ).

How should my Jabber _client_ get the latest news about the remote JID?

The solutions that I've tried to get this information are:

   A) Presence probes.  Swallowed by some servers.
 	<presence to='remoteJID at some.where' type='probe'/>
       or
 	<presence to='remoteJID at some.where' from='me at my.domain' type='probe'/>

   B) Directed presence saying unavailable then available again.
 	<presence to='remoteJID at some.where' type='unavailable'/>
 	<presence to='remoteJID at some.where'/>

   C) Subscribe to their presence again.
 	<presence to='remoteJID at some.where' type='subscribe'/>

and finally (this far less frequently than anything directed at a given 
JID):

   D) Unavailable then available again to the entire roster.
 	<presence type='unavailable/><presence/>

Of these, the 'subscribe' trick seems to be the most consistent at 
returning the desired information.  'probe's seem to get swallowed by a 
number of servers, and appearing to go offline and online again just 
irritates the remote users.

Any other tricks that people use?

-- 
   Bruce Campbell.



More information about the JDev mailing list