Re: [#153] PUSH_PROMISE headers

James M Snell <jasnell@gmail.com> Mon, 01 July 2013 20:22 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 0F7F711E8228 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 1 Jul 2013 13:22:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.566
X-Spam-Level:
X-Spam-Status: No, score=-10.566 tagged_above=-999 required=5 tests=[AWL=0.033, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XKynr5DYvdQY for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 1 Jul 2013 13:22:43 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 79E1321F9FEA for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 1 Jul 2013 13:22:42 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UtkbK-0002YK-Mi for ietf-http-wg-dist@listhub.w3.org; Mon, 01 Jul 2013 20:21:30 +0000
Resent-Date: Mon, 01 Jul 2013 20:21:30 +0000
Resent-Message-Id: <E1UtkbK-0002YK-Mi@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 1UtkbD-0002XV-Iw for ietf-http-wg@listhub.w3.org; Mon, 01 Jul 2013 20:21:23 +0000
Received: from mail-oa0-f50.google.com ([209.85.219.50]) by lisa.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1UtkbC-00079j-3f for ietf-http-wg@w3.org; Mon, 01 Jul 2013 20:21:23 +0000
Received: by mail-oa0-f50.google.com with SMTP id k7so5522558oag.9 for <ietf-http-wg@w3.org>; Mon, 01 Jul 2013 13:20:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=6bzbTIwFy8KbbBSD2K+zFEik3anHMS5o36FrvDyyNdA=; b=hg9hfvPb9k4fgGdALBhlG4ka7d6Z7vigydTgH7T8wm43tXM0LlNey6jq7T29fr37By BI433xBbSgDVKUdfn/0LkBOmOKj4CJQOM0CJwVpLN2stBWP7FNROZZ7Ii14/OifHTIIF oywzhyLyvRlrUtYDEjqG8BzF/4QaJDW5z8x5hhN4AzlSwMnDNx9L1SRR9u753P96E0g9 ruiR4QXe/8rNUkQkE9N75jSMtcPS74Cw3MCsP6/QEm3MF0fsJmmvQe/Y8aGhG8tQ8hTG gHB+h9lO6fdX7+ZGquR27S/5h27nc8SpFhcjlXN9eWZT3caK/kVd7Ai1YvN1OsmJBPyY 6Skw==
X-Received: by 10.182.33.103 with SMTP id q7mr11726122obi.77.1372710056110; Mon, 01 Jul 2013 13:20:56 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.60.55.8 with HTTP; Mon, 1 Jul 2013 13:20:36 -0700 (PDT)
In-Reply-To: <CABkgnnWPcPEij7P-DCvHOwNxSB8pqxRvWVwn==Aaxf1a0-3Dvg@mail.gmail.com>
References: <CABkgnnVGh9dLkfDrO2fq5TsnxwEu0Dff=LqJEJR5Odq2ibfDMg@mail.gmail.com> <CABP7RbcoSSSKJq3YbZ2ypw-xb0uOgFQcjcQP9tJdkgEjPfJVMA@mail.gmail.com> <CAP+FsNdJcZ_x6RidaVfP+VPtA3CwAbALgAqhOhAjZLzaz4tQRQ@mail.gmail.com> <CABP7Rbf_pGKU-yB-f=6fB5WoVvs087eOf6Beo4DDHGJWYX5XTQ@mail.gmail.com> <CAP+FsNd9BDHBO2YXEfHwvRuiJDDpbAEvCMR2BKLzcoaARxjDJA@mail.gmail.com> <CAP+FsNcEf6s5s7Jk=NLKdrdU8fV1AsSJ4u-8CZNT8P7YXvxkag@mail.gmail.com> <CABP7RbdoBswznxwDm+-00egSHV+h7fO7Ow+aw+mFhLm2Z=GRWg@mail.gmail.com> <CAP+FsNf-m8toh_KNN0dinwCvP_+2JBKq8OWrany2sHM+c2js3A@mail.gmail.com> <b7f7bb824fe34aa9ab92d22716d25b3f@BY2PR03MB025.namprd03.prod.outlook.com> <CABkgnnWPcPEij7P-DCvHOwNxSB8pqxRvWVwn==Aaxf1a0-3Dvg@mail.gmail.com>
From: James M Snell <jasnell@gmail.com>
Date: Mon, 01 Jul 2013 13:20:36 -0700
Message-ID: <CABP7Rbdj9ZAmakUgiGk-zJv16aGWys04JuCNzixSfgsPqfwD-g@mail.gmail.com>
To: Martin Thomson <martin.thomson@gmail.com>
Cc: Mike Bishop <Michael.Bishop@microsoft.com>, Roberto Peon <grmocg@gmail.com>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=209.85.219.50; envelope-from=jasnell@gmail.com; helo=mail-oa0-f50.google.com
X-W3C-Hub-Spam-Status: No, score=-4.4
X-W3C-Hub-Spam-Report: AWL=-1.743, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1UtkbC-00079j-3f aca338b3b3b7572c4f59fb4197b6b795
X-Original-To: ietf-http-wg@w3.org
Subject: Re: [#153] PUSH_PROMISE headers
Archived-At: <http://www.w3.org/mid/CABP7Rbdj9ZAmakUgiGk-zJv16aGWys04JuCNzixSfgsPqfwD-g@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/18454
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>

Let's please not conflate compression and push.. they really are
unrelated to one another.

There is really only two reasons for including header fields in a push promise:

1. Identifying the resource being pushed
2. Allowing the recipient to determine if it needs the pushed resource

In HTTP, we already have a client-side caching mechanism that is based
entirely on comparison of a relevant set of request headers against
what is currently stored in the cache. If a new items it added to the
cache, the response headers are used to populate, but it's the set of
request headers that are used to determine cache hits or misses. This
is a pre-existing mechanism that is already very well established.

For the push promise, the request headers give us everything we need
to address #1 and #2 above. Sending the request headers in the
push_promise gives the client side the context it needs to understand
the pushed set of response frames.

Yes, it's understood that the request headers generated by the server
might not match exactly what the client may have sent for the same
resource but that's perfectly ok... This *is* server push after all...
the request headers sent in the push promise would be the request
headers the server has implied for the pushed streams *implied* GET.

The idea of the push promise sending a "preview" of the response
headers is rather nonsensical because (a) the response headers do not
help me address the two goals above (unless they are required to
contain a content-location header) and (b) why send a preview of the
response headers moments before sending the actual response headers?

The idea then, is this: Sending a push promise is the servers way of
saying, "Based on the initial request, I expect that you're going to
send another request that looks like this..." [where "this" is the
assumed set of request headers ] "... therefore I'm going to go ahead
and send the appropriate response without waiting for you to send it."

Compression of the headers does not enter into the discussion in any
way. Compression only deals with how the bits are serialized on the
wire in each direction, not the actual content or use of the headers.

As a future potential optimization, as part of the originating request
sent by the client, I can imagine someone eventually defining a set of
"push negotiation" request headers... something like...

  Push-Accept: image/jpeg, image/png
  Push-If-Match: "resource-1-etag", "resource-2-etag"
  Push-If-Modified-Since: 2013-12-12T12:12:12Z

Which would be interpreted as:

  1. I'll except pushes for JPEG and PNG resources
  2. So long as their entity tags match "resource-1-etag" or "resource-2-etag"
  3. And have been modified after 2013-12-12T12:12:12Z

These kinds of optimizations would make sense *after* we get a lot
more experience with push. Until then, however, having the simple rule
that for pushed streams "PUSH_PROMISE contains Request Headers and
HEADERS contains Response Headers" is simple enough for us to get
started. We can tweak it further later once we get more experience.


On Mon, Jul 1, 2013 at 1:01 PM, Martin Thomson <martin.thomson@gmail.com> wrote:
[snip]
>
> That leads to some interesting questions with respect to compression.
> Maybe the right way to do this is to have PUSH_PROMISE include ALL
> headers from the associated request, and then use that associated
> request as the reference from which compression builds.
>
> Of course, that would be grossly premature, given how little we know
> of usage patterns for push.