Re: The use of binary data in any part of HTTP 2.0 is not good

William Chan (陈智昌) <willchan@chromium.org> Sun, 20 January 2013 23:49 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2928F21F8727 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 20 Jan 2013 15:49:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.078
X-Spam-Level:
X-Spam-Status: No, score=-7.078 tagged_above=-999 required=5 tests=[FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_HI=-8]
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 AIvg3FQGDpHz for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 20 Jan 2013 15:49:27 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 2670B21F8718 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 20 Jan 2013 15:49:27 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1Tx4dW-00055c-HI for ietf-http-wg-dist@listhub.w3.org; Sun, 20 Jan 2013 23:49:14 +0000
Resent-Date: Sun, 20 Jan 2013 23:49:14 +0000
Resent-Message-Id: <E1Tx4dW-00055c-HI@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <willchan@google.com>) id 1Tx4dR-00053c-Dz for ietf-http-wg@listhub.w3.org; Sun, 20 Jan 2013 23:49:09 +0000
Received: from mail-qe0-f52.google.com ([209.85.128.52]) by lisa.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <willchan@google.com>) id 1Tx4dQ-0000sS-FB for ietf-http-wg@w3.org; Sun, 20 Jan 2013 23:49:09 +0000
Received: by mail-qe0-f52.google.com with SMTP id 6so86530qeb.25 for <ietf-http-wg@w3.org>; Sun, 20 Jan 2013 15:48:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=YKoNzLFWgXOFKbeUzl4FhIjAO4xO4rXEriqDd7kWUHk=; b=S9FcKhbzgZH+K7N9YL9AHuB1aPQaK1/dGN61b8nbFvipFQw2QNzr8PolVfbrsToLUh 4dEOWZDlI9Yx3TCdITiuOoCFXMm7LK6AsDFA9R4vjya4L0EovXe0QumbEra5BE3wSL2d WRH9D7qgttYzDplgMW0B27HARBAJLrRZx8dqO5AA8aD3/sBH39tayJHCIMpsbpm/fwli 7gxX2a9zAzUZYTvuXpqaUjW1AAs+x+hs30xT4ijTVB4ns61X0lttWlExNZuL68Xa0BLo Yt+EgysjO8A5YO/V6Dbr+VoJyaKB9eYayP1FSS1JXW1Ry9SVzsMwRx/RAABSMZcqfYX7 60/w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=YKoNzLFWgXOFKbeUzl4FhIjAO4xO4rXEriqDd7kWUHk=; b=UzbFXyYGnfg05f+4fgDLP9ZibVjCgT6pWsOkZWCLOHx3DbtMpIIlGqyLVH0fcBeOnQ /boKVmH7jEB5CKlO2zRm7U2BJZSgQtByS2/uV+Yn7W1FhQ4epCVqAeU6n2Y/RQDSCwcQ H9OpNbwRgp56QbsTGLYSVVvxCCAfWDhbG+UW0=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=YKoNzLFWgXOFKbeUzl4FhIjAO4xO4rXEriqDd7kWUHk=; b=foyWPncZ09yaKKX2pvigZP87uqyY3fjcyHnCwK1AscdhN3Hy9eQK2kR8pdA8XCzb2b vrl4KL0zI98jL4DIeIylOxFT8ARsSnpzgZn9kSRYRAbC1ixPQjAxOYsO/H00ER1NiE2J f0S/1+V1/76iZ23n+fYmXqo/VRgpMuqb1DBxr8OZ0fgyAoIJEYJWTHIAxoqUp8d19mHU WyjphI8Ut4mVwCBVRsp466Nz6eM2l86GPfjSOcP1tN3jtoh4MzdlRXXY/H9ckr6PJuIy Mw2E8G2FKXWFxDfll8jpXr6fJduTJf9nWAFbXBevHUbFNj8Eg43jgPUz2kYtkRdD2DfO ps7A==
MIME-Version: 1.0
X-Received: by 10.224.70.205 with SMTP id e13mr17478505qaj.77.1358725722589; Sun, 20 Jan 2013 15:48:42 -0800 (PST)
Sender: willchan@google.com
Received: by 10.229.57.163 with HTTP; Sun, 20 Jan 2013 15:48:42 -0800 (PST)
In-Reply-To: <CABP7Rbdft=ukmL+vgyJtSTRSVytxMFkX6ctqhqhJ2Njw_OLr1g@mail.gmail.com>
References: <CAAZO4q4vEiYhH5FaX2XCxXox9jkf4dLTy8coQZiE+CYHA-QzBg@mail.gmail.com> <CAA4WUYhkVBRAyY1O32aOiWB8=46SBidFOjKH+e7PGbB7mKzmiQ@mail.gmail.com> <DC03C924-9DCC-45CE-B9DB-5906EADAF9C4@mnot.net> <CAHBU6iuaeAeTrz6TSOyhNvW2pXWgQB_RQ+6MYAb9DyJUZ00Rcg@mail.gmail.com> <CABP7Rbdft=ukmL+vgyJtSTRSVytxMFkX6ctqhqhJ2Njw_OLr1g@mail.gmail.com>
Date: Sun, 20 Jan 2013 15:48:42 -0800
X-Google-Sender-Auth: 50q9YoLm9NrK-S_aYWD0XtvcrDg
Message-ID: <CAA4WUYjyX2QkrfB5Sj8_vyyQuC6Ftx7XsvF+om66D6=EU5V5Qg@mail.gmail.com>
From: "William Chan (陈智昌)" <willchan@chromium.org>
To: James M Snell <jasnell@gmail.com>
Cc: Tim Bray <tbray@textuality.com>, Mark Nottingham <mnot@mnot.net>, HTTP Working Group <ietf-http-wg@w3.org>, Pablo <paa.listas@gmail.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Gm-Message-State: ALoCoQlVwTrgOAm4X3+H8reqe/VtFexO2o44Zocg45YA1SXYZKGdmkBKVfMihE4WLP25Z0TRCXjdST+o5Hj8K+uyRi+os0uP7BbW5njGeA99EuwJQ8QDaUEHk5IYeiY8xy2RbXMOWSCs/WBSSde2ugGovpfuvVo8iVxiwPgubyne6OlNdPdXxPJsrbG99YCOl8L1j7IncBEk
Received-SPF: pass client-ip=209.85.128.52; envelope-from=willchan@google.com; helo=mail-qe0-f52.google.com
X-W3C-Hub-Spam-Status: No, score=-3.9
X-W3C-Hub-Spam-Report: AWL=-1.869, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1Tx4dQ-0000sS-FB 3cdf4817ce94087b240b4f1ccf6667d3
X-Original-To: ietf-http-wg@w3.org
Subject: Re: The use of binary data in any part of HTTP 2.0 is not good
Archived-At: <http://www.w3.org/mid/CAA4WUYjyX2QkrfB5Sj8_vyyQuC6Ftx7XsvF+om66D6=EU5V5Qg@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/16061
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

