Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Social & Mobile Apps journey through the cloud

413 views

Published on

  • Get access to 16,000 woodworking plans, Download 50 FREE Plans... ●●● http://tinyurl.com/y3hc8gpw
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Want to preview some of our plans? You can get 50 Woodworking Plans and a 440-Page "The Art of Woodworking" Book... Absolutely FREE ▲▲▲ http://tinyurl.com/y3hc8gpw
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Social & Mobile Apps journey through the cloud

  1. 1. Journey Through the Cloud ianmas@amazon.com @IanMmmm Ian Massingham — Technical Evangelist Social & Mobile Apps
  2. 2. Journey Through the Cloud Learn from the journeys taken by other AWS customers Discover best practices that you can use to bootstrap your projects Common use cases and adoption models for the AWS Cloud 1 2 3
  3. 3. Social & Mobile Apps Create mobile apps quickly & easily We manage the backend You don’t have to provision, scale, or monitor servers Access a range of services to speed app development
  4. 4. Agenda Why develop mobile apps on AWS? AWS Mobile SDK & Connectors Amazon Cognitio Serverless mobile backends Analyzing user behavior Mobile push notifications Storing and sharing media with Amazon S3 Resources you can use to learn more
  5. 5. WHY DEVELOP MOBILE APPS ON AWS?
  6. 6. Enterprises & Startups Running Mobile Apps on AWS
  7. 7. Authenticate users Authorize access Analyze User Behavior Store and share media Synchronize data Deliver media Store shared data Stream real-time dataRun Business Logic Send push notifications Manage users and identity providers Securely access cloud resources Sync user prefs , states across devices Track active users, Engagement, retention Run stateless custom Code without managing servers 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 App Core Functionality
  8. 8. Problems developers face today Fragmentation across platforms Sync scalability is extremely hard Expensive to manage and operate Distracts them from building core UX Managing unique user identities is difficult to implement for every app Undifferentiated Heavy Lifting Developer’s Mobile App Code User Identity Mgmt. and Auth User Data Synchronization Asynchronous Communication Active Devices Analytics User Behavior Analytics Engagement Analytics Push Notifications Event Triggers Platform agnostic Mobile Backend Data Validation and Transformation File and Media Storage Shared Database Storage Data Collection And More…. AWS Cloud Infrastructure What Mobile Developers have told us
  9. 9. Amazon Cognito Amazon Mobile Analytics Amazon SNS Mobile Push Kinesis Recorder DynamoDB Mapper S3 Transfer Mgr SQS Client SES Client AWS Global Infrastructure (Regions, Availability Zones, 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 Introducing AWS Mobile Services AWS Lambda Lambda Functions λ λ λ λ
  10. 10. Cross-platform Services, Optimized for Mobile Amazon Cognito Amazon Mobile Analytics Amazon SNS Mobile Push Kinesis Recorder DynamoDB Mapper S3 Transfer Mgr SQS Client SES Client AWS Lambda Lambda Functions λ λ λ λ Not limited to Mobile. Run stateless Lambda Functions without any backend servers to manage or scale User identity & data synchronization service Fast cross-platform Analytics & reporting Service Powerful Cross-platform Push notification service Recorder that can handle intermittent network connection Send email reliably from device Access distributed buffering and queuing service Easily upload, download to S3 and also pause, resume, and cancel these operations Store any NoSQL data and also map mobile OS specific objects to DynamoDB tables
  11. 11. Your Mobile App Core Functionality Authenticate users Authorize access Analyze User Behavior Store and share media Synchronize data 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) Run Business Logic AWS Lambda Send push notifications Amazon SNS Mobile Push
  12. 12. AWS MOBILE SDK AND CONNECTORS
  13. 13. • Common authentication mechanism across all services • Automatically handle intermittent network connections • Cross-platform Support: Android, iOS, Fire OS • Native SDKs optimized for Mobile OS, for example, uses the local offline caching architecture • Reduced memory footprint; Pick and choose the service jars you need • Continuously updated with latest platform enhancements iOS Android JavaScript Unity Xamarin Developer Preview Download the latest versions of the SDKs Fully Integrated AWS Mobile SDK
  14. 14. https://github.com/aws/aws-sdk-unity Supported AWS Services Amazon Cognito Amazon DynamoDB Amazon Mobile Analytics Amazon SNS Amazon S3 AWS Mobile SDK for Unity
  15. 15. Optimized for Native OS Multipart upload media Fault tolerant download Automatic retries Pause, resume, cancel functions Generic batching system handles intermittent network connection Optimize battery utilization Mobile-optimized Connectors (AWS Mobile SDK) Kinesis AWS Mobile SDK S3 Kinesis Recorder DynamoDB Mapper S3 TransferManager No Backend Required DynamoDB
  16. 16. AMAZON COGNITO
  17. 17. AUTHENTICATE USERS AND SAVE APP SETTINGS
  18. 18. 1 2 3 Amazon Cognito Simplifies Identity and Access Management Securely access all AWS services from Mobile device Cross-device and Cross-platform Sync Implement 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
  19. 19. Amazon Cognito Identity 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. Mobile Analytics S3 DynamoDB Kinesis
  20. 20. 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 No Backend
 Simple client SDK eliminates need for server side code Cognito Cloud Save and Sync User Data 
 Storage and Sync Any Platform iOS/Android/FireOS k/v data Identity pool
  21. 21. Integrating Cognito Sync functionality 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, COGNITO_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); 1 2 3
  22. 22. SERVERLESS MOBILE BACKENDS
  23. 23. 1 2 3 AWS Lambda Auto Scaling (Never under or over provision) Starting with JavaScript but later any language, Create threads and processes, run batch scripts or other executables Zero administration Bring your own code Run stateless functions in the cloud and scale without any servers to manage Focus on business logic, not infrastructure. Upload your code; AWS Lambda handles everything else Lambda scales the infrastructure as needed to match the event rate and pay as you go
  24. 24. How can you AWS Lambda to work? Data triggers Stream processing Indexing & synchronization 1 10 0 11 1 1 1 0 0 0 0 0 1 10 0 11 1 1 1 0 0 0 0 01 10 0 11 1 1 1 0 0 0 0 0 1 10 0 11 1 1 1 0 0 0 0 0 IoT Server-free back-end
  25. 25. Serverless backends for mobile apps Amazon Cognito Sync Dataset Amazon DynamoDB Table Map local functions to invoke Lambda Functions synchronously Maintain Intelligence in the cloud and not the device Chain multiple Functions or call them in Parallel ☺ AWS Mobile SDKs (iOS, Android) Personalize your notification for every user Pre-process or validate data on the fly pre-process before persisting SNS Push Notification
  26. 26. Synchronous Events
 Respond to events in real-time
 
 AWS Mobile SDK Integration
 Map local functions to cloud functions from within the SDK Amazon SNS Integration
 Target, Filter, and Route Amazon SNS Notifications
 
 Amazon Cognito Integration
 Apply Custom Logic to User Preferences and Game State And much more….
 Java Support, CloudTrail integration, Enhanced metrics and logging via CloudWatch S3 event notifications DynamoDB Streams Kinesis events Cognito events SNS events Custom events AWS Lambda: Ready for Production at Scale http://aws.amazon.com/lambda/faqs/
  27. 27. Adding a Lambda Backend to your App Initialize the LambdaFactory and define the Interface for the functions Call localFunction object to execute Lambda Function Create/Upload the Lambda Function to the AWS Management Console lambda = new LambdaInvokerFactory(context, Regions.US_WEST_2, provider); //interface @LambdaFunction(functionName="cloudFunction”) String localFunction(String nameInfo); lambda.localFunction(“Hello From “); // this will output “Hello From Lambda” exports.handler = function(event, context) { context.done(null, event + 'Lambda'); // SUCCESS with message }; 1 2 3
  28. 28. ANALYZING USER BEHAVIOR
  29. 29. 1 2 3 Amazon Mobile Analytics Scalable and Generous Free Tier Data collected are not shared, aggregated, or reused Fast Own your data Simply and cost effectively collect and analyze your application usage data Focus on metrics that matter. Usage reports available within 60 minutes of receiving data from an app Scale to billions of events per day from millions of users
  30. 30. 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, 9. Avg. Paying DAU
  31. 31. Track Custom Events 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
  32. 32. Integrating Mobile Analytics Initialize the MobileAnalyticsManager to get session activity in the AWS 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(); 1 2 3
  33. 33. Query and Visualize Data Export to S3/Redshift Visualize, manage & process data anywhere mobile client Amazon S3 Amazon Redshift Amazon Mobile Analytics Augment your data External data
  34. 34. Export to S3, Process Data Anywhere mobile client Amazon S3 Amazon Redshift Amazon Mobile Analytics Hadoop/Spark Amazon EMR Amazon Glacier archive batch
  35. 35. External data Export to Redshift (Managed) mobile client Amazon S3 Amazon Redshift Amazon Mobile Analytics Augment your data
  36. 36. MOBILE PUSH NOTIFICATIONS
  37. 37. Amazon SNS Mobile Push Amazon SNS Cross-platform Mobile Push Internet Apple APNS Google GCM Amazon ADM Windows WNS and MPNS Baidu CP With Amazon SNS, developers can send push notifications on multiple platforms and reach mobile users around the world Kindle Fire Devices Android Phones and Tablets Apple iPhones, iPads & Mac OS Desktops iOS & Mac OS Android Phones and Tablets in China Windows Desktop and Windows Phone Devices
  38. 38. STORING AND SHARING MEDIA WITH AMAZON S3
  39. 39. Amazon S3 Connector: Transfer Manager S3 Connector Multipart upload media (photos, videos, audio) Fault tolerant download (e.g. assets) No backend required Automatic retries Pause, resume, cancel functions Optimized for native OS
  40. 40. Amazon S3 Connector: Transfer Manager Creating the transfer manager Pause & resume transfers Upload & download image TransferManager transferManager = new TransferManager(credentialProvider); try { PersistableDownload persistableDownload = download.pause(); //do something if we didn’t abort } catch(PauseException e) { //do something if we aborted } download = transferManager.resumeDownload(persistableDownload); Upload upload = transferManager.upload(BUCKET_NAME, fileName, file); Download download = transferManager.download(BUCKET_NAME, mKey, file); 1 2 3
  41. 41. SUMMARY
  42. 42. Flexible and Work Better Together Fully Integrated and easy to get started Serverless and Scales automatically1 2 3 AWS Mobile Services
  43. 43. Mobile Services Working Together Push Synchronization SNSCognito Cognito Cognito Auto Export to S3/Redshift SNS Cognito Streams to Kinesis Lambda Lambda Lambda Lambda Any Analytics S3/Redshift Kinesis Trigger based on Streams Trigger based on Sync Events Securely access AWS Services Update Push Notifications with Functions DynamoDB Trigger based on DynamoDB streams Cognito KinesisLambdaS3 Trigger based on S3 PUTs
  44. 44. Optimized for Native OS Multipart upload media Fault tolerant download Automatic retries Pause, resume, cancel functions Generic batching system handles intermittent network connection Optimize battery utilization Mobile-optimized Connectors (AWS Mobile SDK) Kinesis AWS Mobile SDK S3 Kinesis Recorder DynamoDB Mapper S3 TransferManager No Backend Required DynamoDB
  45. 45. Your Mobile App Core Functionality Authenticate users Authorize access Analyze User Behavior Store and share media Synchronize data 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) Run Business Logic AWS Lambda Send push notifications Amazon SNS Mobile Push
  46. 46. Get Started for Free Amazon Cognito Mobile Analytics 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 AWS Lambda Free Tier : 1M free requests per month 400,000 GB- seconds of compute time per month
  47. 47. aws.amazon.com/free
  48. 48. RESOURCES YOU CAN USE TO LEARN MORE
  49. 49. aws.amazon.com/mobile
  50. 50. mobile.awsblog.com/
  51. 51. aws.amazon.com/mobile/sdk www.twitter.com/awsformobile aws.amazon.com/lambda aws.amazon.com/kinesis aws.amazon.com/redshift
  52. 52. aws.amazon.com/architecture/
  53. 53. Certification aws.amazon.com/certification Self-Paced Labs aws.amazon.com/training/
 self-paced-labs Try products, gain new skills, and get hands-on practice working with AWS technologies aws.amazon.com/training Training Validate your proven skills and expertise with the AWS platform Build technical expertise to design and operate scalable, efficient applications on AWS AWS Training & Certification
  54. 54. Follow us for m ore events & w ebinars @AWScloud for Global AWS News & Announcements @AWS_UKI for local AWS events & news @IanMmmm Ian Massingham — Technical Evangelist

×