Re: [hybi] preliminary WebSockets compression experiments

John Tamplin <jat@google.com> Fri, 23 April 2010 22:33 UTC

Return-Path: <jat@google.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 D25233A6966 for <hybi@core3.amsl.com>; Fri, 23 Apr 2010 15:33:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -99.469
X-Spam-Level:
X-Spam-Status: No, score=-99.469 tagged_above=-999 required=5 tests=[AWL=0.093, BAYES_40=-0.185, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, USER_IN_WHITELIST=-100]
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 n9HM8kMycMmd for <hybi@core3.amsl.com>; Fri, 23 Apr 2010 15:33:49 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.35]) by core3.amsl.com (Postfix) with ESMTP id 5B3BE3A687E for <hybi@ietf.org>; Fri, 23 Apr 2010 15:33:49 -0700 (PDT)
Received: from kpbe13.cbf.corp.google.com (kpbe13.cbf.corp.google.com [172.25.105.77]) by smtp-out.google.com with ESMTP id o3NMXag2014531 for <hybi@ietf.org>; Sat, 24 Apr 2010 00:33:37 +0200
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1272062017; bh=yzizSI6LD18QMhzpT9mS4y5gKMQ=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=DvUU9Rcl3MCdi1fO/cK3mINbHZ6U8hl8wubrfcXlxTJF47kLdiPQok19w4bqglIHK imJ3+p1JD9S/Bt3EdgWFw==
DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:from:date:message-id: subject:to:cc:content-type:x-system-of-record; b=x0vQxGQywxG9auS5zg3WTGE6vvxasorMesV2Dh0eoxIjxyBdfzVsqJrmRgsEWlGE9 FhkaGUsbsW+ExJMjMhlMg==
Received: from gwj19 (gwj19.prod.google.com [10.200.10.19]) by kpbe13.cbf.corp.google.com with ESMTP id o3NMXZfP013823 for <hybi@ietf.org>; Fri, 23 Apr 2010 17:33:35 -0500
Received: by gwj19 with SMTP id 19so2923277gwj.5 for <hybi@ietf.org>; Fri, 23 Apr 2010 15:33:35 -0700 (PDT)
Received: by 10.150.2.4 with SMTP id 4mr664692ybb.176.1272062015154; Fri, 23 Apr 2010 15:33:35 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.150.117.30 with HTTP; Fri, 23 Apr 2010 15:33:15 -0700 (PDT)
In-Reply-To: <v2oad99d8ce1004231523jcd948913g3606dfc340a9d1a0@mail.gmail.com>
References: <q2z3f94964f1004231247zc7b60dc3l5fbb4748d129c3c@mail.gmail.com> <z2o2a10ed241004231448l7a63e329p98e04fbe1a750539@mail.gmail.com> <z2w3f94964f1004231511u57f0d702z78e582b5481a2877@mail.gmail.com> <v2oad99d8ce1004231523jcd948913g3606dfc340a9d1a0@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Fri, 23 Apr 2010 18:33:15 -0400
Message-ID: <q2v3f94964f1004231533n82ad655bucf2eadc2a5ca89e4@mail.gmail.com>
To: Roberto Peon <fenix@google.com>
Content-Type: multipart/alternative; boundary="000e0cd4054e8ba9a60484ef0415"
X-System-Of-Record: true
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: Fri, 23 Apr 2010 22:33:50 -0000

On Fri, Apr 23, 2010 at 6:23 PM, Roberto Peon <fenix@google.com> wrote:

> If compression is optional and/or negotiated, it is likely that it will
> either not be implemented, or it will be turned off by various end-user
> devices that wish to inflate benchmark numbers.
>

How would turning off compression inflate benchmark numbers?  If compression
is a win, then it should make the benchmarks worse to disable it.


> SPDY requires compression support over the headers of certain control
> frames. To date, we've not seen a case where this has resulted in a larger
> request than raw, and it does provide for at least the availability of the
> gzip functionality at the endpoint.
>
> For Websockets, if we use gzip, the decision to do so should be made
> *solely* by the sender of that data. There should probably be no
> negotiation, else we'll end up with liars and cheats again.
>

I guess I am just missing the point here.  Say I have a JS client talking to
some backend, and I want to exchange data between them.  Just like I don't
care about the underlying transport, whether a VPN or other tunnel is
involved, or how the name is resolved, I don't care how my data gets to the
other end.  When I hand a frame to the browser, it seems reasonable for it
to send it to the server the best way it sees fit (subject to the agreement
with the server) -- if compressing the data is better than not compressing
it, it should compress it.  The server should then take the data that was
received and convert it back to the form the client code provided, by
decompressing if necessary.

As a programmer who is just sending data back and forth, I would prefer not
to have to worry about it when writing my client/server code -- my server
receives a message and interprets it, and if it happened to be
compressed/decompressed along the way that's fine.  It is no different than
writing a CGI program generating HTML -- let the web server do the
compression if the client supports it.

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