Re: [hybi] With deflate-stream, Close frame doesn't work as an end of data marker

John Tamplin <jat@google.com> Mon, 28 February 2011 14:31 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 62C153A69CC for <hybi@core3.amsl.com>; Mon, 28 Feb 2011 06:31:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.909
X-Spam-Level:
X-Spam-Status: No, score=-105.909 tagged_above=-999 required=5 tests=[AWL=0.068, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, 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 IssA8QGT+9Jz for <hybi@core3.amsl.com>; Mon, 28 Feb 2011 06:31:25 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 4CB543A6940 for <hybi@ietf.org>; Mon, 28 Feb 2011 06:31:25 -0800 (PST)
Received: from kpbe15.cbf.corp.google.com (kpbe15.cbf.corp.google.com [172.25.105.79]) by smtp-out.google.com with ESMTP id p1SEWPJE010795 for <hybi@ietf.org>; Mon, 28 Feb 2011 06:32:25 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1298903545; bh=Jr8MqP14z38S/SzmeJQH9Ed0suY=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type:Content-Transfer-Encoding; b=NdYFAfZ+bPpojuKN4SjrXjLTTcc9Cu1UgO9sTGdfWpudrVdN7dx5YfNvkh8YXEC6L 3M+woXlVOkS9DrhSdBBpQ==
Received: from gxk3 (gxk3.prod.google.com [10.202.11.3]) by kpbe15.cbf.corp.google.com with ESMTP id p1SEWN1e004880 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for <hybi@ietf.org>; Mon, 28 Feb 2011 06:32:24 -0800
Received: by gxk3 with SMTP id 3so1527225gxk.26 for <hybi@ietf.org>; Mon, 28 Feb 2011 06:32:23 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=/BLawHMjWnJvOo3vuaQl6PSMLTbdW6Y1QPVlPixTkXA=; b=SKT8vdvDZNyjXHgTW7WHVh9daqUP6xLHjKfAsdTrAXSnAVLRmHOjzs622qtSc4afUu nio7lZFjxne9kejLamfw==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=DXeSt9K3925F2qQDkU99n/NBSfVtPHEk0cGqEAyYX5yZ4koxB3BJeK2Ry8alKHSrk9 NEQCiM4tD2X7kdwnDDjg==
Received: by 10.150.198.11 with SMTP id v11mr7214573ybf.388.1298903543417; Mon, 28 Feb 2011 06:32:23 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.200.16 with HTTP; Mon, 28 Feb 2011 06:32:03 -0800 (PST)
In-Reply-To: <AANLkTik5i3Nh6OfyU=uso8tb2LzqKiJFRd_k+hpCyyWt@mail.gmail.com>
References: <AANLkTinVwPRpo7NgJjf3+6gcrBHaJugT9OugKKAsMU9X@mail.gmail.com> <OFED4F78E9.C77C54B8-ON88257842.001A696A-88257842.001D41FB@playstation.sony.com> <AANLkTik5i3Nh6OfyU=uso8tb2LzqKiJFRd_k+hpCyyWt@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Mon, 28 Feb 2011 09:32:03 -0500
Message-ID: <AANLkTinTqHtG+HmjBm4n2yS3Ouz+Fw3i_R_Gf7qx0vn1@mail.gmail.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-System-Of-Record: true
Cc: hybi@ietf.org, Yutaka_Takeda@playstation.sony.com
Subject: Re: [hybi] With deflate-stream, Close frame doesn't work as an end of data marker
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, 28 Feb 2011 14:31:26 -0000

[BTW - here is the thread where I first posted results of an
experiment - http://www.ietf.org/mail-archive/web/hybi/current/msg01810.html
]

On Mon, Feb 28, 2011 at 4:52 AM, Greg Wilkins <gregw@webtide.com> wrote:
> I'm +1 for compression within the frame.
>
> If we compress the framing, then intermediaries will have to
> decompress in order to see framing and to know when to forward etc.
> It also has significant debug issues as it makes it much harder to
> decode a partial frame capture.
>
> I understand the argument that compression will not be as good, but I
> think some compromise is necessary.

The framing is pretty small and it is hard to imagine much redundancy
from the header (the opcode and reserved bits will be constant, but
then you will interfere with the compression by all the constantly
changing lengths), so I think little is lost by compressing only the
payload.

However, it does mean the implementation is more complicated, and I
don't believe this would be feasible using the stock inflate/deflate
in Java for example.  I would not agree to just compressing each
frame's payload independently -- my earlier experiments show this will
frequently increase the size of the data and result in only modest
savings compared to maintaining compression state over the life of the
connection (while we are discussing it, we should talk about the
parameters to use for deflate to minimize memory requirements on the
server -- experiments done for compression in SPDY [mentioned in the
linked thread] show you can get most of the benefit with more modest
memory requirements using lower parameters).

It also means we have to agree on the details of how it should be
specified, which is why the super-simple deflate-stream was added to
the standard instead of trying to get agreement on something better.

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