[JDEV] Heartbeat patch for dialup and laptop users and faulty presence info

Tijl Houtbeckers tijl at druppel.nl
Wed May 29 10:02:16 CDT 2002


---------- Original Message ----------
>Please take note, what I'm suggesting is a configurable option, not a 
>required protocol change.  In fact, in the patch I submitted the 
>heartbeat option is turned off by default (a mistake in my mind, but I 
>wanted to be polite).  

I think your problem should be fixed as well, but if this is the way I think  it should be 
turned off by default.

>The biggest argument I've heard so far is that ping/pongs would take too 
>much bandwidth.  If your end users would prefer very slightly less 
>bandwidth used yet LOST MESSAGES AND FAULTY PRESENCE info, well, you got 
>different users than mine.

This is not my argument against it, my argument is that right now there is nothing in 
the jabber protocol that requires a client to respond to any packet within a surthen 
amount of time (expect during login maybe). The only thing it has to do is keep it's 
TCP connection open. This means you can for example buffer the data on the client 
side till the client is available for processing it. (Perhaps this doesn't make sense for a 
desktop instant messaging application but there are lot's of situtations in wich this 
happens, for example a GPRS link). Forcing any kind of ping/pong mechanism on 
these clients will break them in a way you often can't fix.

>So unless some new solution comes up (my ears are open!), I'm going to 
>continue down the ping/pong solution.  If anyone wants to help design 
>this such that minimum bandwidth is consumed, I'd be happy to entertain 
>further discussion along those lines.

Maybe letting the client indicate that it actually wants to have this kind of monitoring 
(and letting is specify under wich terms, like wich interval) will be the most usefull. It 
can be enabled in the server by default then, without breaking any excisting clients. If 
there is an admin outthere who doesn't want to "waste" bandwidth on proper 
presence info he/she can turn the feature off or set the minimum interval higher.
I also recommend this type of monitoring is done with proper XML, since a lot of the 
bandwidth here goes lost on IP and TCP headers, not the actual content of the 
package (so wether it's " " or "<ping id='123'>" or "<iq id='124' 
type='result'><pong/></iq>" doesn't matter *that* much).

Takes more time to write a patch for though :(




More information about the JDev mailing list