Re: [hybi] preliminary WebSockets compression experiments

Mike Belshe <mike@belshe.com> Tue, 27 April 2010 14:46 UTC

Return-Path: <mike@belshe.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 B769728C25A for <hybi@core3.amsl.com>; Tue, 27 Apr 2010 07:46:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.345
X-Spam-Level:
X-Spam-Status: No, score=0.345 tagged_above=-999 required=5 tests=[AWL=-0.279, BAYES_50=0.001, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=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 0JCBMaBngkAs for <hybi@core3.amsl.com>; Tue, 27 Apr 2010 07:46:12 -0700 (PDT)
Received: from mail-pv0-f172.google.com (mail-pv0-f172.google.com [74.125.83.172]) by core3.amsl.com (Postfix) with ESMTP id AC2AF28C232 for <hybi@ietf.org>; Tue, 27 Apr 2010 07:41:00 -0700 (PDT)
Received: by pvg4 with SMTP id 4so106428pvg.31 for <hybi@ietf.org>; Tue, 27 Apr 2010 07:40:46 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.143.154.27 with SMTP id g27mr3169051wfo.333.1272379245413; Tue, 27 Apr 2010 07:40:45 -0700 (PDT)
Received: by 10.143.44.3 with HTTP; Tue, 27 Apr 2010 07:40:45 -0700 (PDT)
In-Reply-To: <4BD6CEE2.7020109@webtide.com>
References: <q2z3f94964f1004231247zc7b60dc3l5fbb4748d129c3c@mail.gmail.com> <z2o2a10ed241004231448l7a63e329p98e04fbe1a750539@mail.gmail.com> <4BD59DA0.6060506@webtide.com> <k2m2a10ed241004260928q2448b8f6nae7c13db81a97579@mail.gmail.com> <4BD6CEE2.7020109@webtide.com>
Date: Tue, 27 Apr 2010 07:40:45 -0700
Message-ID: <r2t2a10ed241004270740n7b406d83pc58cf9e9f99fa4f8@mail.gmail.com>
From: Mike Belshe <mike@belshe.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: multipart/alternative; boundary="001636e0b681f147ae048538e0eb"
Cc: hybi@ietf.org
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: Tue, 27 Apr 2010 14:46:13 -0000

On Tue, Apr 27, 2010 at 4:47 AM, Greg Wilkins <gregw@webtide.com> wrote:

> Mike Belshe wrote:
> > On Mon, Apr 26, 2010 at 7:05 AM, Greg Wilkins <gregw@webtide.com
> > <mailto:gregw@webtide.com>> wrote:
> >
> >     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 most efficient compression will always come from the entity which
> > knows the most about what it is compressing.   Compressing headers
> > separately from other content compresses more efficiently than if you
> > mix compression of headers and data.  (Imagine a gzip buffer with 32KB
> > of window where you first send 500B of headers and then 50KB of data
> > through it - by the time your next chunk of headers come through, all
> > state from the prior headers has been lost.  And the data that you sent
> > through might have been compressed anyway!)
> >
> > I welcome you to test out this theory - I've done so and I know the
> > answer :-)   As you can see, header-specific compression is a feature.
>
> I'm not disputing this.   Yet it is still useful to have compression
> available when the source of the data does not compress it - otherwise
> this would be an argument for HTTP not supporting compression..


> If we are to have a multi-layered protocol then it would be
> desirable to avoid every layer having it's own compression mechanism.
>
> So my point was that since we appear to recognize that compression
> is valuable to have in the framing layer (to handle apps that
> do not compress), it would be great if we could design that
> with enough flexibility so that SPDY over websocket would
> not need to implement it's own compression.    Ideally the
> framing compression would be flexible enough so that SDPY
> would be able to specify a content-specific compressor
> for header frames.
>

Ok.



>
> Now the complexity of layers delegating compression to
> the framing layer may well be equal to the complexity of
> each layer implementing it's own framing.  But I do think
> it worth while evaluating if this is true or not.
>
>
>
> > Roberto tried to convey why optional compression is a bad thing
> > sometimes.
>
> Again, I'm not really disputing the validity of Roberto's example.
> I understand that there are are intermediaries that act less than
> sensibly.
>
> However, I'm not sure that is sufficient reason to mandate a fixed
> compression algorithm.    To do so, we would raise the complexity
> of the simplest client (and while I agree that is not by much, there
> is still a definite sentiment that we should keep it really simple).
>
> Also, if we are to support future compression algorithms (or
> content-specific ones), then we must support negotiated.  In
> which case, there will be null compressors and lazy
> intermediaries will just negotiate a noop compressor.
>
> What Roberto's example does show, is that there in a genuine
> desire of intermediaries (even ones baked into the client
> computer) to inspect and add value to passing traffic.
>
>
Yes, and they will do so even if it means ruining the poor user's
experience! :-)

Mike



> cheers
>
>
>
>
>
>
>
>
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>