Re: [hybi] preliminary WebSockets compression experiments

Greg Wilkins <gregw@webtide.com> Mon, 26 April 2010 14:05 UTC

Return-Path: <gregw@webtide.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 7BAB628C148 for <hybi@core3.amsl.com>; Mon, 26 Apr 2010 07:05:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.544
X-Spam-Level:
X-Spam-Status: No, score=-0.544 tagged_above=-999 required=5 tests=[AWL=-0.545, BAYES_50=0.001]
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 Rx7xgPjOEx2v for <hybi@core3.amsl.com>; Mon, 26 Apr 2010 07:05:41 -0700 (PDT)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id 6F5EC3A6BB1 for <hybi@ietf.org>; Mon, 26 Apr 2010 07:05:41 -0700 (PDT)
Received: by wwe15 with SMTP id 15so210692wwe.31 for <hybi@ietf.org>; Mon, 26 Apr 2010 07:05:26 -0700 (PDT)
Received: by 10.216.90.3 with SMTP id d3mr1914421wef.110.1272290726293; Mon, 26 Apr 2010 07:05:26 -0700 (PDT)
Received: from [192.168.0.100] (host116-234-static.43-88-b.business.telecomitalia.it [88.43.234.116]) by mx.google.com with ESMTPS id x1sm257780wbx.1.2010.04.26.07.05.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 26 Apr 2010 07:05:22 -0700 (PDT)
Message-ID: <4BD59DA0.6060506@webtide.com>
Date: Mon, 26 Apr 2010 16:05:20 +0200
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.24 (X11/20100411)
MIME-Version: 1.0
To: Mike Belshe <mike@belshe.com>, hybi@ietf.org
References: <q2z3f94964f1004231247zc7b60dc3l5fbb4748d129c3c@mail.gmail.com> <z2o2a10ed241004231448l7a63e329p98e04fbe1a750539@mail.gmail.com>
In-Reply-To: <z2o2a10ed241004231448l7a63e329p98e04fbe1a750539@mail.gmail.com>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: [hybi] preliminary WebSockets compression experiments
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, 26 Apr 2010 14:05:42 -0000

Mike,

some slightly off topic thinking out loud on my idea that websockets
should be able to eventually replace the framing layer of SPDY....

The problem that SPDY poses for efficient compression implemented in the
framing layer is that it's frames may contain both headers and
a content body.

The headers are very compressible, but SPDY will probably have
already compressed them. The content body may be very compressible
(eg HTML) or not (eg JPG).

So if we were to run SPDY over websocket, then it would be unlikely
that the compression mechanism in websocket would be used, as SPDY
will have already compressed what is compressible.   It strikes me
as somewhat duplicated/wasted effort to have compression in both
layers.

Ideally websockets should be able to provide framing compression
sufficient so that SPDY (or any new application layer) would not
be required to have it's own compression mechanisms.

For SPDY, the problem of using framing compression is that the
decision to compress the headers and/or the body is separate.
So perhaps the frame batch concept in BWTP might be useful
after all - so that a HTTP message could be a batch of a
two frames, one (normally compressed) containing the headers
and another (optionally compressed) containing the body.

Note also that compression efficiency means that the current
1 header field per frame approach in the latest BWTP draft
is a non starter.



cheers