Re: Push API and Service Workers

On 15 October 2014 23:07, Shijun Sun <shijuns@microsoft.com> wrote:

> My understanding here is that we want to leverage the "push client" in the
> OS.  That will provide new capabilities without dependency on a direct
> connection between the app and the app server.


The Push API doesn't use a direct connection between the app and the app
server: instead it assumes that there is a direct connection between the UA
and a push server of the UA's choice. Then the app server can send messages
to the push server, which relays them to the UA, which delivers them to the
Service Worker.

For example Android devices already maintain a persistent connection to
Google Cloud Messaging (GCM) servers, so in our current prototype in Chrome
for Android, we set GCM as the endpoint
<https://w3c.github.io/push-api/#widl-PushRegistration-endpoint> to which
the app server sends messages, and GCM relays the messages to the Android
device, which wakes up Chrome, which launches a Service Worker, and then
app JS handles the message.

--John

Received on Wednesday, 15 October 2014 22:42:56 UTC