Re: bohe and delta experimentation...

Mark Nottingham <mnot@mnot.net> Wed, 16 January 2013 23:12 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 A5E5611E80E2 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 16 Jan 2013 15:12:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.66
X-Spam-Level:
X-Spam-Status: No, score=-8.66 tagged_above=-999 required=5 tests=[AWL=1.939, 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 t2un3YDubEPK for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 16 Jan 2013 15:12:30 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id A8D1411E809A for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 16 Jan 2013 15:12:29 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1Tvc8a-00083P-Un for ietf-http-wg-dist@listhub.w3.org; Wed, 16 Jan 2013 23:11:16 +0000
Resent-Date: Wed, 16 Jan 2013 23:11:16 +0000
Resent-Message-Id: <E1Tvc8a-00083P-Un@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <mnot@mnot.net>) id 1Tvc8W-00082k-MH for ietf-http-wg@listhub.w3.org; Wed, 16 Jan 2013 23:11:12 +0000
Received: from mxout-07.mxes.net ([216.86.168.182]) by maggie.w3.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <mnot@mnot.net>) id 1Tvc8V-00017O-Sg for ietf-http-wg@w3.org; Wed, 16 Jan 2013 23:11:12 +0000
Received: from [192.168.1.80] (unknown [118.209.240.13]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 9679622E256; Wed, 16 Jan 2013 18:10:49 -0500 (EST)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <CABP7RbdXh1mb_P-HQucksiHc1So0ggVxH5v8y7vk13g+CcWe-Q@mail.gmail.com>
Date: Thu, 17 Jan 2013 10:10:44 +1100
Cc: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <DD2EFC9F-5201-4829-9E6F-BD9CF0307BB0@mnot.net>
References: <CABP7RbeNFm3ZHdtDBUJb3idJjFj0q+fxDPzxKZBhSJqXw8zWaQ@mail.gmail.com> <2FD0BBE1-59C6-4E49-ACCE-60C1A895FB7D@mnot.net> <CABP7RbdXh1mb_P-HQucksiHc1So0ggVxH5v8y7vk13g+CcWe-Q@mail.gmail.com>
To: James M Snell <jasnell@gmail.com>
X-Mailer: Apple Mail (2.1499)
Received-SPF: pass client-ip=216.86.168.182; envelope-from=mnot@mnot.net; helo=mxout-07.mxes.net
X-W3C-Hub-Spam-Status: No, score=-3.2
X-W3C-Hub-Spam-Report: AWL=-3.235, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1Tvc8V-00017O-Sg 852ef3053e6f6fd8ee0c1e6af12b1c16
X-Original-To: ietf-http-wg@w3.org
Subject: Re: bohe and delta experimentation...
Archived-At: <http://www.w3.org/mid/DD2EFC9F-5201-4829-9E6F-BD9CF0307BB0@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/15915
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 17/01/2013, at 9:45 AM, James M Snell <jasnell@gmail.com> wrote:

> Yep, saw that. The advantage I see with the strawman binary encoding is that it provides for millisecond precision, includes timezone data, and covers years up to 9999, in just 3 additional bytes.

Dates in HTTP are explicitly in UTC (we just call it "GMT"), so the timezone data isn't helping (and may be hurting).

Dates in HTTP have a granularity of one second; although people ask for finer granularity from time to time, giving them this capability is IMO asking for trouble (because clock sync and the speed of light / disk, combined with people's ignorance of distributed systems, leads to lots of bugs).

That said, we could make millisecond granularity available in HTTP/2 dates, as long as it's OK for that resolution to be lost when converting to HTTP/1. The other approach would be to introduce new headers that have the resolution and are able to transit a HTTP/1 connection, but the cost is pretty high there...

WRT years up to 9999 -- yes. The method I used consumes an extra byte after 2106... and then another in 4147. However, just one more byte buys up to 36812!

What's the use case for separating out hours from minutes? Given that most uses for dates in HTTP are driven by caching, and therefore need a direct, numeric comparison, why not just send the number?


>>> Entity Tags are another area where binary values may be useful. Currently, ETag values generally tend to be hex or base64 encoded binary data.
>>> 
>> That's a big assumption!
> 
> Indeed ;-) ... Notice the way I hedged that with "generally tend" lol... I was hoping no one would notice ;-) ... what I would imagine is that delta op-codes could include a binary-or-text flag (there is existing space available in Roberto's encoding). If that flag is set, then value is assumed to be binary, otherwise it's text. This gives good backwards compatibility by default but allows for more optimized binary values.

That information will be lost on a HTTP/1 hop. It would be good to discuss how important that is; if it's really just optimisation information, it might be OK...

The bigger impact that I can see is that people will now need to flag their ETags as "binary-compatible" or not when they set them, etc. Ew.


>>> Will be turning my attention to cookie values next. I'm considering whether or not we should produce a code-tree that is specific to cookie headers and/or allow for purely binary values.
>> 
>> I could imagine setting a parameter on Set-Cookie that indicates its content is encoded in a certain way, which can be replayed as binary data. However, that information would also need to be in Cookie, which I *think* necessitates a new request header -- maybe Bookie?
>> 
> 
> Hmm... if we have the flag in the opcode would we still need this? Obviously I'd rather avoid having yet another cookie header definition.

See above.

Cheers,

--
Mark Nottingham   http://www.mnot.net/