Re: Prefer-Push, a HTTP extension.

Mark Nottingham <mnot@mnot.net> Fri, 23 November 2018 06:15 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@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 275DB128CFD for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 22 Nov 2018 22:15:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3
X-Spam-Level:
X-Spam-Status: No, score=-3 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=mnot.net header.b=4REzLLcd; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=ou4lD1GF
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lvOv9jAVR0nL for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 22 Nov 2018 22:15:45 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [IPv6:2603:400a:ffff:804:801e:34:0:38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 019FB1252B7 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 22 Nov 2018 22:15:44 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.89) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1gQ4iA-00011u-NI for ietf-http-wg-dist@listhub.w3.org; Fri, 23 Nov 2018 06:13:06 +0000
Resent-Date: Fri, 23 Nov 2018 06:13:06 +0000
Resent-Message-Id: <E1gQ4iA-00011u-NI@frink.w3.org>
Received: from mimas.w3.org ([2603:400a:ffff:804:801e:34:0:4f]) by frink.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <mnot@mnot.net>) id 1gQ4i8-00010A-5C for ietf-http-wg@listhub.w3.org; Fri, 23 Nov 2018 06:13:04 +0000
Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <mnot@mnot.net>) id 1gQ4i5-0002ia-GK for ietf-http-wg@w3.org; Fri, 23 Nov 2018 06:13:03 +0000
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id AC96E21C6B; Fri, 23 Nov 2018 01:12:40 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 23 Nov 2018 01:12:40 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mnot.net; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm1; bh=F 9DjPeU+up4J859eNuCCC64aobH0GbW4opPv9gGwvR4=; b=4REzLLcdu9xo+gC2B 8B1VcZGkyFF92Lt3gR5pao2w+4Lj9k7M6Qn1BZGd55G8X7b2oDbivgytprHOGas7 41jZU3vlePSKyuiO37+8Xqkk4ueajsMfcRd4tytmdRyDUhcb8ZL1ow3PoCB0vkB8 Yhs7RKzgbTBZaP+KRLVIP40soUKJLs2z8jPGyDei0Imi0PwdNFQw1fSVGnAgIC8D LL4TqYTNcpt561p4rX8x1zyVDZ5APPriR8lrGrz311NGY++0TxFLiFhkcwUBwIlE 6OtnpkQAvLktVoHynq6UsMkg8jBgM9SrSj5MNKCrJ3LFtPppHNGSg8pl05U2BWsH jb30g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=F9DjPeU+up4J859eNuCCC64aobH0GbW4opPv9gGwv R4=; b=ou4lD1GFh7b1VVUP8ZcnJDfOfy0zjYpknKZ9rxmn0ga2sV0bPN0NYg7Qy 0nNccR/44bai5Ou7rSkv/Zg7CpPRMDFYsdJipwM/fxrG8ovj7yU1Fu4BnfvDKYEt OEorma/SbxCzOGyzFPfVXKM+S5V0MJ6YXQzeXdSupPyMI2FNnvpaeW0HqlAv7xb0 t71+KMm1lb4ssPC7Tpkj8vq9XqdsDSknCvYS3q5nSojlZG8aKKWSNruWiF5OObKo g+FF3IOGJoALME7f+6t2Y51dJMYLPgG1yYBRs4z/y6uwwgR7C+/QSNT60JIesWMG Zi7gHFuMwnsSAttt08NLeKuyGN67A==
X-ME-Sender: <xms:V5r3WzxpBBRHbAyfQ-5mAQrTAr7aA83dKj4tN2D8eyYX0gPKSe-eFQ>
X-ME-Proxy: <xmx:V5r3W4wsn0W-OC2ONMEqAQbM2U_1EvwnrboMtYjQRVogoIaL1FHNiw> <xmx:V5r3WxRdAWYYrr3Brx2MABByVhxEFBf5zPTHolopMzZVFPgMppTw1A> <xmx:V5r3W7NgEepK85f-gUNwFV7RwWya7THqCZZwYjzmytI43yjjkiZYqw> <xmx:V5r3W8RBCXpkEjsKrNlX6Uiog_JAavPpkMQPczt7IAP84_wIFVXO2w> <xmx:V5r3W29v7_VYbCAE35XGvygoZGzh_wKmXFqQq-oXcX-kTLirLSSGSQ> <xmx:WJr3W2WK8pv4V1OSNpH2dZgn7CnW_KbD8GB2Y590u_pUbMhpplVnnw>
Received: from attitudadjuster.mnot.net (unknown [144.136.175.28]) by mail.messagingengine.com (Postfix) with ESMTPA id B6CDE102DE; Fri, 23 Nov 2018 01:12:38 -0500 (EST)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <18d0e93b-67e1-cfed-5418-fd50594fc5f9@evertpot.com>
Date: Fri, 23 Nov 2018 17:12:23 +1100
Cc: ietf-http-wg@w3.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <A1C8E610-7ECF-43A9-8159-72D1E03E6311@mnot.net>
References: <18d0e93b-67e1-cfed-5418-fd50594fc5f9@evertpot.com>
To: Evert Pot <me@evertpot.com>
X-Mailer: Apple Mail (2.3445.100.39)
X-W3C-Hub-Spam-Status: No, score=-6.6
X-W3C-Hub-Spam-Report: AWL=3.168, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1gQ4i5-0002ia-GK 926a7943b97670df517e36afed0eacdb
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Prefer-Push, a HTTP extension.
Archived-At: <https://www.w3.org/mid/A1C8E610-7ECF-43A9-8159-72D1E03E6311@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/36090
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: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

