Re: [hybi] Payload only compression extension, again

John Tamplin <jat@google.com> Mon, 25 July 2011 16:12 UTC

Return-Path: <jat@google.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 BBDE311E81F4 for <hybi@ietfa.amsl.com>; Mon, 25 Jul 2011 09:12:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.939
X-Spam-Level:
X-Spam-Status: No, score=-105.939 tagged_above=-999 required=5 tests=[AWL=0.037, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
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 mYFbLHA6dAua for <hybi@ietfa.amsl.com>; Mon, 25 Jul 2011 09:12:54 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by ietfa.amsl.com (Postfix) with ESMTP id 3722221F8D69 for <hybi@ietf.org>; Mon, 25 Jul 2011 08:05:59 -0700 (PDT)
Received: from hpaq11.eem.corp.google.com (hpaq11.eem.corp.google.com [172.25.149.11]) by smtp-out.google.com with ESMTP id p6PF5wIr025252 for <hybi@ietf.org>; Mon, 25 Jul 2011 08:05:59 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1311606359; bh=IX3Asa4QD04qqJHiinSdXkYojeU=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=nRKgv9C/RX354jlhLvJTyEfeq9wseW+YkJrfyIRVoVCRptSrjLEZRTRbXpbEZUpyH cTAi0muFhEtoGxk1ZAMbQ==
DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=dkim-signature:mime-version:in-reply-to:references:from:date: message-id:subject:to:cc:content-type:x-system-of-record; b=AsrAJ84WfMG3wHzJZOCtGZLlwYwq18INNgQH3f8B+sWx6mz4eIK7bx4HlBGDck8Q4 pQphBQGO3fh/o9edzauUQ==
Received: from ywm21 (ywm21.prod.google.com [10.192.13.21]) by hpaq11.eem.corp.google.com with ESMTP id p6PF5ba9024969 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for <hybi@ietf.org>; Mon, 25 Jul 2011 08:05:57 -0700
Received: by ywm21 with SMTP id 21so2574787ywm.12 for <hybi@ietf.org>; Mon, 25 Jul 2011 08:05:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=f2xCUjf8D/m5moUgJAhKZEXsiMz4jARgf1HGxbMqTfg=; b=DeWf8r0hkOgI90uqA4CoZpWINdi75U2QetPlwYzk1ZMk/EjOPvu0SixRB7zICoz9nt WRTjyPf7dGLF1TFRNBtA==
Received: by 10.150.200.14 with SMTP id x14mr1101409ybf.173.1311606357120; Mon, 25 Jul 2011 08:05:57 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.150.49.7 with HTTP; Mon, 25 Jul 2011 08:05:37 -0700 (PDT)
In-Reply-To: <CAH9hSJbS+y8+742OC0fc_1Hy8VgopPSG7yN+BgBCx4CY+kzGnQ@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>
From: John Tamplin <jat@google.com>
Date: Mon, 25 Jul 2011 11:05:37 -0400
Message-ID: <CABLsOLCk9DHHwk=NumpNruCgso5nr6_QwaLtfiZJ-m0Tp7vm_Q@mail.gmail.com>
To: Takeshi Yoshino <tyoshino@google.com>
Content-Type: multipart/alternative; boundary="000e0cd306da0056e904a8e62746"
X-System-Of-Record: true
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 16:12:56 -0000

On Mon, Jul 25, 2011 at 2:03 AM, Takeshi Yoshino <tyoshino@google.com>wrote:

> Servers can get some advice about this from application level, but user
> agents don't have any way. May we ask API side to add some interface to
> allow JavaScript to give some hint? Something like
>

It seems unlikely to get this into the JS API anytime soon -- I think the
initial version will have to be entirely without hints from JS.

Longer term, I think you need to allow the JS code more control over
compression to get the best results, as frequently you can do much better
with domain-specific compression algorithms.  For example, chess endgame
databases get 2-3 times better compression with algorithms that know how the
index is structured.


> 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.

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