• No results found

Building Cloud-powered Mobile Apps

N/A
N/A
Protected

Academic year: 2021

Share "Building Cloud-powered Mobile Apps"

Copied!
71
0
0

Loading.... (view fulltext now)

Full text

(1)

Building Cloud-powered Mobile

Apps

Jenny Sun, AWS Solution Architect

(2)

Session Goals

• Mobile Apps on AWS

• How to build a mobile app today?

– Social Logins

– Geo Tagging

– File and Data Storage

– Push Notifications

– Data Analytics

(3)
(4)

如果我们改变人们的移

动阅读方式?

释放创造力

(5)
(6)

如果我们改变人们的旅

行方式?

释放创造力

(7)
(8)
(9)

acquired by Facebook for $1B April 2012

valued at $3B November 2012

valued at $2.5B February 2013

acquired by Yahoo! for $1.1B May 2013

acquired by Google for $1.1B June 2013

acquired by Facebook April 2013

(10)

“亚马逊AWS可能是对移动和Web 应用程

序开发者而言最重要的事情。杰夫·贝佐

斯 (Jeff Bezos) 偶然或者也许是有意

推动

了整个一代应用程序的开发

(11)

“云就如同培养创业公司的沃土”

(12)
(13)

Authenticate users

Authorize access

Analyze User Behavior

Store and share media

Synchronize data

Deliver media

Store shared data

Stream real-time data

Track Retention

Send push notifications

Manage users and identity providers

Securely access cloud resources

Sync user prefs across devices

Track active users, engagement

Manage funnels,

Campaign performances

Store user-generated photos Media and share them

Automatically detect mobile devices Deliver content quickly globally

Bring users back to your app by sending messages reliably

Store and query fast NoSQL data across users and devices

Collect real-time clickstream logs and take actions quickly

Your Mobile

(14)

Introducing AWS Mobile Services

Amazon Cognito Amazon Mobile Analytics Amazon SNS Mobile Push

Kinesis Connector DynamoDB Connector S3 Connector SQS Connector SES Connector

AWS Global Infrastructure (10 Regions, Availability Zones, 51 Edge Locations)

Core Building Block

Services

Mobile Optimized

Connectors

Mobile Optimized

Services

Your Mobile App, Game or Device App

AWS Mobile SDK, API Endpoints, Management Console

Compute Storage Networking Analytics Databases

(15)

Cross-platform, Optimized for Mobile

Amazon Cognito Amazon Mobile Analytics Amazon SNS Mobile Push

Kinesis Connector DynamoDB Connector S3 Connector SQS Connector SES Connector User identity &

data synchronization service

Store any NoSQL data and also map mobile OS specific objects to

DynamoDB tables

Fast cross-platform Analytics & reporting Service

Powerful Cross-platform Push notification service

Recorder that can handle intermittent network connection

Easily upload, download to S3 and also pause,

(16)

Fully Integrated AWS Mobile SDK

• Common authentication mechanism across

all services

• Automatically handle intermittent network

connections

• Cross-platform Support: Android, iOS, Fire

OS (Unity, PhoneGap, Cordova coming

soon)

• Native SDKs optimized for Mobile OS, for

example, uses the local offline caching

architecture

(17)

Authenticate users

Authorize access

Analyze User Behavior

Store and share media

Synchronize data

Deliver media

Store shared data

Stream real-time data

Track Retention

Send push notifications

Manage users and identity providers

Securely access cloud resources

Sync user prefs across devices

Track active users, engagement

Manage funnels,

Campaign performances

Store user-generated photos Media and share them

Automatically detect mobile devices Deliver content quickly globally

Bring users back to your app by sending messages reliably

Store and query fast NoSQL data across users and devices

Collect real-time clickstream logs and take actions quickly

Your Mobile

(18)

Authenticate users

Authorize access

Analyze User Behavior

Store and share media

Synchronize data

AWS Mobile SDK Amazon Mobile Analytics

Deliver media

Amazon Cognito (Sync)

AWS Identity and Access Management

Amazon Cognito

(Identity Broker) Amazon S3 Transfer Manager

Amazon CloudFront (Device Detection)

Store shared data

Amazon DynamoDB (Object Mapper)

Stream real-time data

Amazon Kinesis (Recorder)

Track Retention

Amazon Mobile Analytics

Send push notifications

Amazon SNS Mobile Push

Your Mobile

(19)

Authenticate users

Authorize access

Analyze User Behavior

Store and share media

Synchronize data

AWS Mobile SDK Amazon Mobile Analytics

Deliver media

Amazon Cognito (Sync)

AWS Identity and Access Management

Amazon Cognito