Hi Evert,

Just some personal thoughts. 

Although folks are generally not as optimistic about Push as they used to be, I think there's still some appetite for considering it for non-browsing use cases; as such, this is potentially interesting.

However, it's not clear at all how it'd work to me. Push is effectively hop-by-hop; intermediaries need to make a decision to send it, and that decision needs to be informed. How will a generic intermediary (like a CDN) know what link relations like "item" and "author" are, and how to apply them to a particular connection? 

It's likely that a server (whether an intermediary or an origin) is going to have many, many potential representations of these types to send, so it'll need to have knowledge of the format to be able to get those links out and push the appropriate responses. That doesn't seem generic -- unless you require all of the potentially pushable links to appear in Link headers (which doesn't seem like it would scale very well).

Pushing *all* of the resources -- or even a significant subset -- is likely to cause performance problems of its own, as there will be contention with any other requests made for bandwidth. This is one of the big things we've learned about push in the browsing use case, and I suspect it applies here as well.

Cheers,


> On 19 Nov 2018, at 3:27 pm, Evert Pot <me@evertpot.com> wrote:
> 
> Hi everyone,
> 
> We're a group of people collaborating on a HTTP extension. We would like
> to introduce a new header that a HTTP client can use to indicate what
> resources they would like to have pushed, based on a link relationship.
> 
> This might look something like the following request header:
> 
> GET /articles
> Prefer-Push: item, author
> 
> or
> 
> GET /articles
> Prefer: push="item, author"
> 
> We see this feature being especially useful for hypermedia-style APIs.
> Many of these types of APIs have some feature to embed resources in
> other resources in a way that is ignored by HTTP caches.
> 
> The work-in-progress draft can be read here:
> 
> <https://github.com/evert/push-please/>
> 
> My questions:
> 
> 1. Would this group be interested in adopting this draft and bringing
>   through the standards process?
> 2. We're having some discussions around which HTTP Header is more
>   appropriate. I'm curious if anyone here has any thoughts on that. The
>   main drawback is using "Prefer" is that it requires parsing a nested
>   format, but it might be more semantically appropriate for HTTP.
> 3. Our group is mostly divided on one issue: whether this header should
>   allow a client to request pushes of arbitrary depth. The cost would
>   be increased complexity (thus a higher barrier to entry). I'm curious
>   if anyone here has any insights that would help us make this
>   decision.
> 
> Arbitrary-depth example with a custom format:
> 
>  Prefer-Push: item(author, "https://example.org/custom-rel"), icon
> 
> Example with S-expression syntax:
> 
>  Prefer: push="(item(author \"https://example.org/custom-rel\") icon)"
> 
> In each of the above cases the client request the server push:
> 
> 1. The resource(s) behind the item link-relationship
>   a. The resources(s) behind the author relationship (via the "item"
>      link-relationship).
>   b. The resource(s) behind the "https://example.org/custom-rel" (via
>      the "item" link)
> 2. The resource(s) behind the icon relationship
> 
> Unfortunately structured-headers doesn't support data-structures of
> arbitrary depth, so if we want arbitrary-depth pushes, we would need to
> pick a different format. Very open to suggestions here too.
> 
> We intend to have several working implementations of this. For those
> interested in discussing, most of our discussion  is happening on a
> slack instance (http://slack.httpapis.com channel: #push-please).
> 
> Evert et al.
> 

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