Re: [hybi] method of allocation of reserved bits to extensions

Brodie Thiesfield <brodie@jellycan.com> Sun, 22 May 2011 23:24 UTC

Return-Path: <brofield@gmail.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9179AE06D9 for <hybi@ietfa.amsl.com>; Sun, 22 May 2011 16:24:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.977
X-Spam-Level:
X-Spam-Status: No, score=-2.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZCqwpmX59FwS for <hybi@ietfa.amsl.com>; Sun, 22 May 2011 16:24:01 -0700 (PDT)
Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by ietfa.amsl.com (Postfix) with ESMTP id 869A4E0651 for <hybi@ietf.org>; Sun, 22 May 2011 16:24:01 -0700 (PDT)
Received: by pzk5 with SMTP id 5so3279395pzk.31 for <hybi@ietf.org>; Sun, 22 May 2011 16:24:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=gY1lkT4wQ1PStJ0Or/48QZ4PmDTUSUGUoFYozgPvpZQ=; b=W+1E2IzquDCLjFjjFchdjnGRlV+uZEaslQ2+2MyLEuTs7j7+V/XBKj3MGxKBRlrU4K bz2zXl1C0caB9IEAwPhQf2gqAH0dQfWp4wJ4d1RRtPbXrEeQXPtUx7SgwvQzmU8SWypf KDWcilNeDsM1GUkwpw+TilGGxsi6jct/Alhuk=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=QkpNM9XFH45/Pwobkc4wyrvKTuQJ1uWyoE1XHJwezh/gTnDh0mGL8KTT3INQKl8zUp LQdkGaK1xfLDNZ9Pd4PfYTi8qPCKN4BW2V6EarWx4XwvaNQKF/IBE47+XjfTw9Mqmtf1 nAEv8S7G1xupK7qIStKqBW/AxaWt7WXwSlkpY=
MIME-Version: 1.0
Received: by 10.68.39.72 with SMTP id n8mr1528535pbk.93.1306106639235; Sun, 22 May 2011 16:23:59 -0700 (PDT)
Sender: brofield@gmail.com
Received: by 10.68.40.134 with HTTP; Sun, 22 May 2011 16:23:59 -0700 (PDT)
In-Reply-To: <CA566BAEAD6B3F4E8B5C5C4F61710C11402DB23F@TK5EX14MBXW603.wingroup.windeploy.ntdev.microsoft.com>
References: <BANLkTi=vOQDtL5GobitKe8yiUoQFb2go_Q@mail.gmail.com> <BANLkTikaOXg0u+4d8Ly6OxUQ7PFUU=udgQ@mail.gmail.com> <BANLkTikiUkivJitZGU-+q6wBfJ3VW45F8g@mail.gmail.com> <BANLkTindmLQ0KE6K5qUX2ue+=hoLUaznLA@mail.gmail.com> <BANLkTim9w83iSY-TH1yuVAUXxypJk_tmrw@mail.gmail.com> <BANLkTimnMBwNgP_e29exT6dUkp60s2xU3g@mail.gmail.com> <BANLkTi==RTfqaYFT3CQs1pM5Tb501rk2Vg@mail.gmail.com> <BANLkTinqQiMQ4N1vWjyCe682BmdisW-=KA@mail.gmail.com> <BANLkTik1a6CEA8LiiLgsnBt9qHCaybmWfg@mail.gmail.com> <4DBA3809.4010004@oracle.com> <CA566BAEAD6B3F4E8B5C5C4F61710C11402DB23F@TK5EX14MBXW603.wingroup.windeploy.ntdev.microsoft.com>
Date: Mon, 23 May 2011 08:23:59 +0900
X-Google-Sender-Auth: D6Xo4XQ1ZQw9VzPPSy4WWWQ9mSQ
Message-ID: <BANLkTinCuTS1YanuJfSR8=QoH3P-36mdNQ@mail.gmail.com>
From: Brodie Thiesfield <brodie@jellycan.com>
To: Gabriel Montenegro <Gabriel.Montenegro@microsoft.com>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: Alan Coopersmith <alan.coopersmith@oracle.com>, Hybi <hybi@ietf.org>, "jg@freedesktop.org" <jg@freedesktop.org>, Greg Wilkins <gregw@intalio.com>
Subject: Re: [hybi] method of allocation of reserved bits to extensions
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/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: Sun, 22 May 2011 23:24:02 -0000