(Identity Broker) Amazon S3 Transfer Manager

Amazon CloudFront (Device Detection)

Store shared data

Amazon DynamoDB (Object Mapper)

Stream real-time data

Amazon Kinesis (Recorder)

Track Retention

Amazon Mobile Analytics

Send push notifications

Amazon SNS Mobile Push

Your Mobile

(20)
(21)

Introducing Amazon Cognito

Cross-device and Cross-platform Sync

Securely access AWS services from Mobile

device

Simplifies Identity and Access Management

Implement security best practices

“Your App data is secure, available offline, and kept in sync between devices”

Asynchronously sync user data across devices and platforms Manage unique identity

for your user across identity providers

(22)

Identity

Providers

Unique

Identities

Joe

Anna

Bob

Any Device

Any Platform

Any AWS

Service

Helps implement security best

practices

Securely access any AWS Service from mobile

device. It simplifies the interaction with AWS

Identity and Access Management

Support Multiple Login Providers

Easily integrate with major login providers for

authentication.

Unique Users vs. Devices

Manage unique identities. Automatically

recognize unique user across devices and

platforms.

Amazon Cognito Identity

Mobile Analytics

(23)

Amazon Cognito for Unauthenticated Identities

Unique Identifier for Your “Things”

“Headless” connected devices can also

securely access cloud services.

Save Data to the Cloud

Save app and device data to the cloud and

merge them after login

Guest User Access

Securely access AWS resources and leverage

app features without the need to create an

account or logging in

Visitor Preferences Cognito Store Guest

(24)

Getting Started with Cognito in 3 steps

Sign up for AWS Account and login to AWS Management Console

Download and integrate the Mobile SDK and store and

sync user data in a dataset

(25)
(26)
(27)
(28)
(29)
(30)
(31)
(32)
(33)

Amazon Cognito (Identity Broker)

Identitypool

Identity Providers

Pool of identities that share the same trust policy

Access Policy Access to AWS Services identitypool Unauthenticated Identities authenticated identities

AWS IAM Roles AWS Account Web Identity Federation S3 DynamoDB

(34)

Access Policy for the IAM Role

{ "Effect":"Allow", "Action":["s3:*"], "Resource":"*" } { "Effect": ”Deny", "Action": ["dynamodb:*"], "Resource": "*" } { "Effect": "Allow", "Action": [”cognito-sync:*"], "Resource": "*" }

Allow

Actions:

All S3, Sync store Operations

Resource:

(35)
(36)

What have customers told us about “Synchronized

Profile”

People have multiple devices and want to transition between devices.

Implementing a user profile that syncs across devices, OS, apps is hard.

(37)

Amazon Cognito Sync

User Data

Storage and

Sync

Any Platform

iOS/Android/FireOS

Store App Data, Preferences and State

Save app and device data to the cloud and merge

them after login

Cross-device Cross-OS Sync

Sync user data and preferences across devices

with one line of code

Work Offline

Data always stored in local SQLite DB first.

Works seamlessly when intermittent or no

connectivity

k/v data

(38)

Amazon Cognito Sync

Offline: The client SDK manages a local SQLite data store to allow the app to work even when connectivity is not available.

Fast: The methods to read and write data only interact with the local SQLite database.

Intelligent Sync: The sync method compares the local version of the data to the cloud sync store, pushes up deltas and pulls down new changes.

Flexible Conflict resolution: The sync method first reads the changes then writes its local changes to the cloud sync store By default Cognito assumes that the

last write wins. Developers can override and

implement their own conflict resolution programmatically

(39)

Integrating Cognito Sync functionality is dead simple

Initialize the CredentialsProvider and CognitoClient

Call synchronize on the dataset

Create or open Dataset and Add Key Values

provider = new CognitoCredentialsProvider(context, AWS_ACCOUNT_ID, COGNITO_POOL_ID, COGNTIO_ROLE_UNAUTH, COGNITO_ROLE_AUTH);

cognito = new DefaultCognitoSyncClient(context, COGNITO_POOL_ID, provider);

(40)

Integrating Cognito Sync functionality is dead simple

Initialize the AWSCognitoSyncClient

Call synchronize on the dataset

Create or open Dataset and Add Key Values

DataSet *dataset = [syncClient openOrCreateDataSet:@"myDataSet"]; NSString *value = [dataset readStringForKey:@"myKey"];

[dataset putString:@"my value" forKey:@"myKey"];

AWSCognitoSyncClient *syncClient = [[AWSCognitoSyncClient alloc] initWithConfiguration: configuration];

[dataset synchronize];

(41)
(42)
(43)

What Customers Told Us About “Mobile Analytics”

