Re: [hybi] Dave's Framing Proposal

Douglas Otis <dotis@mail-abuse.org> Thu, 05 August 2010 21:15 UTC

Return-Path: <dotis@mail-abuse.org>
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 B72873A69E7 for <hybi@core3.amsl.com>; Thu, 5 Aug 2010 14:15:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.327
X-Spam-Level:
X-Spam-Status: No, score=-106.327 tagged_above=-999 required=5 tests=[AWL=0.272, BAYES_00=-2.599, 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 oCPPVwLMpN08 for <hybi@core3.amsl.com>; Thu, 5 Aug 2010 14:15:21 -0700 (PDT)
Received: from harry.mail-abuse.org (harry.mail-abuse.org [168.61.5.27]) by core3.amsl.com (Postfix) with ESMTP id 54DBE3A69B4 for <hybi@ietf.org>; Thu, 5 Aug 2010 14:15:21 -0700 (PDT)
Received: from sjc-office-nat-210.mail-abuse.org (gateway1.sjc.mail-abuse.org [168.61.5.81]) by harry.mail-abuse.org (Postfix) with ESMTP id 95DFEA9444C for <hybi@ietf.org>; Thu, 5 Aug 2010 21:15:49 +0000 (UTC)
Message-ID: <4C5B2A05.6000209@mail-abuse.org>
Date: Thu, 05 Aug 2010 14:15:49 -0700
From: Douglas Otis <dotis@mail-abuse.org>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6
MIME-Version: 1.0
To: hybi@ietf.org
References: <2286.1281041555.477702@puncture>
In-Reply-To: <2286.1281041555.477702@puncture>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 8bit
Subject: Re: [hybi] Dave's Framing Proposal
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, 05 Aug 2010 21:15:22 -0000

On 8/5/10 1:52 PM, Dave Cridland wrote:
> As for the framing itself, rather than describe actual bitfields, I 
> thought I'd describe some properties.
>
> 1) Have a single leading octet, which has a frame type.
This tag should keep data framing state separate from bits describing 
content.  As such, at least 3 bits could be dedicated for framing state. 
Such as "start", "end", "concatenated".
> a) This frame type says if it's a leading chunk, a completing text, a 
> completing blob, or a control.
Frame type can signal initial frame, intermediary frame, and/or ending 
frame for the stream, as well as low level content descriptors.
> b) If it's a control, then some of the remaining bits are used to 
> indicate what it is, including Final Frame, Ping, Pong, etc.
The explicitly defined initial frame could always represent 
meta-information, where frames can also be concatenated within the 
enclosed message. This would keep the frame header information limited 
to using 4 bytes.
> c) There should be some bits left over (and therefore reserved, MUST 
> zero, MUST ignore).
>
> 2) A stream identifier, set to 0x01 in the version of the standard. 
> Other values MUST cause the frame to be discarded by receivers. 
> Intermediaries MUST ignore this value.
Okay.
> 3) A 16-bit, network order, extension length field. This describes how 
> much of the packet is extension data (ie, designed for the stack to 
> process) rather than payload data. This field MUST NOT exceed the 
> length of the frame's payload.
See above.  Consider the possibility of having frame concatenation, 
where the first frame always exchanges meta-information, even when given 
a zero length.
> 4) A 16-bit, network order, payload length field. This describes the 
> entire payload, including any extension data. A naïve intermediary MAY 
> therefore ignore the extension length in order to forward frames; 
> however if it chooses to refragment frames it MUST take into account 
> the extension length.
>
> 5) Extension data. Note that we need to handle multiple extension 
> data, therefore this field needs to be internally TLVed consistently.
The meta-data should also use TLV structures, but this should not impact 
the actual data payload.
>
> 6) Payload data.
-Doug