A detailed overview of push mechanisms across all major mobile operating systems and the Worklight Unified Push Notifications Framework for iOS and Android smartphones and tablets.
2. Agenda
Worklight Introduction
Business case for Push Notifications
Push Notifications Services
Cross-platform Challenges
Worklight Unified Push Notifications Framework
Q&A
2
3. Worklight Introduction
Worklight is an open and advanced mobile app platform for
developing, running and managing HTML5, hybrid and native
applications for smartphones and tablets.
3
4. Worklight Vision
Provide the best platform in the market for enterprises to
develop, run and manage smartphone and tablet apps
Open platform, built around HTML5 & supporting hybrid apps
Focus on new devices and OS’s and their unique capabilities
Cater to high-end enterprise needs regarding app capabilities,
delivery, integration, security, scale and management
Handle the entire lifecycle of mobile apps
4
5. Push Notifications Defined
“Notifications are "pushed" by the event producer component
(the event "source"), they are not "pulled" by the event
consumer component. The producer decides when to send the
notification, because it knows about the event before the
consumer does.”
(Gartner: Hype Cycle for Application Architecture, 2011)
5
6. Key Elements of Push Notifications
Trigger
• Behavior-based
• Pre-defined
• Rule-driven
6
7. Key Elements of Push Notifications
Trigger
• Behavior-based
• Pre-defined
• Rule-driven
Content type
• Universal versus Personalized
• Open versus Protected Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
Morbi ullamcorper dictum
• Lean versus Detailed
orci, in iaculis sem faucibus
eget. Vivamus non diam id
dui volutpat semper.
Lorem ipsum
• Time-sensitive versus Any-time
7
8. Key Elements of Push Notifications
Trigger
• Behavior-based
• Pre-defined
• Rule-driven
Content type
• Universal versus Personalized
• Open versus Protected
• Lean versus Detailed
• Time-sensitive versus Any-time
User behavior
• Read only
• Read/Write
• Act-Outside-the-App
8
9. Key Elements of Push Notifications
Trigger
• Behavior-based
• Pre-defined
• Rule-driven
Content type
• Universal versus Personalized
• Open versus Protected
• Lean versus Detailed
• Time-sensitive versus Any-time
User behavior
• Read only
• Read/Write
• Act-Outside-the-App
Nice to have
• Analytics, feedback, etc
9
10. Business Case for Push Notifications
User engagement is critical to business success and mobile
plays a big role in this process
Push notifications are an expression of app-based user
engagement
Push notifications have a measurable impact on mobile app
success and user behavior
Inherent IT challenges in enabling mobile Push across
operating systems and devices can and should be overcome
10
11. Use Cases for Push Notifications
Business-to-Consumer Business-to-Business Business-to-Employee
Content, social, product Content, social, product
Engagement Content, social
fulfillment fulfillment
Self-service / Financial, scheduling,
Delivery, billing CRM, ERP, BPM
Productivity customer service
Product price / availability Special offers, inventory
Revenue
alerts, special offers alerts
Cost savings Delivery, billing ERP, BPM
Many examples across all verticals – financial services,
insurance, healthcare, retail, travel, manufacturing, Pharma,
technology, government, and more.
11
12. Availability of Mobile Push Notifications Services
Apple iOS 3
Google Android 2.2
RIM BlackBerry 5
Microsoft Windows Phone 7
12
15. Receiving a Notification on iOS
Destination app is
in the foreground
Another app Dialog, sound, User clicks item in the
Notification is in the badge, notification Notification Center iOS invokes
arrives to device foreground center app's callback
(user configuration)
Device is locked or Dialog, sound, User clicks View in the
on home screen badge, notification notification dialog box
center
(user configuration)
15
17. Receiving a Notification on Android
Destination app is
in the foreground
Android updates User clicks item in
Notification Otherwise Notification Center Android invokes
notification
arrives to device app's callback
center
17
18. Benefits of Push Notifications
User Control • Users need to subscribe to receive notifications
• Users receive notifications also when app is not
Ease of Use active
• No need to issue constant queries from app
Efficiency • Reduces development overhead
• Saves battery usage and communication fees
18
19. Notification Payload and Options
Purpose: Signal to user or app that something new happened
Basic scenario User to take an action App to take an action
Payload size 256 bytes 1024 bytes
Payload structure Custom key-value pairs Custom key-value pairs
Badge Appears on app icon Appears on notification icon
Sound Settable by Server Not by default
(Programmable by app)
Dialog box Settable by Server Not by default
(Programmable by app or by third-
party apps)
19
20. Delivery of Notifications
Only unicast; No batch delivery, multicast or broadcast
Quality of Service
• Queue size: One message waiting per app per device
• No guarantied delivery
• No delivery notification
• Delivery expiry: only for iOS
Quota
• iOS: Unspecified
• Android: 200K (can ask for more)
20
21. Communication Protocol
Connection Streaming TCP/IP socket HTTP POST
Security SSL SSL
Content Binary JSON
Trust Certificate provisioned by Gmail account required per
Apple server
Connectivity problems - Server must implement
exponential back off upon
receiving HTTP 503
"Device not found" errors Server must query Response to POST request
asynchronous feedback contains indicates whether
service and remove device is obsolete or not
obsolete device tokens
21
22. Limitations and How to Overcome Them
Limitations
• Short message size
• No guarantee that delivery chain is secure
• Delivery
• Generally not guaranteed
• Users can always sign out inadvertently
• Users can disable push to save battery
Overcoming Limitations
• Notify that something changed, have app securely pull information
• Alternatives: SMS + e-mail, phone call
22
24. Unified Push Notifications Framework by Worklight
Apple Push Worklight
iOS Servers Client-side
iOS Push API (APN) Push Services
Dispatcher
Back-end Notification Google
Back-end Polling Worklight
System State Android Android Push
System Adapters Client-side
Database Dispatcher
Push API Servers Push Services
(C2DM)
Unified BlackBerry BlackBerry Worklight
Dispatcher RIM Push
Push API Push API Client-side
Servers Push Services
Windows
Back-end Message- User- Phone Windows
Back-end Microsoft
System based Device Dispatcher Push API Worklight
System Push Client-side
Adapters Database Servers Push Services
SMS
Dispatcher
Broker API
SMS/MMS
Brokers
Administrative Console
24
25. Unified Push Notifications Framework by Worklight
Apple Push Worklight
iOS Servers Client-side
iOS Push API (APN) Push Services
Dispatcher
Back-end Notification Google
Back-end Polling Worklight
System State Android Android Push
System Adapters Client-side
Database Dispatcher
Push API Servers Push Services
(C2DM)
Unified BlackBerry BlackBerry Worklight
Dispatcher RIM Push
Push API Push API Client-side
Servers Push Services
Windows
Back-end Message- User- Phone Windows
Back-end Microsoft
System based Device Dispatcher Push API Worklight
System Push Client-side
Adapters Database Servers Push Services
SMS
Dispatcher
Broker API
SMS/MMS
Brokers
Administrative Console
25
26. Unified Push Notifications Framework by Worklight
Apple Push Worklight
iOS Servers Client-side
iOS Push API (APN) Push Services
Dispatcher
Back-end Notification Google
Back-end Polling Worklight
System State Android Android Push
System Adapters Client-side
Database Dispatcher
Push API Servers Push Services
(C2DM)
Unified BlackBerry BlackBerry Worklight
Dispatcher RIM Push
Push API Push API Client-side
Servers Push Services
Windows
Back-end Message- User- Phone Windows
Back-end Microsoft
System based Device Dispatcher Push API Worklight
System Push Client-side
Adapters Database Servers Push Services
SMS
Dispatcher
Broker API
SMS/MMS
Brokers
Administrative Console
26
27. Unified Push Notifications Framework by Worklight
Apple Push Worklight
iOS Servers Client-side
iOS Push API (APN) Push Services
Dispatcher
Back-end Notification Google
Back-end Polling Worklight
System State Android Android Push
System Adapters Client-side
Database Dispatcher
Push API Servers Push Services
(C2DM)
Unified BlackBerry BlackBerry Worklight
Dispatcher RIM Push
Push API Push API Client-side
Servers Push Services
Windows
Back-end Message- User- Phone Windows
Back-end Microsoft
System based Device Dispatcher Push API Worklight
System Push Client-side
Adapters Database Servers Push Services
SMS
Dispatcher
Broker API
SMS/MMS
Brokers
Administrative Console
27
28. Push Notifications Demo
Source code and running instructions available on
http://worklight.com/download/get-started/4.2/
28
29. Demo Scenario
A
login
B
subscribe
C D
Send notification C2DM Receive notification
29
34. Subscribing to Notifications
5. Handle
1. Connect to 2. Get
3. Per Event 4. Manage Subscription
Worklight Subscription
Source: Subscriptions Changes at
Server Details
Server
Register callback
for notifications
Already
subscribed? Custom
Allow
Is ready to subscription
unsubscribing
Login removal logic
subscribe
Custom
Not yet Allow
subscription
subscribed? subscribing
logic
Invocation of Custom
Worklight API implementation
34
35. Pushing Notifications
• Actively poll back-end or
wait for back-end events
• Use any adapter: REST,
SOAP, JDBC, JMS
• Single messages or batch
Get user's
Format Send
subscriptions
Get message notification; Identify the notification
(one per
from data set badge, destination per
device) for
source sound, and user subscribed
the data
dialog box device
source
Invocation of Custom
Worklight API implementation
35
36. Flexible Push Notification Framework
One application multiple devices
Custom subscription management
Many-to-many relationship between event
sources and apps
Multiple event sources from same back-end
Multiple users logging into the same app
36
37. Scalable Push Framework
• Nodes communicate with
APNS and C2DM using same
credentials for each service
APNS
Event
Source
…
C2DM
• All or some Worklight nodes
can process data from the
same event source
• Integration available for any
back-end communication
protocol
37
38. Segregation of Subscription and Push
Network zone open only for
incoming requests
APNS
Subscription
database
Network zone open only for
C2DM
outgoing requests
Event
Source
38
39. For More Information
Resource Location
30-day Software Trial www.worklight.com/download
Online Training www.worklight.com/download/get-started
Documentation www.worklight.com/download/documentation
Whitepapers www.worklight.com/resources/product-resources
Webinars www.worklight.com/resources/webinars-and-tools
Additional Info info@worklight.com
39