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

Timothy Meade <zt.tmzt@gmail.com> Fri, 29 April 2011 04:07 UTC

Return-Path: <zt.tmzt@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 6B2AFE06EC for <hybi@ietfa.amsl.com>; Thu, 28 Apr 2011 21:07:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.099
X-Spam-Level:
X-Spam-Status: No, score=-3.099 tagged_above=-999 required=5 tests=[AWL=-0.499, BAYES_00=-2.599]
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 VmLmymCE4oQW for <hybi@ietfa.amsl.com>; Thu, 28 Apr 2011 21:07:30 -0700 (PDT)
Received: from mail-vx0-f172.google.com (mail-vx0-f172.google.com [209.85.220.172]) by ietfa.amsl.com (Postfix) with ESMTP id 516ACE066F for <hybi@ietf.org>; Thu, 28 Apr 2011 21:07:30 -0700 (PDT)
Received: by vxg33 with SMTP id 33so2923204vxg.31 for <hybi@ietf.org>; Thu, 28 Apr 2011 21:07:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=0ndSoSr0VraQSn30m/e0jq3wBO2PkenQw0ehQ+32SQ4=; b=n04FiHn7wRb/z+D5V03dCzN5+gvEY0jZJtfffBgeWJj8KWnRUmKIfArAxopQYZ/FqN 35hBQo2hA4GJVSBYaq5OW/129iUUxigNoeCmact8tb6gZMoX5TPFrQUUoZ6FRYqoYJ6I xeN8zA1vrIsWiyR9kWYQJNBokuhDYL4s2R7g0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=GOfLrMETExIUazPnDEbsf8MB8erRDFp/jPTBzgoG/zNyGcGrAtQZnBXDHFZGhohde/ Z5VevXE/AvfIlVDi+b5TsgWbtmFH9kkp/LAgOQAFk0Fniy3cIdGdin74VUqtzRQnWFyl LlUZjWKtUE5X554fJfDGxbvigiAthd3Uqo9Qc=
MIME-Version: 1.0
Received: by 10.52.178.102 with SMTP id cx6mr5834087vdc.59.1304050049588; Thu, 28 Apr 2011 21:07:29 -0700 (PDT)
Received: by 10.220.190.129 with HTTP; Thu, 28 Apr 2011 21:07:29 -0700 (PDT)
In-Reply-To: <BANLkTik1a6CEA8LiiLgsnBt9qHCaybmWfg@mail.gmail.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>
Date: Fri, 29 Apr 2011 00:07:29 -0400
Message-ID: <BANLkTimTH5VqkJQCDDEJJfLV0aWFbt3L+A@mail.gmail.com>
From: Timothy Meade <zt.tmzt@gmail.com>
To: Brodie Thiesfield <brodie@jellycan.com>
Content-Type: text/plain; charset="ISO-8859-1"
Cc: "alan.coopersmith@oracle.com" <alan.coopersmith@oracle.com>, Hybi <hybi@ietf.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: Fri, 29 Apr 2011 04:07:35 -0000

Oh, great apparently Gmail was sending emails without my name for the
last six years, great to have that fixed.

On Thu, Apr 28, 2011 at 10:16 PM, Brodie Thiesfield <brodie@jellycan.com> 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.
>
> Regards,
> Brodie
>
>
>
>
>>> On 28 April 2011 12:57, Brodie Thiesfield <brodie@jellycan.com> wrote:
>>> > If we accept Greg's suggestion, then the following text can be a base:
>>> >
>>> >
>>> >
>>> > 8.2 Allocating Reserved Bits
>>> >
>>> > An extension may require the use of a reserved bit in the framing for
>>> > proper operation. Because both the server and client must know all
>>> > extension requirements before negotiating their use, requirements for
>>> > use of reserved frame bit are known.
>>> >
>>> > The server and client will allocate reserved frame bits in a
>>> > predefined order. The order for the reserved bits is defined as the
>>> > number of the reserved bit as defined in section 4.2, i.e. RSV1 ->
>>> > RSV2 -> RSV3. The order of the extensions is defined by the order of
>>> > the extensions in the the Sec-WebSockets-Extensions response header.
>>> >
>>> > Example;
>>> >
>>> > The client requests the following 3 extensions:
>>> > Sec-WebSocket-Extensions: deflate-frame, sign-frame, mux-o-magic
>>> >
>>> > The server supports all extensions and sends the response header:
>>> > Sec-WebSocket-Extensions: deflate-frame, sign-frame, mux-o-magic
>>> >
>>> > If the deflate-frame extension requires 1 reserved bit and the
>>> > mux-o-magic extension requires 2 reserved bits, then the bits are
>>> > allocated as:
>>> >
>>> > deflate-frame: RSV1
>>> > mux-o-magic: RSV2, RSV3
>>> >
>>> > If the server response used a different ordering of extensions, the
>>> > allocated bits will be different according to the response extension
>>> > ordering.
>>> >
>>> > For example, given the following server response header:
>>> > Sec-WebSocket-Extensions: mux-o-magic, deflate-frame, sign-frame
>>> >
>>> > The reserved bits would be allocated as:
>>> > mux-o-magic: RSV1, RSV2
>>> > deflate-frame: RSV3
>>> >
>>> > If there are no available reserved bits to be allocated to an
>>> > extension the server MUST NOT agree to use the extension.
>>> >
>>> _______________________________________________
>>> hybi mailing list
>>> hybi@ietf.org
>>> https://www.ietf.org/mailman/listinfo/hybi
>>
>> --
>> Timothy Meade
>> Real-time web developer
>> Founder, Jobitr
>>
>> _______________________________________________
>> hybi mailing list
>> hybi@ietf.org
>> https://www.ietf.org/mailman/listinfo/hybi
>>
>>
>

Hi Brodie,

I would have included references in the original email, though I'm
sure either of the two experts I cc'd can be much more helpful in that
regard.

Quoting from http://wiki.x.org/wiki/Development/X12#Compositedbydefault:

Extension space is too small

The first 128 requests are core protocol; the remaining 128 are
single-entry multiplex functions for extensions. It's sort of
ridiculous to have XPolyFillArc on the same footing as GLX.

The minor opcode "convention" should be formalized and made part of
the standard. The core protocol should be assigned major number zero
and use minor numbers.

The first 128 requests are core protocol; the remaining 128 are
single-entry multiplex functions for extensions. It's sort of
ridiculous to have XPolyFillArc on the same footing as GLX.

The minor opcode "convention" should be formalized and made part of
the standard. The core protocol should be assigned major number zero
and use minor numbers.

also see, though this is much more general dealing with more than
protocol issues:

Why X is not our Ideal Window System
http://www.std.org/~msm/common/protocol.pdf

--
Timothy Meade
Real-time web developer
Founder, Jobitr