Tim's question can already be partially answered. See the SPDY
whitepaper (http://www.chromium.org/spdy/spdy-whitepaper). I quote:
"Header compression resulted in an ~88% reduction in the size of
request headers and an ~85% reduction in the size of response headers.
On the lower-bandwidth DSL link, in which the upload link is only 375
Kbps, request header compression in particular, led to significant
page load time improvements for certain sites (i.e. those that issued
large number of resource requests). We found a reduction of 45 - 1142
ms in page load time simply due to header compression." I say that
this counts as the answer, because from a human's perspective, the
difference between header compression and bohe is marginal. It's
binary. Yes, maybe some humans will internalize a binary encoding of
headers and be able to grok hexdumps, but to the vast majority of
people, it's basically the same.

Yes, there are other concerns too, such as CPU/memory issues. Also,
that's a qualitative difference in terms of simplicity of parsing by
machines. Patrick wrote up a good explanation here:
http://news.ycombinator.com/item?id=4933567.

On Sun, Jan 20, 2013 at 3:36 PM, James M Snell <jasnell@gmail.com> wrote:
> This is still being worked out really, qualitative numbers will be coming.
> So far, however, we're talking about around a 50% reduction in header
> overhead on the wire without compression. Obviously, however, we're no where
> near being done yet.
>
> On Jan 20, 2013 3:26 PM, "Tim Bray" <tbray@textuality.com> wrote:
>>
>> Would it be possible to be data-driven?  Textual formats are
>> well-known to be easier to debug; but clearly, if there’s a
>> substantial performance benefit to going all-binary, so be it. So what
>> is the advantage, quantitatively? -T
>>
>> On Sun, Jan 20, 2013 at 3:04 PM, Mark Nottingham <mnot@mnot.net> wrote:
>> > In one of our recent meetings, one of the grey-bearded IETF old-timers
>> > (I forget which, sorry) said that a textual-protocol was a nice-to-have, but
>> > that it shouldn't be a determining factor in design.
>> >
>> > I.e., if you can get everything you need out of a protocol, *and* make
>> > it textual, do so, but if it detracts from the value you get from it, don't
>> > let that constrain you.
>> >
>> > FWIW, I think that's a good rule of thumb. However, this means that the
>> > community is going to need *excellent* tooling for analysing, debugging,
>> > etc. HTTP traffic; and I don't just mean a Wireshark plugin!
>> >
>> > Cheers,
>> >
>> >
>> > On 21/01/2013, at 9:36 AM, William Chan (陈智昌) <willchan@chromium.org>
>> > wrote:
>> >
>> >> There are many advantages to using binary data. If you would like a
>> >> textual representation of a protocol, I advise using a utility to
>> >> generate one for you.
>> >>
>> >> On Sun, Jan 20, 2013 at 2:20 PM, Pablo <paa.listas@gmail.com> wrote:
>> >>> Hello,
>> >>>
>> >>>   I have readed this document
>> >>> http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft1 today
>> >>> [1].
>> >>>
>> >>> I just wanted to say that I think that the use of any binary data
>> >>> (framing,
>> >>> header compression, etc.) in any place of the "header" part of HTTP
>> >>> protocol
>> >>> is not good; so, please only use plaintext for HTTP 2.0 because,
>> >>> otherwise,
>> >>> that will make very difficult to "see" the headers's protocol :)
>> >>>
>> >>> Thats all,
>> >>> Thanks for reading this few lines, sorry for my basic English, and I
>> >>> hope
>> >>> that you can re-think all this of using binary data in any part of
>> >>> HTTP X.X
>> >>> (ej: session layer).
>> >>>
>> >>>
>> >>> [1] I started knowing about HTTP 2.0 here:
>> >>> http://webscannotes.com/2012/10/09/http-2-0-officially-in-the-works/
>> >>>
>> >>
>> >
>> > --
>> > Mark Nottingham   http://www.mnot.net/
>> >
>> >
>> >
>> >
>>
>