Re: [hybi] Framing Take VI (a compromise proposal)

Patrick McManus <mcmanus@ducksong.com> Mon, 16 August 2010 15:20 UTC

Return-Path: <mcmanus@ducksong.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 6E5DE3A6781 for <hybi@core3.amsl.com>; Mon, 16 Aug 2010 08:20:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.484
X-Spam-Level:
X-Spam-Status: No, score=-2.484 tagged_above=-999 required=5 tests=[AWL=0.115, 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 fKMsj2EbL2Nl for <hybi@core3.amsl.com>; Mon, 16 Aug 2010 08:20:39 -0700 (PDT)
Received: from linode.ducksong.com (linode.ducksong.com [64.22.125.164]) by core3.amsl.com (Postfix) with ESMTP id 7A0343A63C9 for <hybi@ietf.org>; Mon, 16 Aug 2010 08:20:39 -0700 (PDT)
Received: by linode.ducksong.com (Postfix, from userid 1000) id 1F62F102A9; Mon, 16 Aug 2010 11:21:14 -0400 (EDT)
Received: from [192.168.16.214] (cpe-67-253-92-25.maine.res.rr.com [67.253.92.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linode.ducksong.com (Postfix) with ESMTPSA id CEA1C10157; Mon, 16 Aug 2010 11:21:13 -0400 (EDT)
From: Patrick McManus <mcmanus@ducksong.com>
To: John Tamplin <jat@google.com>
In-Reply-To: <AANLkTin1R_m2JJDWTjk9=p1BU6Hr+qJTV1QaXGxcuxPv@mail.gmail.com>
References: <AANLkTi=TBXO_Cbb+P+e2BVfx69shkf8E1-9ywDh_Y+Kz@mail.gmail.com> <AANLkTi=52ARa2v9oZ1tGosN7oL+kBBVH20XmtkXzPMM0@mail.gmail.com> <1281967550.10485.33.camel@tng> <AANLkTin1R_m2JJDWTjk9=p1BU6Hr+qJTV1QaXGxcuxPv@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Date: Mon, 16 Aug 2010 11:21:12 -0400
Message-ID: <1281972072.10485.50.camel@tng>
Mime-Version: 1.0
X-Mailer: Evolution 2.28.3
Content-Transfer-Encoding: 7bit
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] Framing Take VI (a compromise 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: Mon, 16 Aug 2010 15:20:40 -0000

On Mon, 2010-08-16 at 11:00 -0400, John Tamplin wrote:


> If you are already reallocating/copying the buffer it seems like you
> are getting little benefit from getting it after the first frame. 

a couple significant benefits to having TML at some early chunk vs not
having it at all:

* progress indicators
* abort early if tml is too large
* your next realloc() can be your last.

of course, tml in chunk 1 is optimal.

>  It also isn't clear when dynamically generated content is going to be
> known ahead of time.  

my point exactly! CPU and network speed mismatches create large
buffering all the time, and a write-once stream API isn't the only way
applications manage those buffers.

> I would expect a typical implementation 

but not an optimal implementation. The spec shouldn't restrict an
optimal implementation. A typical implementation could just send in
chunk 1 or not at all and the recvr could just ignore it if not in chunk
1. There is no requirement to send or use it at all.

> The main problem with moving it to per-frame extension data is that we
> have to define that extension data now if we want to have TML in the
> base protocol 

I have a different take. Defining a simple non controversial extension
up front is a very good way to get clients and servers implementing code
that handles the extension framework instead of having them just punt on
the topic all together as a quagmire. 

This has to be the simplest possible extension.