Firefox/Push Notifications: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(update)
(update)
Line 25: Line 25:


* Fx44-Android-Nightly: Land Push Notifications in Fx44 Nightly and evaluate user experience.
* Fx44-Android-Nightly: Land Push Notifications in Fx44 Nightly and evaluate user experience.


=== Engineering and dependent technologies ===
=== Engineering and dependent technologies ===
Line 33: Line 31:


Push Notification contains the following technologies:
Push Notification contains the following technologies:
'''Web Notification API'''
 
====Web Notification API====


WebAPI landed in Fx22. Can be used without push and service workers, but will be a popular use case.
WebAPI landed in Fx22. Can be used without push and service workers, but will be a popular use case.
Line 39: Line 38:
https://developer.mozilla.org/en-US/docs/Web/API/notification
https://developer.mozilla.org/en-US/docs/Web/API/notification


'''Service Workers'''
====Service Workers====


Service workers is the ability for your browser to run a script in the background enabling offline applications, background processing, and push notifications.
Service workers is the ability for your browser to run a script in the background enabling offline applications, background processing, and push notifications.
Line 49: Line 48:
Spec: https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
Spec: https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html


'''Push API'''
====Push API====


Web DOM API that enables a website to subscribe a client, upon granting permission, to send events to the client.
Web DOM API that enables a website to subscribe a client, upon granting permission, to send events to the client.
Line 59: Line 58:
spec: http://www.w3.org/TR/push-api/
spec: http://www.w3.org/TR/push-api/


'''Push Server'''
====Push Server====


Mozilla hosted server that brokers the registration and sending of push events from web app servers to clients. Past terms for this include: SimplePush and WebPush which distinguished low level design and protocol support. For web developers, the server architecture may migrate when appropriate, but the WebAPI will remain the same.
Mozilla hosted server that brokers the registration and sending of push events from web app servers to clients. Past terms for this include: SimplePush and WebPush which distinguished low level design and protocol support. For web developers, the server architecture may migrate when appropriate, but the WebAPI will remain the same.
Line 69: Line 68:
Current Server docs: http://autopush.readthedocs.org/en/latest/api.html
Current Server docs: http://autopush.readthedocs.org/en/latest/api.html


'''Mobile'''
====Mobile====


Mobile is targeting Fx44 to for initial support. Android and iOS will leverage Google Cloud Messaging (GCM) and Apple Push Notification Services (APNS) respectively. Work is done by three teams: Android eng, Android platform, and Services Dev. We will be gathering a list of dependencies on landing this on Android.
Mobile is targeting Fx44 to for initial support. Android and iOS will leverage Google Cloud Messaging (GCM) and Apple Push Notification Services (APNS) respectively. Work is done by three teams: Android eng, Android platform, and Services Dev. We will be gathering a list of dependencies on landing this on Android.
Line 75: Line 74:
Android Bug Tree: https://bugzilla.mozilla.org/showdependencytree.cgi?id=1206207&maxdepth=1&hide_resolved=1
Android Bug Tree: https://bugzilla.mozilla.org/showdependencytree.cgi?id=1206207&maxdepth=1&hide_resolved=1


'''Testing'''
====Testing====


Testing & QA owner is tbd.  There's a fairly complex test plan here, considering the permissions dialogs, service workers, and API.
Testing & QA owner is tbd.  There's a fairly complex test plan here, considering the permissions dialogs, service workers, and API.
===FAQ===
What are recent changes from Mozilla's SimplePush prototypes:
* Currently the Push API does not access data in the push message, it simply fires an event in the service worker.
* Push events only work with service workers. SimplePush did not require service workers.
* The web application does not need to be active tab in client session.
* about:serviceworkers can be used to manage running service workers.
* notification permissions cannot be requested inside a service worker, it must be in the web application.
What's the difference between SimplePush and WebPush.
* They use different DOM APIs.
* WebPush is intent on implementing the IETF spec.  SimplePush was a Mozilla specific implementation and works with FxOS specifically for Find My Device.
* There are other low level differences in the protocol and background processes.
=== Communications===
email: gGroupsList:
* Public: dev-push@mozilla.org
irc: #push - IRC info: https://wiki.mozilla.org/IRC
=== Demos===
Requires Firefox 42 or later
* Fx, Chrome, Chrome Android: https://people.mozilla.org/~ewong2/push-notification-test/
* http://johnme-gcm.appspot.com/
* Chrome only: https://simple-push-demo.appspot.com/

