Re: [hybi] Framing proposal with start/end demarcation

Greg Wilkins <gregw@webtide.com> Mon, 09 August 2010 09:35 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 7D32C3A677C for <hybi@core3.amsl.com>; Mon, 9 Aug 2010 02:35:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.749
X-Spam-Level:
X-Spam-Status: No, score=-1.749 tagged_above=-999 required=5 tests=[AWL=0.228, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 8dWUCF3eoAwe for <hybi@core3.amsl.com>; Mon, 9 Aug 2010 02:35:22 -0700 (PDT)
Received: from mail-bw0-f44.google.com (mail-bw0-f44.google.com [209.85.214.44]) by core3.amsl.com (Postfix) with ESMTP id 088063A6783 for <hybi@ietf.org>; Mon, 9 Aug 2010 02:35:21 -0700 (PDT)
Received: by bwz10 with SMTP id 10so1434916bwz.31 for <hybi@ietf.org>; Mon, 09 Aug 2010 02:35:55 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.223.115.73 with SMTP id h9mr16366001faq.46.1281346555181; Mon, 09 Aug 2010 02:35:55 -0700 (PDT)
Received: by 10.223.57.12 with HTTP; Mon, 9 Aug 2010 02:35:55 -0700 (PDT)
In-Reply-To: <Pine.LNX.4.64.1008090831370.13471@ps20323.dreamhostps.com>
References: <AANLkTikaruGt6pXacHWqF+FAkgXg1uh3kN4RPyay+bnR@mail.gmail.com> <AANLkTik+mEKsZz8-CojnMip1Vpp06f6uutNX3eT6gPpD@mail.gmail.com> <Pine.LNX.4.64.1008041803400.5947@ps20323.dreamhostps.com> <AANLkTinQtkGLf+YvJ5c724nas3xqbRchfHSRkfKoEb5u@mail.gmail.com> <op.vgyd890464w2qv@anne-van-kesterens-macbook-pro.local> <AANLkTin9wTTzrLNSu5AZz+MLx4NT-PHZV0kj8tv4RKm+@mail.gmail.com> <op.vgykq4ul64w2qv@anne-van-kesterens-macbook-pro.local> <AANLkTimu-vCaGtr-+6eZi6P+DdtiCfd2jhzEXXWpCfJi@mail.gmail.com> <op.vgylyrte64w2qv@anne-van-kesterens-macbook-pro.local> <20100805195236.GC27827@shareable.org> <op.vg0al7zb64w2qv@anne-van-kesterens-macbook-pro.local> <AANLkTimbxMF50CmJVVHZ5cZNrvcmPNC7uxUuDf0X9--A@mail.gmail.com> <op.vg5or2vy64w2qv@anne-van-kesterens-macbook-pro.local> <4C5F969A.1070205@mozilla.com> <op.vg5pezp564w2qv@anne-van-kesterens-macbook-pro.local> <4C5F9CF3.3040201@mozilla.com> <AANLkTi=cpGnokvHR5=1uGuq98-uVOnnBAQC6DvRuC7J1@mail.gmail.com> <Pine.LNX.4.64.1008090831370.13471@ps20323.dreamhostps.com>
Date: Mon, 09 Aug 2010 19:35:55 +1000
Message-ID: <AANLkTi=bHcfm_p+Q40GveA_mbWYBAkPwD8vujREFfqeU@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Ian Hickson <ian@hixie.ch>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] Framing proposal with start/end demarcation
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: Mon, 09 Aug 2010 09:35:26 -0000

Ian,

I agree that the current protocol can be extended with new frame types
and achieve the desired no-impact-on intermediaries.

It has been one of the options that I've continually listed, but there
is an issue of the "we" in the mechanism for how it is extended.
Currently there is no mechanism to avoid collisions between new
op-codes other than centrally managing them.

Perhaps that is OK and we will agree than centrally managed op-code
allocation is the preferred extension mechanism.

Alternately we could define an opcode negotiation mechanism, which
would have no impact on the framing, but overcome the central managed
issue.

Another option is to have a pre-allocated mime-frame opcode so that
extensions could use that frame type - again that would have no impact
on the actual framing proposed and code+length+data framing is
sufficient (give or take a debate about how length is encoded).

However, there are others that are concerned that those proposals do
not allow sufficient extended data to be associated with data frames,
as might be needed for some extension (although I think the
mime-frame does allow extended data per frame).   So there are some
proposals about how to have optional extension data in every frame.

So we need to stop bickering about if other peoples use-cases are
valid or not, and start expanding on how our preferred framing
mechanisms can actually address all (or most) of the concerns of all
(or most) that have expressed them.

regards

















On 9 August 2010 18:38, Ian Hickson <ian@hixie.ch> wrote:
> On Mon, 9 Aug 2010, Greg Wilkins wrote:
>>
>> I strongly believe that at this stage we need to define an extension
>> mechanism that works with (or is part of ) the websocket framing
>> mechanism, that has reasonable clear support for several types of
>> extensions that could reasonably be anticipated might possibly be
>> supported by protocol extensions in the future.  A primary requirement
>> of this extension mechanism should be that it will not needlessly break
>> intermediaries and infrastructure that has been made websocket aware.
>
> The spec as written now does this. We can add any amount of additional
> data into the frame payload itself and the intermediaries wouldn't be
> affected.
>
> For example, we could add a new kind of frame that is binary data by just
> minting a new frame type and saying that the payload is binary. We could
> add multiplexing by (as a simple example) saying that the first byte of
> any payload is a channel if the client and server agree to multiplex. We
> could add a new frame type that consists of a frame MIME type followed by
> a filename followed by binary data by having the MIME type and filename be
> the first few bytes of the payload, each terminated by a NULL byte or
> prefixed by the number of bytes they take within the payload. We could do
> fragmentation by using new frame types, or by having metadata regarding
> the fragments be the leading or trailing byte(s) of the payload, as agreed
> by the client and server during the handshake.
>
> I can't think of anything we _can't_ do with the current mechanism that
> would impact intermediaries that only support the initial version of the
> protocol, other than move away from message-based communication (and back
> to streaming like TCP).
>
> --
> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
>