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

Brodie Thiesfield <brodie@jellycan.com> Fri, 29 April 2011 02:16 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 25CC5E0724 for <hybi@ietfa.amsl.com>; Thu, 28 Apr 2011 19:16:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.727
X-Spam-Level:
X-Spam-Status: No, score=-2.727 tagged_above=-999 required=5 tests=[AWL=0.250, 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 6CuIzeab1wM5 for <hybi@ietfa.amsl.com>; Thu, 28 Apr 2011 19:16:33 -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 DF399E0684 for <hybi@ietf.org>; Thu, 28 Apr 2011 19:16:33 -0700 (PDT)
Received: by pzk5 with SMTP id 5so2391771pzk.31 for <hybi@ietf.org>; Thu, 28 Apr 2011 19:16:33 -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; bh=2gNeYvd/2hy3gNA9ITFTCPJwuc9YXN7F0AJ6f7INbEY=; b=PERqvf/USQiioAV9iFVYNriMJEA/Zw/mIWkpebM6QW1SxM5nr5wSkDW2fzQxyiUFR4 KKVj3+orA3npzVTJOHtWXB1a0Avc/l2Fyz2rbAl8TRx+h5m4ayKGysf1PW7RSvfnJivZ LThToktxmJG05PE1fOBtOFmuLIVX6bmxmfYXU=
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; b=OoZfUKGDpnHC63begxrjkZw7YirABeE2To5yExYQtLk3r2fEGqVkpoT0KcOgY/X/sP zxPXfkXimEcqrfmUG+lmGmHbCdh/uiVhaaQN1qZQ7LuBa3jQ8z7uDaf0p+gX9BIDVR53 TfiE+FsSf/M5uJjbMH5laZU4HW1AUa8Yv9YvM=
MIME-Version: 1.0
Received: by 10.68.6.168 with SMTP id c8mr4750855pba.40.1304043392192; Thu, 28 Apr 2011 19:16:32 -0700 (PDT)
Sender: brofield@gmail.com
Received: by 10.68.54.35 with HTTP; Thu, 28 Apr 2011 19:16:32 -0700 (PDT)
In-Reply-To: <BANLkTinqQiMQ4N1vWjyCe682BmdisW-=KA@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>
Date: Fri, 29 Apr 2011 11:16:32 +0900
X-Google-Sender-Auth: oWXhbz3aSOV0nwvZxt-Z5e6aNGM
Message-ID: <BANLkTik1a6CEA8LiiLgsnBt9qHCaybmWfg@mail.gmail.com>
From: Brodie Thiesfield <brodie@jellycan.com>
To: Timothy Meade <zt.tmzt@gmail.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 02:16:35 -0000

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
>
>