[JDEV] Heartbeat patch for dialup and laptop users and faulty presence info
Nathan Sharp
spamnps+jabber at phoenix-int.com
Wed May 29 11:19:55 CDT 2002
admin at jabber.fsinf.de wrote:
>Well, in case anyone has a better idea he is free to contribute. For the
>time being your solution seems okay especially for it does not need
>protocol or client changes.
>
Just a quick note here. The solution I submitted as a patch is a PING
only solution, which is good because I can implement it now w/o protocol
or client changes, although it still has a 10-20 minute window for
noticing disconnects. The solution I'm proposing is a PING/PONG
solution which will require changes to both the protocol and clients in
order to be useful. I do plan, however, to make it an optional feature
for the client (i.e. the server can deal w/ older clients). I'm taking
note of all this input and will work up a design document when I get a
chance (may take a while, maybe not, just depends on my spare time...).
>Even with your patch messages may get lost. One should implement sending
>of an error message or offline storage of the message that failed (if
>possible).
>
Unfortunately, unless the protocol is changed such that the client sends
an acknowledgement of receiving a message (this is unlikely to happen),
there is no way to capture the lost packets. The way TCP/IP is
implemented, any data that is queued up in the send buffers (possibly on
remote computers, remember), is just lost once the connection is noticed
as dead. There is really no way to know the difference between a packet
that made it through just before the disconnect to one that didn't make
it through just after a disconnect (in my knowledge, which is probably
incomplete). That is one more reason that it is important to notice
quickly when a client disconnects.
Nathan
More information about the JDev
mailing list