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

Greg Wilkins <gregw@webtide.com> Mon, 28 February 2011 09:51 UTC

Return-Path: <gregw@intalio.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 F3D663A6B0F for <hybi@core3.amsl.com>; Mon, 28 Feb 2011 01:51:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.566
X-Spam-Level:
X-Spam-Status: No, score=-2.566 tagged_above=-999 required=5 tests=[AWL=0.411, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 SPlTVL7yoZ2b for <hybi@core3.amsl.com>; Mon, 28 Feb 2011 01:51:27 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id D237D3A6B0E for <hybi@ietf.org>; Mon, 28 Feb 2011 01:51:26 -0800 (PST)
Received: by vws6 with SMTP id 6so3343838vws.31 for <hybi@ietf.org>; Mon, 28 Feb 2011 01:52:26 -0800 (PST)
MIME-Version: 1.0
Received: by 10.52.91.230 with SMTP id ch6mr1787003vdb.270.1298886745612; Mon, 28 Feb 2011 01:52:25 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.52.165.129 with HTTP; Mon, 28 Feb 2011 01:52:25 -0800 (PST)
In-Reply-To: <OFED4F78E9.C77C54B8-ON88257842.001A696A-88257842.001D41FB@playstation.sony.com>
References: <AANLkTinVwPRpo7NgJjf3+6gcrBHaJugT9OugKKAsMU9X@mail.gmail.com> <OFED4F78E9.C77C54B8-ON88257842.001A696A-88257842.001D41FB@playstation.sony.com>
Date: Mon, 28 Feb 2011 20:52:25 +1100
X-Google-Sender-Auth: R19sv1lo88dmaYMHJwME7MhZ5Z4
Message-ID: <AANLkTik5i3Nh6OfyU=uso8tb2LzqKiJFRd_k+hpCyyWt@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Yutaka_Takeda@playstation.sony.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
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 09:51:28 -0000

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.

To look at the analogy of HTTP, compression does not change HTTP
framing and intermediaries do not need to be updated to deal with any
new compression algorithms that may be deployed.

regards



On 25 February 2011 16:19,  <Yutaka_Takeda@playstation.sony.com> wrote:
>
> Hi,
>
> If we could apply deflate-stream only to payload, that would solve
> the problem. I was looking for reasons why entire stream has to be
> compressed, and found only one here:
>
> http://www.ietf.org/mail-archive/web/hybi/current/msg04117.html
>
> From layering aspects, I would prefer any compression taking place
> on top of framing layer from the other way around:
>
>    +-------------+
>    | compression |
>    +-------------+
>    +-------------+
>    | WS framing  |
>    +-------------+
>    +-------------+
>    |     TCP     |
>    +-------------+
>
> where, current draft -05 sugggests:
>
>    +-------------+
>    | WS framing  |
>    +-------------+
>    +-------------+
>    | compression |
>    +-------------+
>    +-------------+
>    |     TCP     |
>    +-------------+
>
> Justifications for the former layering would be:
>
> o  Framing is necessary because of the underlying transport
>    layer is in fact 'streaming', or TCP. (TCP and WS-framing
>    are more tightly coupled)
> o  WS-layer needs to buffer entire message (passed by app/JS)
>    anyway.
> o  Text and binary do not interleave fragments, hence there
>    needs only one context for compression / decompression in
>    memory.
> o  Overhead (frame headers and control frames) are much smaller
>    than payload of text/binary frames and negligible as to
>    compression ratio.
> o  Close frame appears at the end of stream with no traling
>    bytes. (Can remove requirement for TCP graceful shutdown).
>
> Please let me know if I am missing something...
>
> Best.
> - Yutaka
>
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>
>