Re: [hybi] Payload only compression extension, again

Brodie Thiesfield <brodie@jellycan.com> Mon, 25 July 2011 23:46 UTC

Return-Path: <brofield@gmail.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DBFC911E80D7 for <hybi@ietfa.amsl.com>; Mon, 25 Jul 2011 16:46:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.977
X-Spam-Level:
X-Spam-Status: No, score=-2.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jpkdMgEijLht for <hybi@ietfa.amsl.com>; Mon, 25 Jul 2011 16:46:01 -0700 (PDT)
Received: from mail-pz0-f53.google.com (mail-pz0-f53.google.com [209.85.210.53]) by ietfa.amsl.com (Postfix) with ESMTP id 5739811E80B1 for <hybi@ietf.org>; Mon, 25 Jul 2011 16:46:01 -0700 (PDT)
Received: by pzk6 with SMTP id 6so8864561pzk.26 for <hybi@ietf.org>; Mon, 25 Jul 2011 16:46:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=pDGWwdBWjwZQi6eJVDy1QLPMhC/xEgJyy2yfNrmnJps=; b=dzTwy7WlrLu41d6yf58Gn9nkTLPRDGF0hrfedrFWeQGpsQ5TcSsBJlBYS3vUm18Yqs A2H0+5EjR3+GlIyjInprytl0FUoVPxeIPo8MpqxObemM0ts+BzKAjnvUpi5/CARut0Gn DG7OIIAalzheCSxXVjBWe8ZeKPcCJ1pWiMn6Y=
MIME-Version: 1.0
Received: by 10.68.37.33 with SMTP id v1mr8965865pbj.32.1311637560946; Mon, 25 Jul 2011 16:46:00 -0700 (PDT)
Sender: brofield@gmail.com
Received: by 10.68.50.97 with HTTP; Mon, 25 Jul 2011 16:46:00 -0700 (PDT)
In-Reply-To: <CABLsOLCk9DHHwk=NumpNruCgso5nr6_QwaLtfiZJ-m0Tp7vm_Q@mail.gmail.com>
References: <AANLkTik2LqCC2-ZLLdWNNaQ18ypcQU_5djJobkYtYk6T@mail.gmail.com> <AANLkTik+uh98b0n7U=xrE0Aaa7MyBfZVXSwj+8wfVTKW@mail.gmail.com> <AANLkTinCtDepu+wDt4=8GyXqhfn=SQ7v2SjJhKzP2Mzr@mail.gmail.com> <AANLkTinhw0j5U_tvfCCrcEx=J6b7wBua4XzhWkvthUjL@mail.gmail.com> <BANLkTi=SjQwGQu-3v2wjniyp9DrQ1ZcQdA@mail.gmail.com> <BANLkTi=dqFN-57GV3rYDv4feTAaZFQko1g@mail.gmail.com> <BANLkTikWFwfs0FOuET5ZS1HEzjweNO0_CA@mail.gmail.com> <BANLkTikHXtVM+7nfz60toKTJCXBuMwMC1g@mail.gmail.com> <BANLkTinsMu+Znbg7Fe7+9HZeZg=Q8SwDHg@mail.gmail.com> <4DB8D3B2.8090002@mozilla.com> <BANLkTimE9qYEvBVLGbOsU7YDVGDwHpGjgA@mail.gmail.com> <BANLkTi=L=8r7dCkRa6MTC3AGziZWeM+fpA@mail.gmail.com> <BANLkTi=-msm-ppt1n_2U5+bHoZO1i+Yj7A@mail.gmail.com> <BANLkTikEYhsdcrK1RqQTwjy3yuSVOaw=Dw@mail.gmail.com> <BANLkTimhEai77LC53NFeOhgNzFQes7HS7g@mail.gmail.com> <BANLkTinW8SL-kwJs-ZsJPmqj269dT29N0A@mail.gmail.com> <CAH9hSJYkjiGPM6RihBkF54zFDXFn935Y0T4FU91G6ttekCyBwA@mail.gmail.com> <CALiegfkUa90DP=YAHJuyQK=CrMs4MoSguxca60fuxM16GgYr8w@mail.gmail.com> <CABLsOLAkdxrGJzqvmoBSxF3QH_zqjg2DHzW2TkfJC+iYiSXKrg@mail.gmail.com> <CAH9hSJZmdSU0j5WETz2A339Gbe=7BTp3VXfie0VChboQoJ=Pjw@mail.gmail.com> <CAH_y2NG6uWp_Utu_0NRXUA2-i+sMdFjDWnf42zM0JaOzojcXiA@mail.gmail.com> <CAH9hSJbS+y8+742OC0fc_1Hy8VgopPSG7yN+BgBCx4CY+kzGnQ@mail.gmail.com> <CABLsOLCk9DHHwk=NumpNruCgso5nr6_QwaLtfiZJ-m0Tp7vm_Q@mail.gmail.com>
Date: Tue, 26 Jul 2011 08:46:00 +0900
X-Google-Sender-Auth: eqbDAI5dnN7cHuQrPGF-aSKEKdM
Message-ID: <CAMY5453CsMxBJ8cfXee4YADY2z89=r1y646Y4GsaAxS71=-FsA@mail.gmail.com>
From: Brodie Thiesfield <brodie@jellycan.com>
To: John Tamplin <jat@google.com>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>, Greg Wilkins <gregw@intalio.com>
Subject: Re: [hybi] Payload only compression extension, again
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/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, 25 Jul 2011 23:46:02 -0000

On Tue, Jul 26, 2011 at 12:05 AM, John Tamplin <jat@google.com> wrote:
> On Mon, Jul 25, 2011 at 2:03 AM, Takeshi Yoshino <tyoshino@google.com>
> wrote:
>> It's also an option that we introduce COMP bit in wire spec but initially
>> have no API exposed for JavaScript to control that.
>
> That would also be useful if there were heuristics to choose when to
> compress the data.
> However, as long as the compression state is maintained across frames, I
> don't think it is a real problem to simply compress everything.  Sure, if
> someone sends random data it will get bigger, but not by much.  Even on
> binary data like Quake update frames, there is substantial redundancy to be
> removed via compression, so with real-world data the payload is almost never
> going to get bigger by compressing.

Certainly with this sort of payload that is initially being considered
normal for websocket I agree. However I expect that WS will also be
used to stream pre-compressed data to a client as well (e.g. images,
video, audio, resources in a zip at the server) for things like games.

It would also be useful if there were not heuristics to decide if the
data should be compressed or not. Often the client or server will have
external knowledge that the data will not benefit from compression,
and so having the ability to mark frames/messages as do-not-compress
is useful to allow savings of both network bytes and cpu time.

Regards,
Brodie