Re: [hybi] how do we move forward on agreeing on framing?
John Tamplin <jat@google.com> Thu, 19 August 2010 16:43 UTC
Return-Path: <jat@google.com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id A7D963A693D for <hybi@core3.amsl.com>; Thu, 19 Aug 2010 09:43:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.821
X-Spam-Level:
X-Spam-Status: No, score=-105.821 tagged_above=-999 required=5 tests=[AWL=0.155, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qcQYhnnuuT39 for <hybi@core3.amsl.com>; Thu, 19 Aug 2010 09:43:37 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 4B8503A6947 for <hybi@ietf.org>; Thu, 19 Aug 2010 09:43:36 -0700 (PDT)
Received: from wpaz13.hot.corp.google.com (wpaz13.hot.corp.google.com [172.24.198.77]) by smtp-out.google.com with ESMTP id o7JGiAoS017231 for <hybi@ietf.org>; Thu, 19 Aug 2010 09:44:10 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1282236251; bh=jJyp7Wpeii4RevCbIPQ7EtqA47Q=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ag/mzBMwQqWSMVJi9vxzxKQvL9dOvBhWEW8kTWeO4cNkgB87wLw8lGwJL1ztGU63F rxzifrRjxp5bBPQrcMzIQ==
DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:from:date:message-id: subject:to:cc:content-type:x-system-of-record; b=fWTYixRfiyttyptKV4y0NhB3ZSEeu7fZLGEtbNqR0bypSC/wJTUcezlUxR1PrWyMF Zl4KCd6Tsa//sMxduZPmQ==
Received: from yxs7 (yxs7.prod.google.com [10.190.5.135]) by wpaz13.hot.corp.google.com with ESMTP id o7JGi9Nh015329 for <hybi@ietf.org>; Thu, 19 Aug 2010 09:44:10 -0700
Received: by yxs7 with SMTP id 7so963232yxs.14 for <hybi@ietf.org>; Thu, 19 Aug 2010 09:44:09 -0700 (PDT)
Received: by 10.229.251.76 with SMTP id mr12mr105784qcb.56.1282236249222; Thu, 19 Aug 2010 09:44:09 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.229.17.130 with HTTP; Thu, 19 Aug 2010 09:43:49 -0700 (PDT)
In-Reply-To: <2276.1282203783.697956@puncture>
References: <AANLkTineuhvGsC_vca6AiAX8OmHdkE-7s7rA1DQtjtMm@mail.gmail.com> <2276.1282203783.697956@puncture>
From: John Tamplin <jat@google.com>
Date: Thu, 19 Aug 2010 12:43:49 -0400
Message-ID: <AANLkTinpjy1bc7tAes-UvnLgEpQO=qTF8rf0NtaRDcuv@mail.gmail.com>
To: Dave Cridland <dave@cridland.net>
Content-Type: multipart/alternative; boundary="001636284552273257048e2fe4ca"
X-System-Of-Record: true
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] how do we move forward on agreeing on framing?
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/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, 19 Aug 2010 16:43:41 -0000
On Thu, Aug 19, 2010 at 3:43 AM, Dave Cridland <dave@cridland.net> wrote: > I'd feel more comfortable with knowing that the extension framing (not > actual support) was done. Otherwise, any extension mechanism is going to > smell like a real hack, even if it's possible. I also worry about actors > seeing extensions and choking on them, whether that's intermediaries or > whatever. > The problem is we seem pretty strongly split between two different extension methods: - having extension metadata separate from the payload, with some defined structure so that non-critical unknown extensions can be ignored. This would also open the possibility of negotiating fixed offsets into the extension area for certain extension data for performance reasons - using nested layers of opcodes to define extensions -- ie the top-level opcode would be MUX, and the payload would have the mux data and the next-layer opcode and data, which might be another extension, etc, until you finally get to the real opcode/data. The former gives the possibility of identifying the extension data where intermediaries can safely ignore extensions they don't understand. This is not a proposal for extension data, but just a thought of how it might work out to illustrate this point: - define one of the reserved bits as an EXT bit - if set, an extension length follows the header before the payload data, and that length is followed by a block of extension data - Each extensions data is preceded by an extension header - 1 bit - extension is critical - frame cannot be manipulated if this bit is set and the receiver does not understand the extension (and an ultimate endpoint would drop the frame if it didn't understand the extension, though something would be wrong since it negotiated it) - 7 bits - extension id - defined in a registry or negotiated during the handshake - 8 bits - extension data length (maybe support variable length if we think we need more than 255 bytes per extension) - extension data This would allow a receiver to find the extension data it is looking for even if it doesn't understand all the extensions. Certainly some extensions would render the data uninterpretable if they are not understood, but I think many would not. For example, an extension including a MIME-type for the payload could safely be ignored, as could an extension that gave the count of UTF16 characters. The nested opcode approach essentially requires all outer extensions to be understood, since otherwise you don't even know where in the payload the next layer is. It has the advantage of taking less space to define the extension data and basically means there is no global extension format -- every extension defines its own payload data format. Finally, the extension data can be intermixed with lower-level payloads which may be easier to handle different nesting of extensions. For example, if you have a MUX extension that aggregates multiple logical frames into a single frame, if each of those frames have different extensions, it is less obvious how to encode that into the aggregated frame, so that is an advantage of the nested-opcode approach. So, this split is why I gave a rationale that we don't have time to resolve how extensions should be represented for the base protocol. If you really think it is critical that it is resolved now, then I suppose we have to do it now, but I was hoping to basically encode what we have agreement on now into the base protocol while leaving hooks for whatever we ultimately decide. > Finally, it's not clear to me if extension data needs to be per-message or > per-frame - I can't think of a per-frame use-case, but still, this effects > possible extension mechanisms heavily. > Clearly, if you have the ability to attach extension data to each frame, you can define in the extension that it is present only on initial or final frames as appropriate. Regarding the per-frame use case, Ian has already mentioned the mux stream id case. -- John A. Tamplin Software Engineer (GWT), Google
- [hybi] how do we move forward on agreeing on fram… John Tamplin
- Re: [hybi] how do we move forward on agreeing on … Dave Cridland
- Re: [hybi] how do we move forward on agreeing on … Ian Fette (イアンフェッティ)
- Re: [hybi] how do we move forward on agreeing on … Francis Brosnan Blazquez
- Re: [hybi] how do we move forward on agreeing on … Roberto Peon
- Re: [hybi] how do we move forward on agreeing on … John Tamplin
- Re: [hybi] how do we move forward on agreeing on … John Tamplin
- Re: [hybi] how do we move forward on agreeing on … gustav trede
- Re: [hybi] how do we move forward on agreeing on … Francis Brosnan Blazquez
- Re: [hybi] how do we move forward on agreeing on … John Tamplin
- Re: [hybi] how do we move forward on agreeing on … Francis Brosnan Blazquez
- Re: [hybi] how do we move forward on agreeing on … Roberto Peon
- Re: [hybi] how do we move forward on agreeing on … Shelby Moore
- Re: [hybi] how do we move forward on agreeing on … gustav trede
- Re: [hybi] how do we move forward on agreeing on … Francis Brosnan Blázquez
- Re: [hybi] how do we move forward on agreeing on … Roberto Peon
- Re: [hybi] how do we move forward on agreeing on … Dave Cridland
- Re: [hybi] how do we move forward on agreeing on … Shelby Moore
- Re: [hybi] how do we move forward on agreeing on … Shelby Moore
- Re: [hybi] how do we move forward on agreeing on … Patrick McManus
- Re: [hybi] how do we move forward on agreeing on … Francis Brosnan Blazquez
- Re: [hybi] how do we move forward on agreeing on … Roberto Peon
- Re: [hybi] how do we move forward on agreeing on … Shelby Moore
- Re: [hybi] how do we move forward on agreeing on … Shelby Moore