[JDEV] Re: Ping protocol for Jabber

Tony Yat-Tung Cheung tony.cheung at asiayeah.com
Tue Jan 6 03:55:36 CST 2004


Hi,

Looking at this problem, it seems it also makes sense to have some 
mechanisms for the servers to make sure the clients are alive.

I am running a Jabber client over GPRS to jabber.org. I found that if I 
break the GPRS connection without breaking the TCP/IP connection 
gracefully, it took close to 30 minutes before jabber.org realizes that 
I am offline.

Does the current jabberd provide any kind of mechanism for making sure 
the clients are still alive?

This problem is not so important for desktop users where they enjoy a 
higher reliability in their network connections, but it is much more 
important for mobile users whose network connections are much more 
unstable. Thus, we would need mechanisms,

1) For clients to make sure servers are alive
2) For servers to make sure clients are alive

There is an older thread "Keep-Alives" which discussed this problem in 
an open-ended way. They have discussed mainly,

1) Using TCP/IP Keep-Alives mechanism
2) Adding a new heartbeart mechanism to Jabber

Is anyone working in this area and wanna give us some advices?

It doesn't seem a problem specific to Jabber and it should be applicable 
to most TCP/IP streaming applications.

Best Regards,
Tony Cheung

Trejkaz Xaoza wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Thu, 1 Jan 2004 12:49, Tony Cheung wrote:
> 
>>Is there any ping mechanism that we could used in Jabber for making sure
>>the connection and the server is alive?
> 
> 
> Normal keep-alives are typically a single space character flushed down the 
> stream.  However I know it isn't truly a ping. :)
> 
> The trivial way to ping is to send a message to your own JID.  If I'm right in 
> interpreting the semantics, a message with no body won't be displayed in a 
> client anyway, so as long as you tag the outgoing message with an 'id' 
> attribute and wait for the incoming message with the same id.
> 
> TX
> 
> - -- 
> 'Every sufficiently advanced technology is indistinguishable from magic' - 
> Arthur C Clarke
> 'Every sufficiently advanced magic is indistinguishable from technology' - Tom 
> Graves
> 
>       Email: Trejkaz Xaoza <trejkaz at xaoza.net>
>    Web site: http://xaoza.net/trejkaz/
>   Jabber ID: trejkaz at jabber.xaoza.net
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3 (GNU/Linux)
> 
> iD8DBQE/86FMmifzwBMPxxoRAkiuAKCVtLa/XwlCBzGhNBQxtogr2RqJXQCgvlfW
> MEv2/HOiaB98pjcv68OpCAA=
> =W7CV
> -----END PGP SIGNATURE-----





More information about the JDev mailing list