I don't see this as being the client's job. Perhaps the protocol could be changed to either make more assumptions such as "if the s2s connection is closed unexpectedly, then the server SHOULD consider all jids connected to it as offline" and perhaps even the suggestion of "If an available jid has not sent any presence updates in an hour, the server SHOULD probe for an update." The protocol provides methods to solve this problem on the server end. I don't believe that the client should take it upon itself to nag about presence, as presence is high traffic enough as it is.
<br><br>The problem boils down to s2s not having specific recommendations on what to assume about presence, nor what to do when there are connectivity issues.<br><br><div><span class="gmail_quote">On 4/20/07, <b class="gmail_sendername">
Robin Redeker</b> <<a href="mailto:elmex@x-paste.de">elmex@x-paste.de</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Sat, Apr 21, 2007 at 04:38:02AM +1000, Bruce Campbell wrote:<br>><br>> This more of a 'what are people doing now' question, not a 'what should<br>> the implementations be doing'.<br>><br>> Lets say that my Jabber client has an avid desire to know the accurate
<br>> online status of remote JIDs, and the roster subscriptions are 'both'.<br><br>I don't think there is anything wrong or weird with that desire :-)<br>It seems to me that this is what XMPP (Extensible Messaging and >Presence< Protocol)
<br>was invented for...<br><br>If it is not possible to know a mostly accurate status if anything unexpected<br>happens (even if the TCP connection breaks I at least know that<br>I don't know the presence state), then there is something deeply broken :-)
<br><br>> To that end, my client makes the assumption that if no update to the status<br>> has been received in an hour, then something has possibly happened to the<br>> remote JID that hasn't been properly pushed to my client (remote server
<br>> restart normally ).<br>><br>> How should my Jabber _client_ get the latest news about the remote JID?<br><br>That is an interesting problem. I'm currently also writing a client<br>but I haven't thought of that problem yet. If the remote server reboots
<br>noone will be noticed of any presence changes (eg. client became<br>unavailable).<br><br>That indeed means clients have to probe on their own. But the<br>RFC unfortunately says: 'probe -- A request for an entity's current
<br>presence; SHOULD be generated only by a server on behalf of a user.'<br>(RFC 3921 2.2.1 Types of Presence)<br><br><br>> The solutions that I've tried to get this information are:<br>><br>> A) Presence probes. Swallowed by some servers.
<br>> <presence to='<a href="mailto:remoteJID@some.where">remoteJID@some.where</a>' type='probe'/><br>> or<br>> <presence to='<a href="mailto:remoteJID@some.where">remoteJID@some.where
</a>' from='<a href="mailto:me@my.domain">me@my.domain</a>'<br>> type='probe'/><br>><br>> B) Directed presence saying unavailable then available again.<br>> <presence to='
<a href="mailto:remoteJID@some.where">remoteJID@some.where</a>' type='unavailable'/><br>> <presence to='<a href="mailto:remoteJID@some.where">remoteJID@some.where</a>'/><br>><br>> C) Subscribe to their presence again.
<br>> <presence to='<a href="mailto:remoteJID@some.where">remoteJID@some.where</a>' type='subscribe'/><br><br>Uh, thats ugly but I like that more than B) or D) :-)<br><br>> D) Unavailable then available again to the entire roster.
<br>> <presence type='unavailable/><presence/><br>><br>> Of these, the 'subscribe' trick seems to be the most consistent at<br>> returning the desired information. 'probe's seem to get swallowed by a
<br>> number of servers, and appearing to go offline and online again just<br>> irritates the remote users.<br><br>Heh, I agree completly that this is indeed not very nice.<br><br>> Any other tricks that people use?
<br><br>I would rather see this issue resolved than seeing 'tricks' that<br>'somehow' work or introduce weird behaviour (like D) or B)).<br><br><br>Greetings,<br> Robin<br></blockquote></div><br>