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

Alan Coopersmith <alan.coopersmith@oracle.com> Fri, 29 April 2011 04:01 UTC

Return-Path: <alan.coopersmith@oracle.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 E8D03E062B for <hybi@ietfa.amsl.com>; Thu, 28 Apr 2011 21:01:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.599
X-Spam-Level:
X-Spam-Status: No, score=-6.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
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 9urHmvRz7L4r for <hybi@ietfa.amsl.com>; Thu, 28 Apr 2011 21:01:19 -0700 (PDT)
Received: from rcsinet10.oracle.com (rcsinet10.oracle.com [148.87.113.121]) by ietfa.amsl.com (Postfix) with ESMTP id 9DE11E071E for <hybi@ietf.org>; Thu, 28 Apr 2011 21:01:19 -0700 (PDT)
Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p3T41FAt022625 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 29 Apr 2011 04:01:17 GMT
Received: from also.us.oracle.com (also.us.oracle.com [10.132.136.78]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p3T41Dts023154; Fri, 29 Apr 2011 04:01:15 GMT
Message-ID: <4DBA3809.4010004@oracle.com>
Date: Thu, 28 Apr 2011 21:01:13 -0700
From: Alan Coopersmith <alan.coopersmith@oracle.com>
User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.2.15) Gecko/20110412 Lightning/1.0b2 ObetStats/CATLDF_1292659975428-846018417 Thunderbird/3.1.9
MIME-Version: 1.0
To: Brodie Thiesfield <brodie@jellycan.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>
In-Reply-To: <BANLkTik1a6CEA8LiiLgsnBt9qHCaybmWfg@mail.gmail.com>
X-Enigmail-Version: 1.1.2
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Source-IP: rcsinet13.oracle.com [148.87.113.125]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090204.4DBA380D.00C8:SCFMA4539811,ss=1,fgs=0
X-Mailman-Approved-At: Fri, 29 Apr 2011 00:05:24 -0700
Cc: 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:02:03 -0000

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