From 9c7dcb159794a8af5e23c589f25367caf55c39c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Mon, 15 Jul 2019 17:22:34 +1000 Subject: [PATCH 1/2] Editorial: drop 'webapp' formal definition --- index.html | 90 ++++++++++++++++++++++++++---------------------------- 1 file changed, 43 insertions(+), 47 deletions(-) diff --git a/index.html b/index.html index eb13aa9..bdecce7 100644 --- a/index.html +++ b/index.html @@ -59,11 +59,11 @@

- The Push API enables sending of a push message to a webapp via a - push service. An application server can send a push message at any - time, even when a webapp or user agent is inactive. The push service + The Push API enables sending of a push message to a web application via + a push service. An application server can send a push message at any + time, even when a web application or user agent is inactive. The push service ensures reliable and efficient delivery to the user agent. Push messages are - delivered to a Service Worker that runs in the origin of the webapp, which + delivered to a Service Worker that runs in the origin of the web application, which can use the information in the message to update local state or display a notification to the user.

@@ -78,25 +78,25 @@

Introduction

- The Push API allows a webapp to communicate with a user agent asynchronously. - This allows an application server to provide the user agent with - time-sensitive information whenever that information becomes known, rather than waiting for - a user to open the webapp. + The Push API allows a web application to communicate with a user agent + asynchronously. This allows an application server to provide the user agent + with time-sensitive information whenever that information becomes known, rather than + waiting for a user to open the web application.

As defined here, push services support delivery of push messages at any time.

- In particular, a push message will be delivered to the webapp even if that - webapp is not currently active in a browser window: this relates to use cases in - which the user may close the webapp, but still benefits from the webapp being - able to be restarted when a push message is received. For example, a push + In particular, a push message will be delivered to the web application even if that + web application is not currently active in a browser window: this relates to use cases in + which the user may close the web application, but still benefits from the web application + being able to be restarted when a push message is received. For example, a push message might be used to inform the user of an incoming WebRTC call.

A push message can also be sent when the user agent is temporarily offline. In support of this, the push service stores messages for the user agent until - the user agent becomes available. This supports use cases where a webapp + the user agent becomes available. This supports use cases where a web application learns of changes that occur while a user is offline and ensures that the user agent can be provided with relevant information in a timely fashion. Push messages are stored by the push service until the user agent becomes reachable and the @@ -104,16 +104,16 @@

The Push API will also ensure reliable delivery of push messages while a user agent - is actively using a webapp, for instance if a user is actively using the - webapp or the webapp is in active communication with an application + is actively using a web application, for instance if a user is actively using the web + application or the web application is in active communication with an application server through an active worker, frame, or background window. This is not the primary - use case for the Push API. A webapp might choose to use the Push API for infrequent - messages to avoid having to maintain constant communications with the application - server. + use case for the Push API. A web application might choose to use the Push API for + infrequent messages to avoid having to maintain constant communications with the + application server.

Push messaging is best suited to occasions where there is not already an active - communications channel established between user agent and webapp. Sending + communications channel established between user agent and web application. Sending push messages requires considerably more resources when compared with more direct methods of communication such as [[[fetch]]] or websockets. Push messages usually have higher @@ -150,16 +150,11 @@

- Webapp + Application server

- The term webapp refers to a Web application, i.e. an application implemented - using Web technologies, and executing within the context of a Web user agent, e.g. - a Web browser or other Web runtime environment. -

-

- The term application server refers to server-side components of a - webapp. + The term application server refers to server-side components of a web + application.

@@ -167,7 +162,7 @@

Push message

- A push message is data sent to a webapp from an application + A push message is data sent to a web application from an application server.

@@ -182,9 +177,9 @@

A push subscription is a message delivery context established between the - user agent and the push service on behalf of a webapp. Each push - subscription is associated with a service worker registration and a service - worker registration has at most one push subscription. + user agent and the push service on behalf of a web application. Each + push subscription is associated with a service worker registration and a + service worker registration has at most one push subscription.

A push subscription has an associated push endpoint. It MUST be the @@ -303,7 +298,7 @@

The term push service refers to a system that allows - application servers to send push messages to a webapp. A push + application servers to send push messages to a web application. A push service serves the push endpoint or endpoints for the push subscriptions it serves.

@@ -323,7 +318,7 @@

The term express permission refers to an act by the user, e.g. via user interface or host device platform features, via which the user approves the use of the - Push API by the webapp. + Push API by the web application.

@@ -341,8 +336,8 @@

There is no guarantee that a push message was sent by an application server - having the same origin as the webapp. The application server is able to share - the details necessary to use a push subscription with a third party at its own + having the same origin as the web application. The application server is able to + share the details necessary to use a push subscription with a third party at its own discretion.

@@ -361,7 +356,7 @@

The Push API may have to wake up the Service Worker associated with the service worker registration in order to run the developer-provided event handlers. This can cause resource usage, such as network traffic, that the user agent SHOULD attribute to the - webapp that created the push subscription. + web application that created the push subscription.

The user agent MAY consider the PushSubscriptionOptions when acquiring @@ -402,7 +397,7 @@

Push Framework

- A push message is sent from an application server to a webapp as + A push message is sent from an application server to a web application as follows: