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

Amos Jeffries <squid3@treenet.co.nz> Tue, 22 January 2013 08:57 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 7F8C621F8622 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 22 Jan 2013 00:57:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.3
X-Spam-Level:
X-Spam-Status: No, score=-9.3 tagged_above=-999 required=5 tests=[AWL=1.300, BAYES_00=-2.599, 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 BgSSecVnvOUS for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 22 Jan 2013 00:57:20 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 5581821F85C3 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 22 Jan 2013 00:57:16 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1TxZeG-000681-Go for ietf-http-wg-dist@listhub.w3.org; Tue, 22 Jan 2013 08:56:04 +0000
Resent-Date: Tue, 22 Jan 2013 08:56:04 +0000
Resent-Message-Id: <E1TxZeG-000681-Go@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <squid3@treenet.co.nz>) id 1TxZeB-00067M-2l for ietf-http-wg@listhub.w3.org; Tue, 22 Jan 2013 08:55:59 +0000
Received: from ip-58-28-153-233.static-xdsl.xnet.co.nz ([58.28.153.233] helo=treenet.co.nz) by lisa.w3.org with esmtp (Exim 4.72) (envelope-from <squid3@treenet.co.nz>) id 1TxZeA-0003DJ-07 for ietf-http-wg@w3.org; Tue, 22 Jan 2013 08:55:59 +0000
Received: from [192.168.1.109] (unknown [14.1.64.4]) by treenet.co.nz (Postfix) with ESMTP id 1F742E72BF for <ietf-http-wg@w3.org>; Tue, 22 Jan 2013 21:55:27 +1300 (NZDT)
Message-ID: <50FE53F9.4040800@treenet.co.nz>
Date: Tue, 22 Jan 2013 21:55:21 +1300
From: Amos Jeffries <squid3@treenet.co.nz>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
MIME-Version: 1.0
To: ietf-http-wg@w3.org
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> <CAP+FsNfMKT02nwX-i1LYARcjhQH3sNotkzaJH4sY0YQmHk2WcA@mail.gmail.com> <CAOdDvNpfd_DwGgv2gzuAjHZ++8_oJaK1VRvoRiQBkXyrgY5-yA@mail.gmail.com>
In-Reply-To: <CAOdDvNpfd_DwGgv2gzuAjHZ++8_oJaK1VRvoRiQBkXyrgY5-yA@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=58.28.153.233; envelope-from=squid3@treenet.co.nz; helo=treenet.co.nz
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: AWL=-3.449, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1TxZeA-0003DJ-07 fa676b45fb9bd0cedb191191dbe88bbd
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/50FE53F9.4040800@treenet.co.nz>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/16097
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>

On 22/01/2013 4:04 a.m., Patrick McManus wrote:
>
>
>
> On Sun, Jan 20, 2013 at 6:47 PM, Roberto Peon <grmocg@gmail.com 
> <mailto:grmocg@gmail.com>> wrote:
>
>     Text formats are, surprisingly, not easier to debug in my experience.
>
>
> +1
>
> Beyond debugging, text formats are actually ridiculously hard to get 
> consistently right - partially because they lend themselves too well 
> to "be liberal in what you receive policies". HTTP/1 has suffered 
> from  CRLF injection attacks, content-length bounds check failures, a 
> wide variety of line ending interop problems, etc..  all of which are 
> derived from its text roots. Sometimes these problems are unforseen 
> spec issues, but sometimes they are just derived from assumptions 
> people have because the text format feels more intuitive than it 
> really is.
>
> While text is convenient to eyeball, it is much harder to get 
> unambiguously correct especially in a open multiple implementation 
> environment. 32 bits of big endian is well defined and well bounded; a 
> text string that represents a quantity requires a lot more information 
> to correctly interpret.
>
> http://blog.jgc.org/2012/12/speeding-up-http-with-minimal-protocol.html#c5703739431744738432
>
> Frankly, I'd rather talk about byte order.. imo this is an application 
> level protocol that 98% of the time is going to be consumed by little 
> endian processors and could easily be defined that way. This of course 
> runs against tradition and isn't a huge deal computationally, but I'm 
> not aware of other arguments against giving the byte swap operation of 
> our processors a day off.
>

Three possible reasons for keeping it big-endian:

1) the existing library functionality htons() and friends are 
big-endian. Don't underestimate the benefit using well-known 
functionality instead of having to locate uncommon little-endian 
converters will give to developers in the HTTP/2 rollout.

2) big-endian is more intuitive to read. I know we are arguing for tools 
to be used by the masses. But somebody, sometime is going to have to 
eyeball the raw binary to figure out a tricky interop problem. Lets not 
make that job harder than it has to be, because it will probably be one 
of us here doing it.

3) big-endian is more suited to streamed octet interpretation when we 
are defining data fields at less than 32-bit resolution.

That said, I don't have a preference.


Amos