Re: [hybi] WS framing alternative

Greg Wilkins <gregw@webtide.com> Fri, 30 October 2009 03:51 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 5EC913A686A for <hybi@core3.amsl.com>; Thu, 29 Oct 2009 20:51:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.361
X-Spam-Level:
X-Spam-Status: No, score=-2.361 tagged_above=-999 required=5 tests=[AWL=0.238, 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 65pF6wQyk2WY for <hybi@core3.amsl.com>; Thu, 29 Oct 2009 20:51:11 -0700 (PDT)
Received: from mail-yx0-f192.google.com (mail-yx0-f192.google.com [209.85.210.192]) by core3.amsl.com (Postfix) with ESMTP id 60FEC3A67EF for <hybi@ietf.org>; Thu, 29 Oct 2009 20:51:11 -0700 (PDT)
Received: by mail-yx0-f192.google.com with SMTP id 30so2688182yxe.29 for <hybi@ietf.org>; Thu, 29 Oct 2009 20:51:28 -0700 (PDT)
Received: by 10.150.87.4 with SMTP id k4mr1845582ybb.347.1256874688270; Thu, 29 Oct 2009 20:51:28 -0700 (PDT)
Received: from ?10.10.1.9? (60-242-119-126.tpgi.com.au [60.242.119.126]) by mx.google.com with ESMTPS id 16sm645878gxk.15.2009.10.29.20.51.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 29 Oct 2009 20:51:27 -0700 (PDT)
Message-ID: <4AEA62B9.6040201@webtide.com>
Date: Fri, 30 Oct 2009 14:51:21 +1100
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
MIME-Version: 1.0
To: Jamie Lokier <jamie@shareable.org>
References: <8B0A9FCBB9832F43971E38010638454F0F1EA72C@SISPE7MB1.commscope.com> <Pine.LNX.4.62.0910270903080.9145@hixie.dreamhostps.com> <a9699fd20910270426u4aa508cepf557b362025ae5db@mail.gmail.com> <Pine.LNX.4.62.0910271824200.25616@hixie.dreamhostps.com> <4AE76137.8000603@webtide.com> <Pine.LNX.4.62.0910272118590.25608@hixie.dreamhostps.com> <20091029123121.GA24268@almeida.jinsky.com> <4AEA0E6C.1060607@webtide.com> <20091030025321.GD20292@shareable.org>
In-Reply-To: <20091030025321.GD20292@shareable.org>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] WS framing alternative
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: Fri, 30 Oct 2009 03:51:12 -0000

Jamie Lokier wrote:
> Let's not get confused about what will and won't work.
> 
> It doesn't matter whether WHATWG sanctions any new frame type or not:
> you can't _use_ a frame type if the other end won't recognise it.
> 
> That's because the message boundaries are determined by recognising
> the frame type byte, then parsing the message in a type-specific way.


Is this true?

The high order byte is currently defined as selecting between
sentinel or length encoding, and the 7 lower order bits are ignored.

So as the spec is written - regardless of the value passed, it
will be one of those 2 framing types.

In essence, the byte is 1 bit framing type and 7 bits undefined.
The 1 bit is also indicating content-type (or at least content-encoding),
which is a strange mix of purposes.

I hope I'm right because if what you say is true, a server might
eventually have to implement up to 256 different framing types!

... and as much as I'm able to endlessly debate the benefits of
one framing type over another, I really don't care that much.
Can't we just pick one and use it!   If the sentinel framing
was good enough to carry anything, then I could live with it.
But it's not, so let's just do length encoding.

Note also that i think it is very valuable to have a known
framing type, so that intermediaries can know what message
boundaries are and treat them appropriately
either with forwarding data, logging, debugging etc.


regards