Revision as of 22:52, 18 September 2015

Overview

Push Notifications is a feature that enables web applications to efficiently notify users even when off-site. It's intended as a standards compliant feature utilizing Push API, Notifications API, WebPush Service.

Currently, email is the only reliable way for a web application to contact or notify users on desktop computers. Push Notifications introduces functionality for web applications to contact users when off-site ushering a new level of interactivity. There is a class of web sites where users don't often install mobile apps but do want a casual subscription to content. For example:

  • News: get notified from sfgate.com on stories around sports teams, restaurant reviews, current events.
  • Consumer: get notified when you've been outbid on ebay.com
  • Consumer: get notified when a specific item is posted on craigslist.org
  • Messaging: get notified when you get a message on IRCcloud, even when Firefox is closed.
  • Enterprise: While working on your laptop, get notified you have a sales lead on salesforce.com
  • Games: get notified that it's your turn in a Facebook scrabble game.

Status

Plan of Record - approved 9/18

Desktop:

  • Fx42: Ship Push messaging with disabled ability to launch web notification from service workers.
  • Fx44: Ship a quality, basic user-centered experience using Desktop Push Notifications.
  • Fx45: Ship a great Desktop experience using Push Notifications.

Android:

  • Fx44-Android-Nightly: Land Push Notifications in Fx44 Nightly and evaluate user experience.

Engineering and dependent technologies

Engineering Master Bug List: https://bugzilla.mozilla.org/showdependencytree.cgi?id=1201571&maxdepth=2&hide_resolved=1

Push Notification contains the following technologies:

Web Notification API

WebAPI landed in Fx22. Can be used without push and service workers, but will be a popular use case.

https://developer.mozilla.org/en-US/docs/Web/API/notification

Service Workers

Service workers is the ability for your browser to run a script in the background enabling offline applications, background processing, and push notifications.

https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker

Platform: https://wiki.mozilla.org/Service_Workers

Spec: https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html

Push API

Web DOM API that enables a website to subscribe a client, upon granting permission, to send events to the client.

https://developer.mozilla.org/en-US/docs/Web/API/Push_API

draft spec: https://w3c.github.io/push-api/

spec: http://www.w3.org/TR/push-api/

Push Server

Mozilla hosted server that brokers the registration and sending of push events from web app servers to clients. Past terms for this include: SimplePush and WebPush which distinguished low level design and protocol support. For web developers, the server architecture may migrate when appropriate, but the WebAPI will remain the same.

Draft Spec: https://webpush-wg.github.io/webpush-protocol/

Current Server info: https://wiki.mozilla.org/Services/SimplePushServer

Current Server docs: http://autopush.readthedocs.org/en/latest/api.html

Mobile

Mobile is targeting Fx44 to for initial support. Android and iOS will leverage Google Cloud Messaging (GCM) and Apple Push Notification Services (APNS) respectively. Work is done by three teams: Android eng, Android platform, and Services Dev. We will be gathering a list of dependencies on landing this on Android.

Android Bug Tree: https://bugzilla.mozilla.org/showdependencytree.cgi?id=1206207&maxdepth=1&hide_resolved=1

Testing

Testing & QA owner is tbd. There's a fairly complex test plan here, considering the permissions dialogs, service workers, and API.


FAQ

What are recent changes from Mozilla's SimplePush prototypes:

  • Currently the Push API does not access data in the push message, it simply fires an event in the service worker.
  • Push events only work with service workers. SimplePush did not require service workers.
  • The web application does not need to be active tab in client session.
  • about:serviceworkers can be used to manage running service workers.
  • notification permissions cannot be requested inside a service worker, it must be in the web application.

What's the difference between SimplePush and WebPush.

  • They use different DOM APIs.
  • WebPush is intent on implementing the IETF spec. SimplePush was a Mozilla specific implementation and works with FxOS specifically for Find My Device.
  • There are other low level differences in the protocol and background processes.

Communications

email: gGroupsList:

  • Public: dev-push@mozilla.org

irc: #push - IRC info: https://wiki.mozilla.org/IRC


Demos

Requires Firefox 42 or later