Re: bohe and delta experimentation...

James M Snell <jasnell@gmail.com> Wed, 16 January 2013 22:47 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 1890E11E80C5 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 16 Jan 2013 14:47:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.67
X-Spam-Level:
X-Spam-Status: No, score=-8.67 tagged_above=-999 required=5 tests=[AWL=1.928, 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 iJGSV60ZqkZJ for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 16 Jan 2013 14:47:28 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id EEBB511E809A for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 16 Jan 2013 14:47: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 1Tvbka-0007JQ-Qz for ietf-http-wg-dist@listhub.w3.org; Wed, 16 Jan 2013 22:46:28 +0000
Resent-Date: Wed, 16 Jan 2013 22:46:28 +0000
Resent-Message-Id: <E1Tvbka-0007JQ-Qz@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 1TvbkW-0007IM-KH for ietf-http-wg@listhub.w3.org; Wed, 16 Jan 2013 22:46:24 +0000
Received: from mail-ie0-f179.google.com ([209.85.223.179]) by lisa.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1TvbkV-0000zd-J6 for ietf-http-wg@w3.org; Wed, 16 Jan 2013 22:46:24 +0000
Received: by mail-ie0-f179.google.com with SMTP id k14so3632385iea.24 for <ietf-http-wg@w3.org>; Wed, 16 Jan 2013 14:45:57 -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=UM2L2QZSGzmUHZs5FLfQGrSMTpc5ZP7hyiqMR56N4+M=; b=rhvbymWvRRmLXOaFxRc5oQUr+q9SDSFGcaat9cFKxGEytbuoeC9lbc74EQhIRr9s4s 0KV2BvsZLY+fHe+9xxzx3kcgASS0CMfxl3GdVYMQjNRSIdSG2cGXwJYK8qYBjmAhwReI D00nhL0Q/1ndq9Y+7KwQcZnHitQJL94zmgb0IRXv+6EvskH2VV17jxLxXMK+hSa9jKN4 Q4jTaiwzMBpC9EofE3+jAT2wK2mKDBGzDw5EdJTRnDI29tAUr3ik2LFW+iCH7d4E5lGz rU11g1k7S93RGAgej3lEcioaBbBWZQEQuVGG+eTW/AYUaiZYvcDXn1ewBp6EZ0J1M6At glUQ==
X-Received: by 10.50.5.204 with SMTP id u12mr5951405igu.97.1358376357721; Wed, 16 Jan 2013 14:45:57 -0800 (PST)
MIME-Version: 1.0
Received: by 10.64.26.137 with HTTP; Wed, 16 Jan 2013 14:45:37 -0800 (PST)
In-Reply-To: <2FD0BBE1-59C6-4E49-ACCE-60C1A895FB7D@mnot.net>
References: <CABP7RbeNFm3ZHdtDBUJb3idJjFj0q+fxDPzxKZBhSJqXw8zWaQ@mail.gmail.com> <2FD0BBE1-59C6-4E49-ACCE-60C1A895FB7D@mnot.net>
From: James M Snell <jasnell@gmail.com>
Date: Wed, 16 Jan 2013 14:45:37 -0800
Message-ID: <CABP7RbdXh1mb_P-HQucksiHc1So0ggVxH5v8y7vk13g+CcWe-Q@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="e89a8f5029a445f4d104d36fa4f5"
Received-SPF: pass client-ip=209.85.223.179; envelope-from=jasnell@gmail.com; helo=mail-ie0-f179.google.com
X-W3C-Hub-Spam-Status: No, score=-4.4
X-W3C-Hub-Spam-Report: AWL=-1.742, 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 1TvbkV-0000zd-J6 4198a4d313d81ec1c1314de8a5b01ba5
X-Original-To: ietf-http-wg@w3.org
Subject: Re: bohe and delta experimentation...
Archived-At: <http://www.w3.org/mid/CABP7RbdXh1mb_P-HQucksiHc1So0ggVxH5v8y7vk13g+CcWe-Q@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/15913
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 2:28 PM, Mark Nottingham <mnot@mnot.net> wrote:

>
> [snip]
> Just for comparison - in the simple encoding, I get it to 8 bytes (at
> least before year 2038), and it's textual (just the hex for the number of
> seconds since the epoch).
>
> E.g.,
>
> HTTP/1: Sat, 03 Nov 2012 13:05:03 GMT
> Simple: 5095167f
>
>
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.


>
> > Either way, regardless of whether we huffman code or binary code the
> date values, we should require that RFC3339/ISO8601 timestamps be used for
> all date headers within the http/2 header encoding as those are going to
> compress much better than the current http/1 date format.
> >
> > 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.


> > By simply allowing the etag to be dropped in as a set of bytes in the
> encoded header we can cut the transmitted size of those tags in half. The
> format I'm considering for these is:
> >
> >    +-+------+-----------+
> >    |W|len(7)| octets... |
> >    +-+------+-----------+
> >
> > Where W is a single bit flag indicating weak or not, len is the number
> of encoded octets for the entity tag. (I'm wondering, tho, whether or not
> we could get away with dropping the entire concept of a "weak entity tag")
>
> We decided not to drop it in HTTPbis, so assume that it'll stay (given we
> need to be able to convert 1 to 2 and back).
>
>
That's what I figured... :-/


>
> > By optimizing dates and entity tags this way, we end up with optimized
> encodings for a good number of commonly used headers (date, last-modified,
> expires, etag, if-none-match, if-match, if-modified-since, etc), and we can
> eliminate the need for doing any compression on those values at all.
> >
> > Another set of headers we can optimize within delta are the numeric
> values for Content-Length, :status, Expires, etc. Rather than encoding
> those as ascii strings, we would simply encode them as their numeric value.
> >
> > 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.

- James


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