Un backend: pour tous vos objets connectés

Preview:

Citation preview

Un backend pour tous vos objets

connectésMichael Garcia – Architecte Solutions –

mlgarcia@amazon.fr

@aws_actus

Source: reservoir.jobs / festivalmawazine

Source: tlciscreatice.com / activate.com

Source: engagor.com

We asked two questions to our mobile customers:

What makes your mobile apps unique?

Where are you spending most of your time?

We asked two questions to our mobile customers:

What makes your mobile apps unique?

Where are you spending most of your time?

How to build a mobile app today?

Your

Mobile

App

Your

Mobile

App

AWS Mobile SDK

Your

Mobile

App

Authenticate users

Amazon Cognito

(Identity Broker)

AWS Mobile SDK

Your

Mobile

App

Authenticate users

Synchronize dataAmazon Cognito

(Sync)

Amazon Cognito

(Identity Broker)

AWS Mobile SDK

Your

Mobile

App

Authenticate users

Analyze User Behavior

Synchronize data

Amazon Mobile

Analytics

Amazon Cognito

(Sync)

Amazon Cognito

(Identity Broker)

AWS Mobile SDK

Your

Mobile

App

Authenticate users

Analyze User Behavior

Synchronize data

Amazon Mobile

Analytics

Amazon Cognito

(Sync)

Amazon Cognito

(Identity Broker)

AWS Mobile SDK

Send push notificationsAmazon SNS

Mobile Push

Your

Mobile

App

Authenticate users

Authorize access

Analyze User Behavior

Synchronize data

Amazon Mobile

Analytics

Amazon Cognito

(Sync)

Amazon Cognito

(Identity Broker)

AWS Identity and

Access Management

Store shared dataAmazon DynamoDB

(Object Mapper)

Store and share media

Deliver media

Amazon S3

Transfer Manager

Amazon CloudFront

(Device Detection)

Event driven compute

AWS Lambda

AWS Mobile SDK

Send push notificationsAmazon SNS

Mobile Push

Improve mobile apps retention with

Amazon Simple Notification Service

Emmanuel Lemoine

CTO & Founder @ Pretty Fun Therapy

Pretty Fun Therapy

• We do ”Mobile Social Discovery”

– To bring people together through casual apps

– Because meeting people should be fun

Playme!Dating + Gaming

• Release: May 15, 2014

• Platform: iOS and Android

• Audience: 6k DAU

Filter Browse Play Engage

What is Amazon Simple Notification Service?

• Notification service (HTTP/S, Email, SQS, Mobile Push)

• Cross platform for Mobile Push

– Android / iOS / Windows / Baidu / FireOS

• Cross platform “Native Push“ handler

Why do we use it?

• “Social app” means “users engagement”

Without SNS:

Hey, how

are you?

DynamoDB

Why do we use it?

• “Social app” means “users engagement”

With SNS:

Hey, how

are you?

DynamoDB SNS

Fine, what

about u?

Rentention boosterUX enhancer

What does SNS do for us?

• PFT uses SNS for Native Push purpose

• SNS acts as an intermediate between our App and providers’ Native

Push System (Only one integration to build)

• SNS is also like a database of our users’ device identifier

Cross platform devices

Register

SNS

UserId: 1DeviceToken: ecaffa86334b6885359… Platform: APNS

UserId: 2DeviceToken: APA91bHpUYDrDRlNA… Platform: GCM

UserId: 1DeviceToken: addcea86334b6885359… Platform: APNS

What does SNS do for us?

• PFT uses SNS for Native Push purpose

• SNS acts as an intermediate between our App and providers’ Native

Push System (Only one integration to build)

• SNS is also like a database of our users’ device identifier

"SNS rocks!"

Android?

iOS?

GCM

APNS

Multiple platforms,one syntax :

@sns.pulish(params)

MyCrazyTopic Android subscribers

SNS Topics

• Call once, deliver to thousands

@sns.pulish(topic_arn: ‘MyCrazyTopic’)

GCM APNS

MyCrazyTopic iOS subscribers

Pricing ?

Amazon SNS

Mobile Push

Free Tier:1 Million push messages every month15 GB for all free tier services

What did we gain using SNS ?

Low Cost +20% day 1 user retentionBuilding the app fasterwith less maintenance

Your

Mobile

App

Authenticate users

Analyze User Behavior

Synchronize data

Amazon Mobile

Analytics

Amazon Cognito

(Sync)

Amazon Cognito

(Identity Broker)

AWS Mobile SDK

Send push notificationsAmazon SNS

Mobile Push

Amazon Cognito Authentication

Amazon Cognito

Cross-device and

Cross-platform Sync

Securely access all

AWS services from Mobile device

Simplifies Identity and

Access ManagementImplement security best

