[Standards-JIG] Re: WHACK

Dave Cridland dave at cridland.net
Wed Apr 26 14:29:10 UTC 2006


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.


> 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.

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

Dave.
-- 
           You see things; and you say "Why?"
   But I dream things that never were; and I say "Why not?"
    - George Bernard Shaw



More information about the Standards mailing list