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

Roberto Peon <grmocg@gmail.com> Sun, 20 January 2013 23:48 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 88B3721F8718 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 20 Jan 2013 15:48:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.999
X-Spam-Level:
X-Spam-Status: No, score=-7.999 tagged_above=-999 required=5 tests=[HTML_MESSAGE=0.001, 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 9dLJfqPizgu4 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 20 Jan 2013 15:48:28 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id A2AF921F87C5 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 20 Jan 2013 15:48:28 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1Tx4cF-0004mU-5p for ietf-http-wg-dist@listhub.w3.org; Sun, 20 Jan 2013 23:47:55 +0000
Resent-Date: Sun, 20 Jan 2013 23:47:55 +0000
Resent-Message-Id: <E1Tx4cF-0004mU-5p@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <grmocg@gmail.com>) id 1Tx4cA-0004lT-IO for ietf-http-wg@listhub.w3.org; Sun, 20 Jan 2013 23:47:50 +0000
Received: from mail-la0-f49.google.com ([209.85.215.49]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <grmocg@gmail.com>) id 1Tx4c9-000123-FE for ietf-http-wg@w3.org; Sun, 20 Jan 2013 23:47:50 +0000
Received: by mail-la0-f49.google.com with SMTP id el20so433879lab.8 for <ietf-http-wg@w3.org>; Sun, 20 Jan 2013 15:47:22 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=x+r8y2TLvvTjk7FpgBCV4uliUweyEzMbyGC6iDc63RI=; b=Y+rKT3ak800PwNSnJ8+4ADfkwWA+TAfGtHsXjgxX11f7Oie5ubONTKB6IWk4hTIgr/ ETvQisRiF9+7c+rRyJICD96LgXOW98o5cPbOeh+M97vdhGtSWdYa3sf7JRzgq0QajmRS Q4DlsSVCmNWB2jfwW2mK2qvY1zTqZ0prZtAztvD/IjSncGphhuMqKOvXvUu07peMrFB/ 7ujcJz9tXwGvPi18VnvR3v/eorGoAZg0ipwo1yBVgjEawxKER7KvOcwFxLdMkOfj8mGf GZKdHRyihS6nk9GPttiQ0XDVrBDwqcy5zZN6pvSN6bYiMJkSbBAhN3InOQ65R3GGptfb nWFA==
MIME-Version: 1.0
X-Received: by 10.112.24.161 with SMTP id v1mr6759900lbf.28.1358725642777; Sun, 20 Jan 2013 15:47:22 -0800 (PST)
Received: by 10.112.81.5 with HTTP; Sun, 20 Jan 2013 15:47:22 -0800 (PST)
Received: by 10.112.81.5 with HTTP; Sun, 20 Jan 2013 15:47:22 -0800 (PST)
In-Reply-To: <CAHBU6iuaeAeTrz6TSOyhNvW2pXWgQB_RQ+6MYAb9DyJUZ00Rcg@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>
Date: Sun, 20 Jan 2013 15:47:22 -0800
Message-ID: <CAP+FsNfMKT02nwX-i1LYARcjhQH3sNotkzaJH4sY0YQmHk2WcA@mail.gmail.com>
From: Roberto Peon <grmocg@gmail.com>
To: Tim Bray <tbray@textuality.com>
Cc: Will Chan <willchan@chromium.org>, Mark Nottingham <mnot@mnot.net>, HTTP Working Group <ietf-http-wg@w3.org>, Pablo <paa.listas@gmail.com>
Content-Type: multipart/alternative; boundary="485b390f7de448f68904d3c0f70b"
Received-SPF: pass client-ip=209.85.215.49; envelope-from=grmocg@gmail.com; helo=mail-la0-f49.google.com
X-W3C-Hub-Spam-Status: No, score=-4.4
X-W3C-Hub-Spam-Report: AWL=-1.727, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1Tx4c9-000123-FE ccff04805f3f7c9042ba79b1840cf03f
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/CAP+FsNfMKT02nwX-i1LYARcjhQH3sNotkzaJH4sY0YQmHk2WcA@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/16058
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>

Text formats are, surprisingly, not easier to debug in my experience.

Admittedly, they only require a text editor to examine, but, for a binary
protocol, that is easy to remedy with a short utility. The ambiguity of how
to parse that text format, however makes this examination more time
consuming and error prone.

In terms of total complexity, binary framed protocols are often far
simpler, and thus more robust. In terms of total lines of code, a binary
framer plus utility to present the data in human readable format is still
less complex and smaller than most text framed protocols. In terms of CPU
consumption, binary framed protocols are often faster.

If you'd like to make a fast http parser, I'm happy to give you a binary
framed version which will be significantly faster, smaller in lines of
code, and more memory efficient.

-=R
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/
> >
> >
> >
> >
>
>