Re: [hybi] Framing take IV

Ian Hickson <ian@hixie.ch> Wed, 04 August 2010 04:12 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 513BE3A6BA8 for <hybi@core3.amsl.com>; Tue, 3 Aug 2010 21:12:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.505
X-Spam-Level:
X-Spam-Status: No, score=-2.505 tagged_above=-999 required=5 tests=[AWL=0.094, 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 NToFwb9a612D for <hybi@core3.amsl.com>; Tue, 3 Aug 2010 21:12:43 -0700 (PDT)
Received: from homiemail-a44.g.dreamhost.com (caibbdcaaaaf.dreamhost.com [208.113.200.5]) by core3.amsl.com (Postfix) with ESMTP id 9D5E13A69CB for <hybi@ietf.org>; Tue, 3 Aug 2010 21:12:43 -0700 (PDT)
Received: from homiemail-a44.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a44.g.dreamhost.com (Postfix) with ESMTP id 65158118064; Tue, 3 Aug 2010 21:13:12 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; c=nofws; d=hixie.ch; h=date:from:to:cc :subject:in-reply-to:message-id:references:mime-version: content-type; q=dns; s=hixie.ch; b=mzOSyCA1O2hTasKpXWPq24uuTzM4s BsdBQLw1UGWyMuqHOa+cD8vUfWbDG7KdpBTmjdK2ar2zRWhavU3KCLmPhOg/jzkc YO00I72ZHFO/CnM7bUz1h/AqHLfZO/MLqDnHDm9kYK/JcSRGMfsCFPxvkTmy4Swy BdUjZvGlBHg0mc=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=hixie.ch; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version: content-type; s=hixie.ch; bh=WWWr7PPosII4mfoZlOaMIFxpkRo=; b=ROr TjfyUeGqUWtjOb+zBAXmtIP317FEYaRN0niT+S4582xCBTgAAPgLKXW4UBOrE/uS +3rHmoSC+B5TrpiP3J4I6dsrLG5Q3FSlygKvb1OPWOc9fZLkD81GZa7RqwRUsv9p pEtfI+wlqClAmJRfPpBjGmaf8XmQJxckfGbv23EQ=
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) (Authenticated sender: internal@index.hixie.ch) by homiemail-a44.g.dreamhost.com (Postfix) with ESMTPSA id 5EBF0118060; Tue, 3 Aug 2010 21:13:12 -0700 (PDT)
Date: Wed, 04 Aug 2010 04:13:12 +0000
From: Ian Hickson <ian@hixie.ch>
To: Scott Ferguson <ferg@caucho.com>
In-Reply-To: <4C58C4C8.5020900@caucho.com>
Message-ID: <Pine.LNX.4.64.1008040139520.5947@ps20323.dreamhostps.com>
References: <AANLkTinyrDoG5d_Ur6HVRy=SgMPjLzJtpJ++Ye=1DQdj@mail.gmail.com> <Pine.LNX.4.64.1008040050040.5947@ps20323.dreamhostps.com> <28A6543A-5CA6-42B7-8D2E-F5511EE20008@apple.com> <4C58C2F6.8050608@caucho.com> <Pine.LNX.4.64.1008040132190.5947@ps20323.dreamhostps.com> <4C58C4C8.5020900@caucho.com>
Content-Language: en-GB-hixie
Content-Style-Type: text/css
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset="US-ASCII"
Cc: hybi@ietf.org
Subject: Re: [hybi] Framing take IV
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: Wed, 04 Aug 2010 04:12:45 -0000

On Tue, 3 Aug 2010, Scott Ferguson wrote:
> Ian Hickson wrote:
> > On Tue, 3 Aug 2010, Scott Ferguson wrote:
> > > >   I agree. I can't see any benefit to fragmentation over a 
> > > > variable-size length field for an initial version without 
> > > > multiplexing. If the variable-size length field is well-designed, 
> > > > then in the common case where the message size is small it will 
> > > > only cost one extra branch to read the length. In the rare case 
> > > > where the message size is large, a variable-size length is easier 
> > > > to deal with than reassembling fragments, and easier on the 
> > > > sending side too.
> > >
> > > Some of us don't have infinite memory when sending messages.
> > 
> > Why do you need infinite memory?
> 
> Because we don't know the length of dynamically produced content until 
> the dynamic process is complete. That's why HTTP added chunking.

Is this a common case we should expect? What are the use cases for this?

If this is a rare occurence, then it's probably simplest to support this 
at the application layer - nothing stops anyone from having a subprotocol 
that defines the first byte/character of each message as being a 
"has continuation" byte.

If this is a common occurance, then we'll be able to tell when people find 
themselves often implementing this at the application layer, and then we 
can easily add it at the WebSocket layer at that time (in a few months). 
We don't need to reserve bits specifically for it today.

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