Re: [hybi] CML

John Tamplin <jat@google.com> Mon, 23 August 2010 04:21 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 9BB883A67E3 for <hybi@core3.amsl.com>; Sun, 22 Aug 2010 21:21:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.355
X-Spam-Level:
X-Spam-Status: No, score=-105.355 tagged_above=-999 required=5 tests=[AWL=0.621, 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 DY4dcrlwsIZQ for <hybi@core3.amsl.com>; Sun, 22 Aug 2010 21:21:13 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.35]) by core3.amsl.com (Postfix) with ESMTP id 65B033A67E2 for <hybi@ietf.org>; Sun, 22 Aug 2010 21:21:12 -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 o7N4Ljbl024397 for <hybi@ietf.org>; Sun, 22 Aug 2010 21:21:46 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1282537306; bh=zSWM53sC4Lp+hi3HkaBVRMl3KTE=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=N+0014S1Hri6vzbMAtyv8eZ99DvDu/Z+SmbDmYki/3IB4vSlyv2/xP1RO0vXWrESh b5VL2WZVQaqbVdE2PRKIQ==
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=dol2na7xPdkQdBQCES5TtrByzRH5LIkl0rrr9Ljf05KuaTBjglv23q/OWxcHSMUC2 hpFYcBJbITkI7MfdPLvqA==
Received: from gxk23 (gxk23.prod.google.com [10.202.11.23]) by wpaz13.hot.corp.google.com with ESMTP id o7N4Li5b010120 for <hybi@ietf.org>; Sun, 22 Aug 2010 21:21:44 -0700
Received: by gxk23 with SMTP id 23so2094043gxk.5 for <hybi@ietf.org>; Sun, 22 Aug 2010 21:21:44 -0700 (PDT)
Received: by 10.150.190.16 with SMTP id n16mr4732151ybf.144.1282537304157; Sun, 22 Aug 2010 21:21:44 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.151.103.4 with HTTP; Sun, 22 Aug 2010 21:21:24 -0700 (PDT)
In-Reply-To: <8B0A9FCBB9832F43971E38010638454F03EF266A07@SISPE7MB1.commscope.com>
References: <8B0A9FCBB9832F43971E38010638454F03EF2669F2@SISPE7MB1.commscope.com> <AANLkTi=G-gZ1+7uoYE=fhiKFUXoziWacx5_k-HfxC-0z@mail.gmail.com> <8B0A9FCBB9832F43971E38010638454F03EF266A07@SISPE7MB1.commscope.com>
From: John Tamplin <jat@google.com>
Date: Mon, 23 Aug 2010 00:21:24 -0400
Message-ID: <AANLkTimTBLvHXTGciDM4ef1hNXPHn7cjR-kxbd8pBq3+@mail.gmail.com>
To: "Thomson, Martin" <Martin.Thomson@andrew.com>
Content-Type: multipart/alternative; boundary="000e0cd6b2646cedc6048e75fc05"
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CML
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, 23 Aug 2010 04:21:15 -0000

On Mon, Aug 23, 2010 at 12:00 AM, Thomson, Martin <Martin.Thomson@andrew.com
> wrote:

> > There were objections to fragmentation without it...
>
> Where do you expect to see CML included?  The first frame, every frame, the
> last frame, or some other pattern?
>

Where the fragmentation is introduced by an intermediary or by a sender with
fixed-size but large content, I would expect it to be only on the first
frame and it would be completely accurate.  If a sender is fragmenting
dynamically generated content, I would expect an estimate might be included
on the first frame, and then an accurate count might be included once when
it is first known, if it is known before the last frame.  The estimate could
conceivably be updated several times if a more accurate estimate became
available.  In the worst case, the receiver still would have to realloc/copy
the buffer the same number of times if it had no CML estimates, but an
argument was made that it could be better and that it enabled UI affordances
like progress meters.


> Presumably, much of the benefit is lost if the complete length is only
> reported on the last frame - that information could be trivially gained by
> doing a little arithmetic (and I hear that computers are good at that ;).
>  That leads me to conclude that it’s most useful on the first frame.  Or at
> least as soon as possible.
>

Correct.


> ISTM that the most of the other constraints will come from the structure of
> the API.  If you need to pass a single array, you might suffer.  Otherwise,
> a simple abstraction (e.g. Java's InputStream or Reader classes, maybe
> ByteBuffer depending on paradigm) can help you avoid needing to re-alloc().
>

Remember that the current JS API is message based, where it receives a
single string containing the entire message.  It seems likely browsers are
going to allocate an entire buffer for the incoming message (granted some of
them will want that to be in UTF16 characters, which won't be tied to the
number of UTF8 bytes - there was discussion of perhaps adding that as an
extension), filling it as it reads fragments, and then handing it off to
client code once the last frame is received.


> If the receiver is so constrained that they can't deal with multiple
> frames, how able are they to use a BigInteger effectively, which would be
> necessary to hold CML?  Speaking from the Java perspective, this would be
> relatively easy, though not exactly efficient.
>

A 63-bit integer is a Java long, no BigInteger required (the high bit was
specifically required to be 0 to support Java's lack of an unsigned 64-bit
type).


> Overall, I'm not seeing a strong case for including CML.  It seems
> relatively harmless, but harmlessness is not really great motivation.
>

Primarily I suggested it as a way to avoid the apparently endless arguments
we were having about fragmentation.


> p.s. I still struggle to identify what an intermediary is able to do with
> this protocol.
>

Initially, I think of proxies as the likely intermediary, and I see two
roles for them:

   - enforce corporate policies, such as restricting which sites can be
   contacted, sniff content for malware or corporate IP being leaked, etc
   - aggregate connections - a MUX extension would be helpful here to reduce
   the number of outbound connections when many internal users are hitting the
   same sites

Also, an intermediary might be used as a front end to a server farm, which
receives the connection, aggregates them, and load-balances to backend
servers.

-- 
John A. Tamplin
Software Engineer (GWT), Google