On Fri, May 20, 2011 at 10:03 AM, Gabriel Montenegro
<Gabriel.Montenegro@microsoft.com> wrote:
> [as individual]
>
> We have very few reserved bits. These are not meant for use by just any extension, similarly, the bits in the TCP or IP headers are not "up for grabs", but are doled out very carefully.
>
> Dynamic, on-the-fly assignment of reserved bits was proposed by Greg and Brodie here:
> http://www.ietf.org/mail-archive/web/hybi/current/msg07345.html
>
> If we were to allow such a thing, then no particular extension would be guaranteed to run successfully, as it would depend on a resource (a reserved bit) that it is not guaranteed to have until the handshake is over. This would be too unpredictable. Extensions are free to define bits or control frames within their defined payload (as already noted in the draft).


Until the handshake is completed there is no websocket connection and
no guarantee that any extension will be accepted by the server anyhow.
I don't see that this is a problem.

It is more efficient in size considerations to use available bits in
the framing for extensions to use in their signalling. Since size was
important in the beginning and the reason we have the variable size
length field, I assume that saving up to 3 bytes per frame for
extensions that need flags is still desirable.

I still believe that it would be better for the server to explicitly
allocate the bit to the extension rather than have implicit allocation
of a bit via extension order. It allows server to refuse to allocate
specific bits as desired (e.g. new protocol version has allocated it)
without changes to extensions or clients using older protocol
versions. It also facilitates Greg's idea of adding an overflow block
of extra reserved bits if that proves necessary.

However, I don't feel particularly strongly about this issue and can
live with the worst-case scenario of every negotiated extension
extending the payload by a byte in order to get a single bit flag.

Regards,
Brodie

>
> Reserved bits should only be allocated for very compelling reasons, either because there is an extension that has full backing of the WG or because there is a new version of the protocol that needs it. I think we should word our IANA considerations on bit assignment with a very strict assignment policy of "Standards Action":
> http://tools.ietf.org/html/rfc5226#section-4.1
>
> Does this seem reasonable?
>
> Gabriel
>
>> -----Original Message-----
>> From: hybi-bounces@ietf.org [mailto:hybi-bounces@ietf.org] On Behalf Of Alan
>> Coopersmith
>> Sent: Thursday, April 28, 2011 21:01
>> To: Brodie Thiesfield
>> Cc: Hybi; jg@freedesktop.org; Greg Wilkins
>> Subject: Re: [hybi] method of allocation of reserved bits to extensions
>>
>> On 04/28/11 07:16 PM, Brodie Thiesfield wrote:
>> > Hi Timothy,
>> >
>> > On Fri, Apr 29, 2011 at 4:31 AM, Timothy Meade <zt.tmzt@gmail.com> wrote:
>> >> On Apr 27, 2011 11:12 PM, "Greg Wilkins" <gregw@intalio.com> wrote:
>> >>>
>> >>> this is good. But I think we also need to say the same for op-codes.
>> >>>
>> >>> I think each extension needs to say how many bits, data op-codes and
>> >>> control op-codes it needs and then these should all be allocated in
>> >>> order.
>> >>>
>> >>
>> >> It might be instructive to look at X Protocol opcodes for core and
>> >> extensions and how that played out over time.
>> >
>> > I found the following description of the opcodes:
>> > http://www.x.org/wiki/Development/Documentation/Protocol/OpCodes
>> >
>> > From the summary of the scheme above:
>> > * each extension is assigned a single major identifying opcode
>> > * the extension then defines sub-codes for itself if necessary
>> >
>> > So this is pretty much the same as we are looking at in websockets but
>> > we have a lot less opcode space to allocate.
>> >
>> > Can you supply a pointer to a summary of the problems that occurred
>> > with the X scheme? I'm assuming that it didn't turn out all rosy.
>>
>> I don't know why you'd assume that, since the X extension mechanism is the key
>> that's kept the X protocol alive for 25 years as graphics technology changed
>> rapidly.
>>
>> The primary problem I'm aware of is that while each extension got one of the
>> 128 available requests, and bundled all it's actions into subcodes of that request,
>> they didn't do similar "namespacing" for event & error codes.
>>
>> We've not yet had a situation where we needed more than 128 extensions
>> simulataneously active, but have hit the limits of 64 extension events and errors,
>> as some extensions used quite a few.
>>
>> It does occasionally make user bug reports challenging as the dynamic
>> assignment of extension codes based on which ones are enabled during the build
>> and runtime of the X server means that getting an error report of a failed
>> request 153 doesn't let you know which extension it was.
>> (This is why the standard libX11 error handler always prints the extension names,
>> but some applications and toolkits use custom error handlers that do not.)
>>
>> --
>>       -Alan Coopersmith-        alan.coopersmith@oracle.com
>>        Oracle Solaris Platform Engineering: X Window System
>>
>> _______________________________________________
>> hybi mailing list
>> hybi@ietf.org
>> https://www.ietf.org/mailman/listinfo/hybi
>
>