[Standards-JIG] Re: WHACK
stpeter at jabber.org
Tue Apr 25 21:39:54 UTC 2006
-----BEGIN PGP SIGNED MESSAGE-----
Maciek Niedzielski wrote:
> Peter Saint-Andre wrote:
>>> Kevin mentioned to me an alternative approach, which he swears is also
>>> Justin's idea -- whitespace acks (since I like fun names for things, I
>>> dub these "whacks"). Whenever an entity receives a stanza, it sends one
>>> whitespace character ("whack") to the immediate sender.
> Isn't this a bit abusing whitespace-something?
One person's abuse is another person's elegant solution.
> What if your client would send a whitespace ping just before receiving
> my message, and then the connection would break, without delivering the
> message? Your server could assume that your ping was receiving confirmation.
That's an edge case, see below.
> The problem - in my opinion - that some clients/servers already send
> whitespace meaning something else than receiving confirmation.
Whitespace pings are currently sent by servers to test whether a TCP
connection is still alive. I don't know of any clients that send
whitespace pings, but it's possible there are some.
So let's look at your edge case:
1. My client sends a stanza (intended for you) to my server.
2. My server sends a whack to my client.
3. My server routes the stanza to your server.
4. Your server sends a whack to my server.
5. Your client sends a whitespace ping ("whing") to your server because
it has been inactive for 60 seconds or whatever.
6. Your connection goes down.
7. Your server tries to route my stanza to your client but the message
is not delivered (because the connection is down) *and* your server
thinks that the whing it received before is a whack for the stanza.
But why would your server consider the whing that it received before
delivering the stanza to your client to be a whack? You may say that it
is *possible* for the following order to occur:
5'. Your server tries to route my stanza to your client.
6'. After your server tries to route my stanza to your client but before
your client receives the stanza, your client sends a whitespace ping to
your server because it has been inactive for 60 seconds or whatever.
7'. Your connection goes down and your client does not receive the
stanza but manages to send off the whitespace ping just before the
connection goes down.
Result: your server considers the whing to be a whack.
That still seems like a real edge case (given that clients right now are
not sending whings as far as I know), but yes if that scenario happens
then the message is lost. But I think that is quite unlikely -- if our
only problem is total edge cases, then we're better off than we are today.
One possible solution: no client-generated whitespace pings allowed.
Jabber Software Foundation
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3641 bytes
Desc: S/MIME Cryptographic Signature
More information about the Standards