[Standards-JIG] Re: WHACK

Michal vorner Vaner michal.vaner at kdemail.net
Wed Apr 26 15:12:25 UTC 2006

On Wed, Apr 26, 2006 at 03:29:10PM +0100, Dave Cridland wrote:
> On Wed Apr 26 15:17:34 2006, Michal vorner Vaner wrote:
> >Forsdtly, any use transport protocol, being it TCP, HTTP polling or
> >whatever, guarantees you will not lose any data "in the middle" and 
> >you
> >get them in order.
> Agreed.
> >That means, if you receive something, you received for sure all 
> >what was
> >sent before. If we use this, the only place, where data can be lost 
> >is
> >on the end. And it is usually only when the connection died.
> >
> >
> Ah... Yes, but...
> >So, if I get something from the other side right now, then the
> >connection is not dead and the other one almost for sure got his 
> >data as
> >well. So I can expect I did route what I was supposed until this 
> >point.
> >
> >
> No, because data can cross on the wire - TCP is full duplex, so if 
> you receive data over a connection that has a 100ms latency, the best 
> you know is that the remote end was not aware of an error at some 
> point up to 100ms ago. It doesn't say much about whether the data you 
> sent a few ms back is safe or not, whether that was 10ms or 1000ms.

Well, that is why I wrote almost. I know there is this few ms time,
where the message could still get lost, but it is quite difference to
the TCP timeout of 15 minutes on many servers. And, in the time you
receive the data, the line is probably useable and the data can flow in
both directions. This was ment as a compromise between complicity and
the problem.

> >Therefore, whenever I get _any_ data, I can take is as an ack that 
> >it
> >was sent. Clients would be allowed to send whitespace pings as they 
> >want
> >(if it got to server, it is almost sure they got their data as 
> >well).
> >They would only have to respond by something allowed on any stanza, 
> >but
> >it would not matter if it was whitespace ack or any stanza (for 
> >example,
> >there is no need to ack a stanza that has a response) or it could 
> >ack
> >more stanza at once.
> >
> >
> Two problems here:
> Firstly, this would mean there was no connection between the stanza 
> you were sending and the ack, so there's no way of knowing whether 
> the stanza you receive is also an ack for the stanza you sent, or 
> whether it just happened to arrive at more or less the right time.

Well, the whitespaces would be used, therefore thoy would not be
considered stanza, but they would be data, therefore acking everything
before. Acking by stanza was ment like sending another, unrelated stanza
and the ack would be implicit by the data, as a side effect of the

> Secondly, if you never get an ACK, you don't know if the stanza you 
> sent was lost, or the ACK was lost.

Well, but this is problem of quite any acking, thet if you do not get
ack, you do not know what of these two got lost. But, as said, it
happens only when the connection dies and I guess receiving a message
twice is generally better than not receiving it at all. And the more
probable thing on TCP (or whatever) is that the messages got lost, since
the acking would be in short sequence after the message.

Anyway, it was just an idea, I thought someone could like it. Maybe not,
it does not matter..


NAT should extinkt like dinosaurs did.

Michal "vorner" Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.jabber.org/pipermail/standards/attachments/20060426/a91532cb/attachment.sig>

More information about the Standards mailing list