51
November 12, 2014 | Las Vegas, NV Rich Cowper, Solution Architect

(MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Embed Size (px)

DESCRIPTION

Cross-platform push notifications that can engage your customers even when your app is in the background are becoming a central part of a mobile app user experience. Some customers may rarely open an app that provides useful information to them; for them, the notifications are the most important part. But great user experiences can break if your messages get dropped or delayed. How do you ensure your messages are delivered fast and reliably at scale? And how can you use them to extend the user experience of your app? In this session, we show you how Amazon SNS provides the performance and simplicity of a managed service, while also supporting interactive notifications, silent push, and broadcasts to large groups. We also learn from Mailbox, who rely on large-scale push notifications as a core part of the user experience, and who will share real-world design patterns.

Citation preview

Page 1: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

November 12, 2014 | Las Vegas, NV

Rich Cowper, Solution Architect

Page 2: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014
Page 3: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014
Page 4: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

65% of mobile apps are abandoned

within 90 days.

http://blog.flurry.com/bid/90743/App-Engagement-The-Matrix-Reloaded

Page 5: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014
Page 6: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014
Page 7: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Apple APNS

Google GCM

Amazon ADM

Page 8: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Cloud App

Platform Services Mobile Apps

Page 9: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Mobile Apps

Pu

sh

In

term

ed

iary

Cloud App

Platform Services

Page 10: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Mobile Apps

Cloud App

Platform Services

Amazon SNS

Mobile Push

Page 11: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Apple APNS

Google GCM

Amazon ADM

Windows WNS and

MPNS

Baidu CP

Industry’s First!

New!

Android Phones and Tablets

Apple iPhones and iPads

Kindle Fire Devices

Android Phones and Tablets in China

iOS

Windows Desktop and Windows Phone

Devices

Cloud App

Amazon SNS

Mobile Push

Page 12: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Mobile Apps

Cloud App

Platform Services

Amazon SNS

Mobile Push

Page 13: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Mobile Apps

Cloud App

Platform Services

Amazon SNS

Mobile Push

Page 14: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

$392.88

393M

44,963

787

1M

787M

Page 15: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014
Page 16: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

We know these use cases well

Broadcast Direct Closed Loop

Identical messages to

many users at once

Unique messages to

individual users

Targeted and optimized

with analytics

Page 17: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Direct and Broadcast is very straightforward

Publish

Publish

Publish

Publish

Direct Push Broadcast with SNS Topics

Page 18: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Direct and Broadcast is very straightforward

Direct Push Broadcast with SNS Topics

High-profile Startups

trust SNS for their

high-profile launches

Launched its Android

App with SNS,

no provisioning required

Advanced targeted Notifications bring

players back into the game

Mature games increase retention using

SNS Topics

Jetpack Joyride Fruit ninja

Secret.ly

Page 19: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Many topics with many devices for many reasons

Geography Activity Product

US – West Coast Daily Actives Flapping Bird Rio

Interest Tier Segment

49ers Premium Top 100 Players

Page 20: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Amazon

Kinesis

Amazon Redshift

Marketing

Kinesis-enabled

app

App Back-EndAmazon SNS

Mobile Push

Campaign

Topic

Page 21: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Combining these tools, push evolves

Broadcast Direct Closed Loop

Identical messages to

many players at once

Unique messages to

individual players

Targeted and optimized

with analyticsUser Experience

The Notification becomes the UI

Page 22: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014
Page 23: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014
Page 24: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

“time_to_live”: 3600

Page 25: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014
Page 26: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014
Page 27: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014
Page 28: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014
Page 29: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Cloud App

Platform Services Mobile Apps

Page 30: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Cloud App

App Stores Mobile Apps

Page 31: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Mobile App with

Baidu agent

Cloud App

Amazon SNS

Mobile Push

Baidu

Cloud Push

Page 32: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014
Page 33: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Step 1: Obtain Application Prerequisites

• APNs:

• Apple Push Notification service SSL certificate

• Application Private Key

• GCM:

• API Key (Sender Auth Token)

• ADM:

• Client ID

• Client secret

Page 34: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Step 2: Register Your Mobile App with AWS

Amazon SNS

Mobile Push

Page 35: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Step 3: Get Device Token from device

• APNs:

• Device Token

• GCM:

• Registration ID

• ADM:

• Registration ID

Cloud

App

<e960d9b1…de43f6c0>

Page 36: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Step 4: Add Token to Amazon SNS

• For existing devices

• Use the console for .csv import

• Or use CreatePlatformEndpoint API

• For future devices

• Use a proxy server and the CreatePlatformEndpoint API

• Or use Amazon Cognito and let devices register themselves

• Receive an ARN back

Amazon SNS

Mobile Push

Cloud

App

<e960d9b1…de43f6c0>

arn:aws:sns:eu-west-1:12…1f

Page 37: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Device Registration – Back-end Code example

private String getArnForDeviceEndpoint(

String platformApplicationArn,

String deviceToken) {

CreatePlatformEndpointRequest request =

new CreatePlatformEndpointRequest()

.withPlatformApplicationArn(platformApplicationArn)

.withToken(deviceToken);

CreatePlatformEndpointResult result =

snsClient.createPlatformEndpoint(request);

return result.getEndpointArn();

Page 38: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Device Self-Registration – iOS Example

<YOUR SNS APP ARN>

MyUserID;iPhone5Amazon Cognito

Credentials

Page 39: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Step 5a: Send Push Notifications via the Console

Hello world!

Page 40: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Step 5b: Send Push Notifications via the API

MyMac:~ glez$ python

Python 2.7.2 (default, Oct 11 2012, 20:14:37)

[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> import boto

>>> import boto.sns

>>> boto.sns.connect_to_region("eu-west-1").publish(

... message="Hello world!",

... target_arn="arn:aws:sns:eu-west-1:979463966312:endpoint/APNS_SANDBOX/Push2reInvent/fc1234a1-67ef-4f62-b31a-ac320bf7631f")

{u'PublishResponse': {u'PublishResult': {u'MessageId': u'1893fa9d-7478-5137-be1d-b06928d999d0'}, u'ResponseMetadata': {u'RequestId': u'c3c26267-92af-50b3-b529-2893ce0e4854'}}}

>>>

Page 41: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Step 6: Receive and Close the Loop

Page 42: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014
Page 43: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014
Page 44: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014
Page 45: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014
Page 46: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

We redesigned the

inbox to make email

light, fast, and mobile-

friendly.

Page 47: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Mobile push notifications

are a core part of the

Mailbox user experience

Fast, reliable messages at

the right time on all your

devices

Silent push notifications to

refresh your inbox in the

background

Page 48: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Amazon SNS

Mobile Push

3rd Party Mobile

Push Provider

At Launch Late 2013: Self Managed January 2014

• Unpredictable

• Black box

• Pricey

• Scalable, cheaper, more

predictable

• Ongoing devops and

development cost

• Capacity planning

• No provisioning

• Reliable and

performant

• $1 per million

Page 49: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

Amazon SNS

Mobile Push

Hundreds of millions of mobile push

deliveries per week

Launched our Android app on SNS,

with no clear idea of how much

capacity to provision (not a problem

with SNS)

Instant support for new features like

iOS 8 interactive push notifications.

Page 50: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014
Page 51: (MBL301) Beyond the App - Extend Your User Experience with Mobile Push Notifications - Featuring Mailbox | AWS re:Invent 2014

http://bit.ly/awsevals