Developers deeply value user analytics and consider it an integral part

of their app development process. They want to monitor their most

(44)

Amazon Mobile Analytics

Scalable and Generous Free Tier

Focus on metrics that matter. Usage reports

available within 60 minutes of receiving data

from an app

Fast

Scale to billions of events per day from

millions of users.

Own Your Data

“Easily collect, visualize and understand your app usage data at scale”

Data collected are not shared, aggregated, or

(45)

Getting Started with Mobile Analytics in 3 steps

Sign up for AWS Account and create or use existing Cognito ID in

the AWS Management Console

View engagement and session activity reports in the

AWS Management console within minutes

(46)
(47)

Key Business Metrics

(with one line of code)

1. Monthly Active Users

(MAU)

2. Daily Active Users

(DAU)

3. New Users,

4. Daily Sessions,

5. Sticky Factor,

6. 1-Day Retention,

7. Avg. Revenue per DAU,

8. Daily Paying Users,

(48)

Track Retention

User retention is a key

indicator to judge the

outcome of a marketing

campaign, new feature

introduction, UX changes,

app updates, etc.

Mobile Analytics provide four

charts to track daily or

(49)

Get behavioral insights into app specific

actions that your users take

Reports provide a view of how often custom

events occur. You can add further context

with Attributes and Metrics, to each custom

event

Examples

Track the number of Likes/Shares, per article, in a news app

Understand player abort rates per level, in a game Number of songs played, per user session, in a music app

In-app item popularity in a shopping app

(50)

Integrating Mobile Analytics is super simple

Initialize the AmazonMobileAnalyticsClient. That’s it! Get Session

Activity in the AWS Management Console.

For Custom Events activity reports, add events.

Add OnResume() and OnPause()

