Re: [hybi] Dave's Framing Proposal

Dave Cridland <dave@cridland.net> Thu, 05 August 2010 22:21 UTC

Return-Path: <dave@cridland.net>
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 94DF33A693F for <hybi@core3.amsl.com>; Thu, 5 Aug 2010 15:21:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.49
X-Spam-Level:
X-Spam-Status: No, score=-2.49 tagged_above=-999 required=5 tests=[AWL=0.109, BAYES_00=-2.599]
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 CyO3g3860fhd for <hybi@core3.amsl.com>; Thu, 5 Aug 2010 15:21:58 -0700 (PDT)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [217.155.137.61]) by core3.amsl.com (Postfix) with ESMTP id 5232D3A687F for <hybi@ietf.org>; Thu, 5 Aug 2010 15:21:58 -0700 (PDT)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id D82CD116809F; Thu, 5 Aug 2010 23:22:27 +0100 (BST)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (localhost.localdomain [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vjIeamuwXptu; Thu, 5 Aug 2010 23:22:26 +0100 (BST)
Received: from puncture (puncture [217.155.137.60]) by peirce.dave.cridland.net (Postfix) with ESMTPA id A7DAC116809E; Thu, 5 Aug 2010 23:22:26 +0100 (BST)
References: <2286.1281041555.477702@puncture> <4C5B2A05.6000209@mail-abuse.org> <AANLkTimm8G9Y9d4Gx0oZ9KgqDQo902VVXvf0mExjJpjr@mail.gmail.com>
In-Reply-To: <AANLkTimm8G9Y9d4Gx0oZ9KgqDQo902VVXvf0mExjJpjr@mail.gmail.com>
MIME-Version: 1.0
Message-Id: <2286.1281046946.682509@puncture>
Date: Thu, 05 Aug 2010 23:22:26 +0100
From: Dave Cridland <dave@cridland.net>
To: Greg Wilkins <gregw@webtide.com>, Server-Initiated HTTP <hybi@ietf.org>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
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 22:21:59 -0000

On Thu Aug  5 23:14:11 2010, Greg Wilkins wrote:
> I think the main essence of  what you are saying is that all frames  
> should be:
> 
>  opcode + meta-length + total-length + meta data + data
> 
> 
I'm saying that all frames have a fixed-size header, which includes a  
fixed-size length field denoting the size of the payload.

This is:

magic[1] + stream[1] + meta-length[2] + total-length[2] +  
meta[meta-length] + payload[total-length - meta-length]

> But we could also negotiate an extension to add a channel ID to  
> every
> frame (for example 0x1234)
> 
>   0x40 0x08 0x02 0x12 0x34 'hello '
>   0x00 0x07 0x02 0x12 0x34 'world'

Also no extensions change the header size, so intermediaries can be  
as dumb, and rarely upgraded, as they want.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade