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

Timothy Meade <zt.tmzt@gmail.com> Thu, 28 April 2011 19:31 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 11A1AE0670 for <hybi@ietfa.amsl.com>; Thu, 28 Apr 2011 12:31:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.598
X-Spam-Level:
X-Spam-Status: No, score=-3.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, 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 vfZMwJKIOf4w for <hybi@ietfa.amsl.com>; Thu, 28 Apr 2011 12:31:11 -0700 (PDT)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by ietfa.amsl.com (Postfix) with ESMTP id DC290E0669 for <hybi@ietf.org>; Thu, 28 Apr 2011 12:31:10 -0700 (PDT)
Received: by vws12 with SMTP id 12so2687854vws.31 for <hybi@ietf.org>; Thu, 28 Apr 2011 12:31:10 -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=uVsHcSr2Q0yhKcxpFFP0YhzmsqGTHvH6HT1p/68mzns=; b=nph7ONCwzGxdjWrZLEJf3Y0wsTBwgQ1Pf8faEGJR9ryOsM2jnI7ofYdsinLOhUY5a/ 01VF3nEJtmoB/TZSxM0Yko0HS6hUnrKsSsnwkto3A01teryA0KeUt2m5o3jlI3LXnkl1 N9ZQfTRxichRYWpPtMGVC9hKj73Lvz5hIUBcw=
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=h9eGZLk8vl7M+leGRME2aaiAokaPpgUG3tHiUcJWGKRmYwhQSG/eNPzvahsYRWxnMB O+OgzlBJXnZV2FhXxP1D1um7TyGUnAO9PqW1CN7TwLowvn1npIohVR4d2hPIVNEK4FNl l+/KwMQLnjR3pn5I++bcFGh1dWeRAn/GzRfc8=
MIME-Version: 1.0
Received: by 10.220.90.77 with SMTP id h13mr1173795vcm.14.1304019070077; Thu, 28 Apr 2011 12:31:10 -0700 (PDT)
Received: by 10.220.190.129 with HTTP; Thu, 28 Apr 2011 12:31:10 -0700 (PDT)
Received: by 10.220.190.129 with HTTP; Thu, 28 Apr 2011 12:31:10 -0700 (PDT)
In-Reply-To: <BANLkTi==RTfqaYFT3CQs1pM5Tb501rk2Vg@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>
Date: Thu, 28 Apr 2011 15:31:10 -0400
Message-ID: <BANLkTinqQiMQ4N1vWjyCe682BmdisW-=KA@mail.gmail.com>
From: Timothy Meade <zt.tmzt@gmail.com>
To: Greg Wilkins <gregw@intalio.com>
Content-Type: multipart/alternative; boundary="001485f914a873cb3604a1ff9914"
Cc: "alan.coopersmith@oracle.com" <alan.coopersmith@oracle.com>, Hybi <hybi@ietf.org>, Brodie Thiesfield <brodie@jellycan.com>, jg@freedesktop.org
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: Thu, 28 Apr 2011 19:31:12 -0000

On Apr 27, 2011 11:12 PM, "Greg Wilkins" <gregw@intalio.com> wrote:
>
> Brodie,
>
> this is good. But I think we also need to say the same for op-codes.

It might be instructive to look at X Protocol opcodes for core and
extensions and how that played out over time.
>
> 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.
>
> This will mean a minor inconvenience to developers of extensions, as
> they need to not have constant op-codes, but it is not a difficult
> thing we ask and it will give us interoperability of extensions.
>
> cheers
>
>
>
>
>
> 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