practices

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

Synchronize user’s data

across devices and

platforms

Manage users as

unique identities across

identity providers

Guest Your own Auth

Amazon Cognito Security

EC2 S3 DynamoDB Kinesis

Amazon Cognito Security Architecture

End Users

App with

AWS Mobile

SDK

Access

to AWS

Services

Login OAUTH/OpenID

Access Token

Cognito ID,

Temp

Credentials

Access

Token

Pool ID

Role ARNs

Cognito ID

(Temp

Credentials)

DynamoDB

Cognito Identity

Broker

S3

Mobile Analytics

Cognito Sync

Store

Identity

Providers

Unique

IdentitiesJoe Anna Bob

Any Device

Any Platform

Amazon Cognito Identity

Amazon Cognito for Unauthenticated Identities

Visitor

Preferences

Cognito

Store

Guest

S3 DynamoDB Kinesis

Users begin their life as guests

Amazon Cognito for Unauthenticated Identities

Later on they register an account

• The transition should be seamless

Amazon Cognito for Unauthenticated Identities

Multiple accounts can be linked

• You should have a consistent identifier

Amazon Cognito for Unauthenticated Identities

Amazon Cognito Sync

Amazon Cognito Sync

Amazon Cognito Sync

Amazon Cognito Sync

AWS SDK

Local SQLite Cache

iOS/Android/FireOS/any platform

(AWS SDK)

Concrete Software builds cross platform mobile games

With Amazon Cognito, We

can build games much faster

and provide great user

experience to our customers.

Keith A. Pichelman

CEO, Concrete Software

“• Provide a seamless user experience across devices

and platforms to our users.

• Store save games in the cloud and synchronize them

across all of a user’s devices without creating or

hosting a backend.

The Challenge

The solution

• Amazon Cognito helps us securely access our AWS

resources.

• Cognito Sync gives us flexibility to save data in the

cloud, and cache it on a user’s devices, without

managing any backend infrastructure.

Integrating Cognito Sync functionality is fast

Initialize the CredentialsProvider and CognitoClient

Call synchronize on the dataset

Create or open Dataset and Add Key Values

provider = new CognitoCachingCredentialsProvider (context, AWS_ACCOUNT_ID,

COGNITO_POOL_ID, COGNTIO_ROLE_UNAUTH, COGNITO_ROLE_AUTH, Regions.US_EAST_1);

cognito = new CognitoSyncManager (context, Regions.US_EAST_1, provider);

dataset.synchronize(new SyncCallback(){..});

cognito.openOrCreateDataset(datasetName);

dataset.put(key, value);

Integrating Cognito Sync functionality is fast

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];

iOS

Analyze User Behavior: Amazon Mobile Analytics

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

important metrics in a timely manner, and take action quickly. They would

like to own their mobile data, just like they do with any other AWS

service.

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

reused

Specific metrics related to your app and your business

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

Track Custom Events

Active users / Sessions / Revenue / Retention

Track Behavior Events

Integrating Mobile Analytics is fast

Initialize the MobileAnalyticsManager. That’s it! Get Session

Activity in the AWS Management Console.

For Custom Events activity reports, add events.

Add OnResume() and OnPause()

private static MobileAnalyticsManager analytics;

analytics = MobileAnalyticsManager.getOrCreateInstance(

this.getApplicationContext(),"yourCompany.yourAppId",

Regions.YOUR_REGION, config, cognitoProvider );

EventClient eventClient = analytics.getEventClient();

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

eventClient.recordEvent(visitEvent);

analytics.getSessionClient().resumeSession();

analytics.getSessionClient().pauseSession();

Analytics.getEventClient().submitEvents();

Integrating Mobile Analytics is fast

Initialize the AWSMobileAnalytics 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"];

iOS

Demo: Amazon Mobile Analytics

Beyond mobile analytics

mobile client Amazon S3 Amazon RedshiftAmazon Mobile Analytics

Analytic tool

53

FORZA FOOTBALLSINCE 2012

BY TABLEAU

VISUALIZATIONS

PENETRATIONUSERS PER COUNTRY

55

LEVERAGE ON MISSIONVOTE PER COUNTRY

56

DEVICESIN FORZA FOOTBALL

57

Amazon Cognito Amazon Mobile

Analytics

Amazon SNS

Mobile Push

Free Tier:1 Million push messages every month

Free Tier:1 Million syncs/month + 10GB of storage for Amazon Cognito

Free Tier:100 Million events every month

Get Started for Free!

http://aws.amazon.com/mobile

AWS Mobile

SDK

Your

Mobile

App

serverlessbackend

Thank you !!

@aws_actus

Inscrivez-vous gratuitement à l’adresse :

aws.amazon.com/summits/paris

Recommended