analytics = new AmazonMobileAnalytics(provider, context, "SnakeGameAWS”);

EventClient eventClient = analytics.getEventClient();

MobileAnalyticsEvent visitEvent = eventClient.createEvent("speedSet"); eventClient.recordEvent(visitEvent);

(51)

Integrating Mobile Analytics is super simple

Initialize the AmazonMobileAnalytics object. That’s it! Get Session

Activity in the AWS Management Console.

Submit the event. If we don't call submitEvents, events

will automatically be submitted at periodic intervals.

Create add Custom Events

[eventClient submitEvents];

id<AWSMobileAnalyticsEventClient> eventClient = analytics.eventClient; id<AWSMobileAnalyticsEvent> level1Event = [eventClient

createEventWithEventType:@"level1Complete"];

AWSMobileAnalytics* analytics = [AWSMobileAnalytics

defaultAWSMobileAnalyticsWithIdentifier:@"someuniqueid"];

(52)
(53)

Amazon S3 Connector: Transfer Manager

S3 Connector

• Multipart upload/download media

to/from S3 (photos, videos, audio)

• No backend required

• Automatic retries

• Pause, resume, cancel functions

(54)

// Creating the transfer manager

self.transferManager = [S3TransferManager new];

self.transferManager.s3 = s3client;

// Upload image

[self.transferManager uploadFile:fileName bucket:bucketName key:objectName];

// Download image

[self.transferManager downloadFile:fileName bucket:bucketName key:objectName];

// Pause, Resume, Cancel

[self.transferManager pauseAllTransfers];

[self.transferManager resumeAllTransfers];

[self.transferManager cancelAllTransfers];

(55)
(56)

What Customers Told Us About “Push Notifications”

(57)

Each platform works differently, and push gets even more

complex as you scale to support millions of devices.

Cloud App

(58)

Amazon SNS Cross-platform Mobile Push Internet Apple APNS Google GCM Amazon ADM Windows WNS and MPNS Baidu CP

Industry’s First!

New!

With Amazon SNS, developers can send push notifications on multiple platforms and reach mobile users around the world

New features:

Message Expiry Time

Message Attributes

Amazon SNS Mobile Push

Android Phones and Tablets Apple iPhones and iPads

Kindle Fire Devices

Android Phones and Tablets in China

iOS

(59)

You can send a distinct payload for each platform, or

publish one common message for all platforms.

(60)

Developers Love Cross-Platform Features of SNS

Fast reliable

notification for every

Email received is

powered by SNS

Customers love

high scale and

Reliability of SNS

High-profile Startups

trust SNS for their

high-profile launches

Secret.ly

Advanced targeted

notifications

bring players back into

the game

Mature games increase

retention using SNS

Launched its Android

App with SNS, no

provisioning required

Jetpack Joyride

(61)
(62)

Amazon

Kinesis

S3

Redshift

Kinesis

enabled

Apps on

EC2

AWS

Mobile

SDK

Amazon Kinesis Connector for Mobile

Apps

For sophisticated

User Behavior

Analysis

Integrated AWS Mobile SDK

Generic batching system that

handles intermittent network

connection and also optimize

battery utilization

(63)
(64)

Authenticate users

Authorize access

Analyze User Behavior

Store and share media

Synchronize data

Deliver media

Store shared data

Stream real-time data

Track Retention

Send push notifications

Manage users and identity providers

Securely access cloud resources

Sync user prefs across devices

Track active users, engagement

Manage funnels,

Campaign performances

Store user-generated photos Media and share them

Automatically detect mobile devices Deliver content quickly globally

Bring users back to your app by sending messages reliably

Store and query fast NoSQL data across users and devices

Collect real-time clickstream logs and take actions quickly

Your Mobile

(65)

Authenticate users

Authorize access

Analyze User Behavior

Store and share media

Synchronize data

AWS Mobile SDK Amazon Mobile Analytics

Deliver media

Amazon Cognito (Sync)

AWS Identity and Access Management

Amazon Cognito

(Identity Broker) Amazon S3 Transfer Manager

Amazon CloudFront (Device Detection)

Store shared data

Amazon DynamoDB (Object Mapper)

Stream real-time data

Amazon Kinesis (Recorder)

Track Retention

Amazon Mobile Analytics

Send push notifications

Amazon SNS Mobile Push

Your Mobile

(66)

Key Takeaways

Amazon Cognito Amazon Mobile Analytics Amazon SNS Mobile Push

Kinesis Connector DynamoDB Connector S3 Connector SQS Connector SES Connector

AWS Global Infrastructure (10 Regions, Availability Zones, 51 Edge Locations)

Core Building Block

Services

Mobile Optimized

Connectors

Mobile Optimized

Services

Your Mobile App, Game or Device App

AWS Mobile SDK, API Endpoints, Management Console

Compute Storage Networking Analytics Databases

(67)

Key Takeaways

Amazon Cognito Amazon Mobile Analytics Amazon SNS Mobile Push

Kinesis Connector DynamoDB Connector S3 Connector SQS Connector SES Connector

AWS Global Infrastructure (10 Regions, Availability Zones, 51 Edge

Locations)

Core Building Block

Services

Mobile Optimized

Connectors

Mobile Optimized

Services

Your Mobile App, Game or Device App

AWS Mobile SDK, API Endpoints, Management Console

Compute Storage Networking Analytics Databases

Integrated SDK

Cross Platform

and Optimized

for Mobile

Flexibility

And Freedom

of Choice

Fully integrated

and easy to get

(68)

Amazon Cognito

Amazon Mobile

Analytics

Amazon SNS

Mobile Push

Free Tier:

1 Million push messages

every month

Free Tier (for first 12

months):

1 Million syncs/month +

10GB of storage for

Amazon Cognito

Free Tier:

100 Million events every

month

(69)
(70)
(71)

Simple and predictable pay as you go pricing

Amazon Cognito

Amazon Mobile

Analytics

Amazon SNS

Mobile Push

Free Tier:

1 Million push messages

every month

Thereafter:

$0.50 for Million

notifications delivered

$0.50 for Million requests

Free Tier (for first 12

months):

1 Million syncs/month +

10GB of storage for

Amazon Cognito

Thereafter:

$0.15 for 10K Syncs

$0.15 per GB for storage

Free Tier:

100 Million events every

month

Thereafter:

References

Related documents

DIRECTORY SERVICES IDENTITY GOVERNANCE ACCESS MANAGEMENT To Handle 100s of Millions of Users Supporting Mobile, Social and Cloud. With

greatly simplifies the analysis, and rules out the strange effect that a higher reward for a good fit from principal 1 can motivate agent 2 to pay higher effort through a

The Open Identity Stack is a simple, open, developer-friendly platform for building identity relationship management services for enterprise, cloud, social, and mobile systems.

The extrinsic housing attributes at this study consist of three attributes (Environmental attributes, location attributes and exterior design and space).While previous

• Integrated Data and Identity Protection • Cloud Security Broker for Cloud &amp; Mobile Apps • User and Behavioral Analytics?. • Cloud-based Encryption and

Got the brand certificate for flipkart are required to claim through the image runners, for online sellers of the seller. Criterias for brand flipkart for this website

The scores computed by PhenoRank-NoSimulation are similarly correlated with network degree and the number of associated sources of phenotype data, whilst the gene

DiMeX extracts triplets of mutations, genes and diseases (&lt;M,G,D&gt;) from various abstract sentences along with additional useful information that can be used to search and