Re: [hybi] Framing take IV

Jamie Lokier <jamie@shareable.org> Wed, 04 August 2010 02:26 UTC

Return-Path: <jamie@shareable.org>
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 364D63A6B6F for <hybi@core3.amsl.com>; Tue, 3 Aug 2010 19:26:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.508
X-Spam-Level:
X-Spam-Status: No, score=-2.508 tagged_above=-999 required=5 tests=[AWL=0.091, 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 CxSgcKOBY95N for <hybi@core3.amsl.com>; Tue, 3 Aug 2010 19:26:51 -0700 (PDT)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 2CBF93A6A30 for <hybi@ietf.org>; Tue, 3 Aug 2010 19:26:51 -0700 (PDT)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1OgThP-0005F0-RF; Wed, 04 Aug 2010 03:27:19 +0100
Date: Wed, 04 Aug 2010 03:27:19 +0100
From: Jamie Lokier <jamie@shareable.org>
To: Greg Wilkins <gregw@webtide.com>
Message-ID: <20100804022719.GT27827@shareable.org>
References: <AANLkTinyrDoG5d_Ur6HVRy=SgMPjLzJtpJ++Ye=1DQdj@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <AANLkTinyrDoG5d_Ur6HVRy=SgMPjLzJtpJ++Ye=1DQdj@mail.gmail.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
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 02:26:52 -0000

Greg Wilkins wrote:
>    Neither of these problems are show stoppers, although they do combine
>    badly.. ie multiplexing can be done with a channel switch and flow
>    control frames, but only if op-codes are allocated to it and that will
>    need centralized consensus on one true multiplexing algorithm.

Will it?  If those op-codes are negotiated, then multiplexing becomes
an optional extension, and multiple competing extensions are perfectly
interoparable with each other.  It's also fine for an implementation
to offer multiple ways to do the same thing, if the negotiation is
sensible.

I think that's better than choosing the one true multiplexing
algorithm, not least because there probably isn't an ideal algorithm
for all apps, and some specialised clients and their servers may
prefer to use a different one.

>    There are many variations on these themes, but I think these are the 3
>    basic approaches that have been identified, which I will call:
>     1. hixiesque - centralized extension via op-codes
>     2. robertoesque- per frame extension via meta-data
>     3. martinesque - extension via dedicated mime frame (meta-data plus
>        data)
> 
>    Any others?

4. Extension codes identified at handshake negotiation time, or a
later negotiation time in control messages.

For example: "WebSocket-Protocol: x-multiplex;control-byte=12, keepalive-aggregator;control-byte=13"

Doing it at handshake time has the advantage that it's easily
future-proof, very little needs to be defined up front, and simple
implementations can ignore them entirely.

-- Jamie