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

Ian Hickson <ian@hixie.ch> Tue, 02 February 2010 00:57 UTC

Return-Path: <ian@hixie.ch>
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 C311E3A67F2 for <hybi@core3.amsl.com>; Mon, 1 Feb 2010 16:57:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.396
X-Spam-Level:
X-Spam-Status: No, score=-2.396 tagged_above=-999 required=5 tests=[AWL=0.203, 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 PMD6pC-oP1VR for <hybi@core3.amsl.com>; Mon, 1 Feb 2010 16:57:38 -0800 (PST)
Received: from looneymail-a4.g.dreamhost.com (caibbdcaaaaf.dreamhost.com [208.113.200.5]) by core3.amsl.com (Postfix) with ESMTP id BB68C3A6782 for <hybi@ietf.org>; Mon, 1 Feb 2010 16:57:38 -0800 (PST)
Received: from ps20323.dreamhostps.com (ps20323.dreamhost.com [69.163.222.251]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by looneymail-a4.g.dreamhost.com (Postfix) with ESMTP id 11B9E85CF; Mon, 1 Feb 2010 16:58:15 -0800 (PST)
Date: Tue, 02 Feb 2010 00:58:14 +0000
From: Ian Hickson <ian@hixie.ch>
To: Maciej Stachowiak <mjs@apple.com>
In-Reply-To: <F21A8D9A-1E27-48C8-8818-0BB6872A2CE4@apple.com>
Message-ID: <Pine.LNX.4.64.1002020056460.21600@ps20323.dreamhostps.com>
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> <96935605-E8B8-4718-B60F-570FD2C199E4@apple.com> <Pine.LNX.4.64.1002012354380.3846@ps20323.dreamhostps.com> <F21A8D9A-1E27-48C8-8818-0BB6872A2CE4@apple.com>
Content-Language: en-GB-hixie
Content-Style-Type: text/css
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset="US-ASCII"
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 00:57:39 -0000

On Mon, 1 Feb 2010, Maciej Stachowiak wrote:
> On Feb 1, 2010, at 4:00 PM, Ian Hickson wrote:
> > 
> > On the client side, I agree in principle (at least to ensure that no 
> > client-to-server data is lost in a case where the API is used to send 
> > frames then immediately close the connection). However, what if the 
> > server never closes its side of the connection, even after the client 
> > initiates a close? Should we have some sort of timeout?
> > 
> > On the server side, I don't think there's any point _requiring_ that 
> > the server close gracefully. If the server really doesn't care if data 
> > it just sent is received, e.g. because it knows the client side has 
> > already GC'ed its WebSocket object, then it should just be able to 
> > close abruptly.
> 
> How can the server possibly know that the client has already GC'd its 
> WebSocket object, if the server and not the client is the initiator of 
> the close? (If the client initiates the close, then at least in my 
> proposal there's no extra work for the server.)

The server and the client are typically written by the same person. If the 
client sends a message in the subprotocol saying "ok after this I'm 
throwing away all references to the object", then the server can know that 
there's no point sending further data.

I'm not saying this is good practice, I'm just saying that there's no 
point making such practice non-conforming.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'