Re: bohe and delta experimentation...

James M Snell <jasnell@gmail.com> Wed, 16 January 2013 23:46 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 91C0111E80F5 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 16 Jan 2013 15:46:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.792
X-Spam-Level:
X-Spam-Status: No, score=-8.792 tagged_above=-999 required=5 tests=[AWL=1.806, BAYES_00=-2.599, 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 TryRzJKAJ8Dk for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 16 Jan 2013 15:46:54 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id B63B511E809C for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 16 Jan 2013 15:46:53 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1Tvcgh-0002VR-D8 for ietf-http-wg-dist@listhub.w3.org; Wed, 16 Jan 2013 23:46:31 +0000
Resent-Date: Wed, 16 Jan 2013 23:46:31 +0000
Resent-Message-Id: <E1Tvcgh-0002VR-D8@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1Tvcgc-0002T3-Dd for ietf-http-wg@listhub.w3.org; Wed, 16 Jan 2013 23:46:26 +0000
Received: from mail-ie0-f174.google.com ([209.85.223.174]) by lisa.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1Tvcgb-0003MU-3N for ietf-http-wg@w3.org; Wed, 16 Jan 2013 23:46:26 +0000
Received: by mail-ie0-f174.google.com with SMTP id c11so3686177ieb.5 for <ietf-http-wg@w3.org>; Wed, 16 Jan 2013 15:45:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=zg6CaD9D7P6zduV/IQCIHdDeKHmqxfseazQOsVfhOvc=; b=gdyzfZvpb7vISXM2I8rDV2WYW7D8AmVpngohGalP1UtmA1nj4cpn4DeEk2xb3TPdyD Ks6Vk6jO6Kj025eNRU9DbjiDFsEU+Boq7IxkTZKRvOwBU/j9OXDQ6deOFSyzXNo5j/kd Wh4jqCoQgj2aajsmg3l+o3XfZzkc331w2favthO9T6md8G3plpPakaJkKDJp+zhy0I03 Qq03kFnSDbK+QZYowtwpxdFdfBPrKNrdp28ss0IMoqeiRJZ0USIVBmhiKQxKOFZS4VjA HKjn+AKJOluWHC1OhDChycRzO/GDi+Z+1fm6HYrFr6AfU14zRC7TIj2REqgO9fRund8V 7sTw==
X-Received: by 10.42.58.202 with SMTP id j10mr1866296ich.39.1358379959157; Wed, 16 Jan 2013 15:45:59 -0800 (PST)
MIME-Version: 1.0
Received: by 10.64.26.137 with HTTP; Wed, 16 Jan 2013 15:45:39 -0800 (PST)
In-Reply-To: <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> <DD2EFC9F-5201-4829-9E6F-BD9CF0307BB0@mnot.net>
From: James M Snell <jasnell@gmail.com>
Date: Wed, 16 Jan 2013 15:45:39 -0800
Message-ID: <CABP7RbcGEane+8x9=VonMbbUdLHZfZsuwzSJL2MZiyDieTbgEw@mail.gmail.com>
To: Mark Nottingham <mnot@mnot.net>
Cc: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="20cf30334613ef83a704d3707ad0"
Received-SPF: pass client-ip=209.85.223.174; envelope-from=jasnell@gmail.com; helo=mail-ie0-f174.google.com
X-W3C-Hub-Spam-Status: No, score=-4.4
X-W3C-Hub-Spam-Report: AWL=-1.710, 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: lisa.w3.org 1Tvcgb-0003MU-3N bbb1dfa0ac2a208df01e187852ee4247
X-Original-To: ietf-http-wg@w3.org
Subject: Re: bohe and delta experimentation...
Archived-At: <http://www.w3.org/mid/CABP7RbcGEane+8x9=VonMbbUdLHZfZsuwzSJL2MZiyDieTbgEw@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/15924
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 Wed, Jan 16, 2013 at 3:10 PM, Mark Nottingham <mnot@mnot.net> wrote:

>
> 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).
>
>
Agreed... if we can drop the timezone info entirely and just assume
everything is GMT we're good. As for millisecond precision, I do question
whether it's truly necessary but it's possible for us to at least support
the option. Assuming we omit timezone and default to seconds-only, we're
down to six bytes and seven bytes with milliseconds.


> 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!
>
>
I'm generally convinced that 9999 is likely going to be more than
sufficient for header values ;-)


> 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?
>
>
The rational here was is provide a field-for-field mapping of rfc3339
date-times as efficiently as possible... basically just trying to baseline
on a single model for expressing dates rather than having to convert
between several. That, of course, is not critical.


>
> >>> 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.
>
>
Yeah, that's certainly a major consideration. First question is, would
binary encoding make a significant difference, second question is: is it
worth the costs. In this case, I suspect that the payoff is not going to be
significant but it's worth spending at least a little bit of time
investigating it.

- James


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


On Wed, Jan 16, 2013 at 3:10 PM, Mark Nottingham <mnot@mnot.net> wrote:

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