[Webpush] 202 (Accepted) and simplifying acknowledgements

Brian Raymor <Brian.Raymor@microsoft.com> Fri, 19 February 2016 20:26 UTC

Return-Path: <Brian.Raymor@microsoft.com>
X-Original-To: webpush@ietfa.amsl.com
Delivered-To: webpush@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E91341A1BDF for <webpush@ietfa.amsl.com>; Fri, 19 Feb 2016 12:26:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.002
X-Spam-Level:
X-Spam-Status: No, score=-2.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
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 7Y6H_Y6tP23l for <webpush@ietfa.amsl.com>; Fri, 19 Feb 2016 12:26:14 -0800 (PST)
Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0127.outbound.protection.outlook.com [65.55.169.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8A7511A1B1C for <webpush@ietf.org>; Fri, 19 Feb 2016 12:26:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+smC+HIjOpeH+rqokdcudWBhC/J6VtCJHjCluGyXB74=; b=Du+9leQo61c49ziGaAfMfbHLph4G63thxytYmfn+KEEGxx9n0OmM+QuyrfNmk6uyyer+RO+KozmCYTq5OEgqem2x7ydcgG0+wqG2+AQyLBVuJ4KTq4dJgPhGkRZ1+ga2SmA9/xqR7u1YsO9f17zFxflm/o7XqqL7bme7+sByuJw=
Received: from BY2PR0301MB0647.namprd03.prod.outlook.com (10.160.63.14) by BY2PR0301MB0648.namprd03.prod.outlook.com (10.160.63.140) with Microsoft SMTP Server (TLS) id 15.1.409.15; Fri, 19 Feb 2016 20:26:12 +0000
Received: from BY2PR0301MB0647.namprd03.prod.outlook.com ([10.160.63.14]) by BY2PR0301MB0647.namprd03.prod.outlook.com ([10.160.63.14]) with mapi id 15.01.0409.017; Fri, 19 Feb 2016 20:26:12 +0000
From: Brian Raymor <Brian.Raymor@microsoft.com>
To: "webpush@ietf.org" <webpush@ietf.org>
Thread-Topic: 202 (Accepted) and simplifying acknowledgements
Thread-Index: AdFrSF8gtTEETI3TT4mdvlYA58NVcw==
Date: Fri, 19 Feb 2016 20:26:12 +0000
Message-ID: <BY2PR0301MB06475638E9DE5D87782E71C783A00@BY2PR0301MB0647.namprd03.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: ietf.org; dkim=none (message not signed) header.d=none;ietf.org; dmarc=none action=none header.from=microsoft.com;
x-originating-ip: [2601:600:8000:5a8:ccdc:8fb0:107c:4e51]
x-ms-office365-filtering-correlation-id: 6666ae38-00f7-4f28-21e8-08d3396ae90f
x-microsoft-exchange-diagnostics: 1; BY2PR0301MB0648; 5:vtur30V/SFf/WZlVpjcYTYlvSvc3PjpAgKhXTNistGRfQdzZRMMtSOUb6da2494eKEZwjtYA+59LM+Aeo7bn4nnL1ed8gZpgVFI7etj88oOLsf0dboppq/xz5m7/EmWVXGI6EsdBtGyS5KGqD3E+kQ==; 24:FZdG34HYWaZQW3FvVV2L4Py5d1PVfmXRj9Xm+cr+7LJVB1cssw7yCAwx3fKVG6wwxwa878A/QgRBk2sYvSlJecsV804d42u7Zgdnced8w8o=
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB0648;
x-microsoft-antispam-prvs: <BY2PR0301MB06488BDFC7C67A585AD8AEB083A00@BY2PR0301MB0648.namprd03.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(61426038)(61427038); SRVR:BY2PR0301MB0648; BCL:0; PCL:0; RULEID:; SRVR:BY2PR0301MB0648;
x-forefront-prvs: 08572BD77F
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(86612001)(5002640100001)(5003600100002)(15975445007)(87936001)(5001960100002)(107886002)(76576001)(86362001)(2351001)(11100500001)(2501003)(19580395003)(74316001)(229853001)(189998001)(5008740100001)(1096002)(77096005)(92566002)(10090500001)(561944003)(99286002)(450100001)(5004730100002)(40100003)(54356999)(2906002)(50986999)(2900100001)(33656002)(122556002)(1730700002)(3280700002)(3660700001)(10400500002)(5005710100001)(6116002)(102836003)(586003)(110136002)(10290500002)(1220700001)(3826002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR0301MB0648; H:BY2PR0301MB0647.namprd03.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en;
spamdiagnosticoutput: 1:23
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Feb 2016 20:26:12.5646 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB0648
Archived-At: <http://mailarchive.ietf.org/arch/msg/webpush/-xEmrlJDZoV2yrO8j_TJ6mrRsOM>
Subject: [Webpush] 202 (Accepted) and simplifying acknowledgements
X-BeenThere: webpush@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Discussion of potential IETF work on a web push protocol <webpush.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/webpush>, <mailto:webpush-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/webpush/>
List-Post: <mailto:webpush@ietf.org>
List-Help: <mailto:webpush-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/webpush>, <mailto:webpush-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Feb 2016 20:26:17 -0000

I've thought a bit more about the 202 discussion with Ben, Costin, and Martin. I have a small proposal that I've run past Martin and Elio for a sanity check. 

Currently - when an application server requests push message delivery, there are separate flows for message creation and message delivery:

1. Message Creation - The push service returns a 201 (Created) returned by the POST with a Location resource
2. Subsequent notification of delivery success or failure using Receipt Acknowledgements.

Receipt Acknowledgements also has many moving parts:

1. The PS returns :push and :push:receipts to the UA during its message subscription process.
2. The UA distributes :push and :push:receipts to its AS.
3. The AS requests a receipts subscription (:push:receipt) from the PS using :push:receipts.
4. The AS requests message delivery from the PS using :push and includes :push:receipt.
5. The PS returns a 201 (Created) on success for the message delivery request from the AS. It also includes a Location.
6. The AS monitors :push:receipt for success (acknowledgements) or failure (expiration or delivery attempts ceased).

A more natural flow could use 202 (Accepted) with the :push:receipt as the "status monitor". As Costin noted:

> This is pretty much what webpush is doing - accepts the request, and some other 
> process ( the connection side ) may deliver it later :-)

1. The PS returns :push to the UA during its message subscription process.
2. The UA distributes :push to its AS.
3. The AS requests message delivery from the PS using :push.
4. The PS returns a 202 (Accepted) on success for the message delivery request from the AS. It also includes a Location and :push:receipt as the "status monitor" suggested for a 202.
5. The AS monitors :push:receipt for success (acknowledgements) or failure (expiration or delivery attempts ceased).

This eliminates the need for the :push:receipts link relation and its "machinery" and simplifies the flow a bit. 

Another difference is that the current design allows the AS to request acknowledgements by including :push:receipt with its message delivery request to the PS.  If we want to maintain this optional behavior, then we would need a header - perhaps reusing Prefer: respond-async as a hint - http://tools.ietf.org/html/rfc7240#section-4.1 - that would be included when the AS requests message delivery.

If a pull request would offer more clarity, please let me know.

Thoughts?

...Brian