Re: [hybi] Reliable message delivery (was Re: Technical feedback.)

Greg Wilkins <gregw@webtide.com> Tue, 02 February 2010 22:34 UTC

Return-Path: <gregw@webtide.com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 962733A6B2E for <hybi@core3.amsl.com>; Tue, 2 Feb 2010 14:34:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.493
X-Spam-Level:
X-Spam-Status: No, score=-2.493 tagged_above=-999 required=5 tests=[AWL=0.106, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8dp399mMsW3D for <hybi@core3.amsl.com>; Tue, 2 Feb 2010 14:34:54 -0800 (PST)
Received: from mail-bw0-f219.google.com (mail-bw0-f219.google.com [209.85.218.219]) by core3.amsl.com (Postfix) with ESMTP id 763D63A68B6 for <hybi@ietf.org>; Tue, 2 Feb 2010 14:34:54 -0800 (PST)
Received: by bwz19 with SMTP id 19so562145bwz.28 for <hybi@ietf.org>; Tue, 02 Feb 2010 14:35:29 -0800 (PST)
Received: by 10.204.29.17 with SMTP id o17mr4510330bkc.184.1265150128941; Tue, 02 Feb 2010 14:35:28 -0800 (PST)
Received: from ?10.10.1.11? (60-242-119-126.tpgi.com.au [60.242.119.126]) by mx.google.com with ESMTPS id 16sm2965294bwz.11.2010.02.02.14.35.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 02 Feb 2010 14:35:27 -0800 (PST)
Message-ID: <4B68A8A7.80709@webtide.com>
Date: Wed, 03 Feb 2010 09:35:19 +1100
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
MIME-Version: 1.0
To: Francis Brosnan Blazquez <francis@aspl.es>
References: <4B62C5FE.8090904@it.aoyama.ac.jp> <4B62E516.2010003@webtide.com> <5c902b9e1001290756r3f585204h32cacd6e64fbebaa@mail.gmail.com> <4B636757.3040307@webtide.com> <8449BE19-3061-4512-B563-02973FBB707B@apple.com> <5c902b9e1001292310l5442d476n8375139f3480671b@mail.gmail.com> <26D406E7-2319-476E-9ADF-80D84200C270@apple.com> <5c902b9e1001292333k79569316lf371938c9aa766@mail.gmail.com> <128BFD31-9835-47B1-B7A9-F20F5CDA8D8C@apple.com> <20100130144936.GD19124@shareable.org> <5c902b9e1001301552n6efb7969o34110373e3ab4945@mail.gmail.com> <4B672C9D.9010205@ericsson.com> <op.u7gy9bag64w2qv@annevk-t60> <4B675CA6.2070406@webtide.com> <op.u7g04dun64w2qv@annevk-t60> <4B676ABE.9060901@webtide.com> <op.u7g30dfu64w2qv@annevk-t60> <4B676FCA.9070506@webtide.com> <1265135155.4450.556.camel@vulcan.aspl.local>
In-Reply-To: <1265135155.4450.556.camel@vulcan.aspl.local>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Reliable message delivery (was Re: Technical feedback.)
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Feb 2010 22:34:55 -0000

Francis,

I'm all for protocol layering and if features can be
implemented in a subprotocol, then they probably should be.

However, we don't want to force subprotocols into having to
re-implement TCP with timeouts, keep-alives, acks etc.
if a few simple features in the base protocol can expose
more of TCP/IP's capabilities to the layered protocol.



In the case of orderly close, a layered protocol
could implement its own orderly close.  But it would
still have a problem with error closes, as the
servers response to all sorts of issues is simply
to close the socket.

If my layered protocol does:

  websocket.send(moderatelyLargeMessage)

and then receives a onclose callback before any
acks or orderly close are received, then the layered
protocol knows there has been a failure, but does not
know the cause.  So it will probably open another
connection and send the moderatelyLargeMessage again....
and again... and again....

If it new that the message was being rejected by
the other endpoint rather than a network failure,
then it would know not to retry.

The same problem goes if the user opens too many
tabs and exceeds some connection limit on the
server. The sub protocol will be unable to tell
the difference between that and network failure.



TCP is a reliable transport, but if a layered protocol
is unable to see the difference between an orderly close,
and error close and a network failure, then it cannot use
TCP reliably.

If I do a websocket.send(message) and then a short
time later I get a websocket.onclose() call back, then
I have no idea if that message was delivered.

So websockets is obscuring the reliable capabilities
of TCP.     As I've said before, it's more like
webserialport than websocket and subprotocols will
need to be more complex as a result.


regards





Francis Brosnan Blazquez wrote:
> Hi Greg,
> 
>> TCP does have  difference between an orderly shutdown (FIN),
>> error shutdown (RST) and timeouts.
>>
>> So if you want to be like TCP, then you'll have those
>> concepts.
> 
> Why not?
> 
> I think people is interested on Websocket because they will layer its
> favourite protocol on top of it. I not stating I'm against this but I
> still don't see this point and how it would improve the protocol...
> 
> In other words, people that cares about orderly close will use a
> protocol on top of Websocket that provides graceful close (like BEEP)
> and people that do not cares about this will have an additional feature
> not requested....so it looks to me both kind of users won't use this.