Tuesday, June 7, 2016

10_AWS - Mobile Services

Amazon Web Services
 
2006: Amazon launched Amazon Web Service (AWS) on a utility computing basis although the initial released dated back to July 2002.
Amazon Web Services (AWS) is a collection of remote computing services (also called web services) that together make up a cloud computing platform, offered over the Internet by Amazon.com.
The most central and well-known of these services are Amazon EC2 (Elastic Compute Cloud )and Amazon S3 (Simple Storage Service).
 
Book:
Amazon Web Services is based on SOA standards, including HTTP, REST, and SOAP transfer protocols, open source and commercial operating systems, application servers, and browser-based access.
 
Topics:
 
  1. AWS Mobile Hub (beta)
  2. Amazon API Gateway
  3. Amazon Cognito
  4. AWS Device Farm
  5. Amazon Mobile Analytics
  6. AWS Mobile SDK for Android
  7. AWS Mobile SDK for iOS
  8. AWS Mobile SDK for Unity
  9. Amazon SNS
 
 
1). Amazon Mobile Hub
 
  • AWS Mobile Hub provides an Integrated Console that helps you Build, Test, And Monitor Your Mobile Apps.
  • Use the console to choose the features you want to include in your app. Mobile Hub then provisions and configures the necessary AWS services on your behalf and creates a working sample app for you.
  • Mobile Hub also creates a working sample app connected to your provisioned services. After you build your app, you can return to the Mobile Hub console to access services for testing and monitoring your app.
 
You can choose among the following features for iOS and Android apps:
 
User Sign-in: Enables you to choose how users sign in to your app. Depending on what you choose, users can authenticate themselves by using Facebook or your own identity system.They can also sign in as unauthenticated guest users. Mobile Hub configures Amazon Cognito Identity to handle user authentication.The generated sample app will include a sign-in screen and the code required to connect with login providers.
 
Push Notifications: Enables you to set up notifications through the Apple (APNS production or sandbox) and Google (GCM) push notification services. Mobile Hub configures Amazon SNS to send push  notifications. The sample app generated by Mobile Hub will include code to retrieve and update your push tokens and to register each device running your app for push notifications.
 
App Content Delivery: Enables you to set up cloud storage for application assets, such as resource files or audio and video files. You can make these files accessible to your app only, or you can choose to have them publicly available and cached in an AWS Global Content Delivery Network. Mobile Hub configures Amazon Amazon S3 to store content in a single location and Amazon CloudFront to store content in a global network of edge locations. The generated sample app will include code to enable local caching of downloaded files in your client app to avoid unnecessary downloads.
 
User Data Storage: Enables you to store user files such as photos or documents in the cloud and also allows you to save user profile data such as app settings or game state in key-value pairs. To save user files, Mobile Hub creates an Amazon S3 bucket for your app. Mobile Hub creates a folder in that bucket with access permissions set to enable all users of your app to view files stored there. Mobile Hub also creates a folder with access permissions set to limit user access to only those files stored on their behalf. Mobile Hub configures Amazon Cognito Sync to save user profile data in key-value pairs and synchronize that data across a user's authenticated devices. The generated sample app contains
a file explorer to access sample files in the public and private folders of the Amazon S3 bucket. The sample app also includes code that demonstrates how to sync user settings.
 
App Analytics: Enables you to add user engagement analytics to your app. Mobile Hub uses Amazon Mobile Analytics to configure event collection. The generated sample app contains code that initializes Mobile Analytics to record standard and custom events.You can view a dashboard that shows usage metrics for your app by choosing Analytics in the Mobile Hub navigation bar for your project.
 
Cloud Logic: Enables you to build back-end services that you can call from your mobile app.You can use this feature to process business logic in the cloud.You can share the same code for your Android and iOS apps, and you can also change code on the fly. This feature is powered by AWS Lambda, which allows you to write code without worrying about managing frameworks and scaling back-end infrastructure. You can write your functions in JavaScript, Java, or Python. The generated sample app includes code to invoke your functions directly through the AWS Lambda APIs using the AWS SDK.
 
 
2). Amazon API Gateway
 
  • API Gateway helps developers deliver Robust, Secure, and Scalable Mobile and Web Application Back Ends.
  • API Gateway allows developers to Securely Connect Mobile & Web Applications To:
  1. Business Logic hosted on AWS Lambda,
  2. APIs hosted on Amazon EC2, or
  3. Other publicly addressable web services hosted inside or outside of AWS.
 
  • With API Gateway, developers can Create and Operate APIs for their back-end services without developing and maintaining infrastructure to handle authorization and access control, traffic management, monitoring and analytics, version management, and software development kit (SDK) generation.
 
  • API Gateway is designed for web and mobile developers who are looking to provide secure, reliable access to back-end APIs for access from mobile apps, web apps, and server apps that are built internally or by third-party ecosystem partners. The business logic behind the APIs can either be provided by a publicly accessible endpoint API Gateway proxies call to, or it can be entirely run as a Lambda function.
 
  • You use API Gateway to create REST APIs that your mobile and web applications can use to call publicly available HTTP endpoints, Lambda functions, or other AWS services.
 
 
3). Amazon Cognito
 
 
  • Amazon Cognito makes it easy to Save User Data, App Preferences, and Game State in the AWS cloud.
  • Amazon Cognito is a service that makes it easy to Save Mobile User Data, such as app preferences or game state, in the AWS Cloud without writing any backend code or managing any infrastructure.
  • Cognito offers mobile Identity Management and Data Synchronization Across Devices.
  • You can save data locally on users’ devices allowing your applications to work even when the devices are offline.
  • With Amazon Cognito, you can focus on creating great app experiences instead of having to worry about Building And Managing A Backend Solution To Handle User Authentication, Network State, Storage, And Sync.
 
 
4). AWS Device Farm
 
  • Device Farm is an App Testing Service that enables you to test your Android, iOS, and Web apps on Real, Physical phones and tablets that are hosted by AWS.
  • A test report containing high-level results, low-level logs, pixel-to-pixel screenshots, and performance data is updated as tests are completed.
  • Device Farm allows you to upload your own tests or use built-in, script-free compatibility tests. Because testing is automatically performed in parallel, tests on multiple devices begin in minutes.
  • Device Farm supports native and hybrid Android, iOS, and Fire OS apps, including those created with PhoneGap, Titanium, Xamarin, Unity, and other frameworks.
 
  • Device Farm currently provides support for the following Test Types:
  • For iOS:
  1. Appium Java JUnit
  2. Appium Java TestNG
  3. Appium Python
  4. Calabash
  5. UI Automation
  6. XCTest (including KIF)
 
  • For Android:
  1. Appium Java JUnit
  2. Appium Java TestNG
  3. Appium Python
  4. Calabash
  5. Instrumentation (JUnit, Espresso, Robotium, or any instrumentation-based tests)
  6. UI Automator
  7. Explorer
 
  • For Web Apps:
  1. Appium Java JUnit
  2. Appium Java TestNG
  3. Appium Python
 
 
5). Amazon Mobile Analytics
 
  • Amazon Mobile Analytics is a service for Collecting, Visualizing, And Understanding App Usage Data at scale.
  • The service is built to scale with your business, allowing you to collect and process billions of events per day from many millions of users.
  • Simply add the AWS Mobile SDK in your iOS and Android/Fire OS apps, or use the Amazon Mobile Analytics REST API, and start accessing your Amazon Mobile Analytics Reports to learn about how your app is being used.
 
 
The following reports on KPI are provided in the Mobile Analytics console:
  • Daily Active Users (DAU), Monthly Active Users (MAU), and New Users
  • Sticky Factor (DAU divided by MAU)
  • Session Count and Average Sessions per Daily Active User
  • Average Revenue Per Daily Active User (ARPDAU) and Average Revenue Per Paying Daily Active User (ARPPDAU)
  • Day 1, 3, and 7 Retention and Week 1, 2, and 3 Retention
  • Custom Events
 
 
In addition to these aggregated reports, you can also set up your data to be exported automatically to Amazon Redshift and Amazon S3 for further analysis.
 
These reports are provided through six reporting tabs in the console:
 
Overview – Track nine preselected reports in a simple-to-review dashboard to get a quick idea of engagement: MAU, DAU, New Users, Daily Sessions, Sticky Factor (DAU/MAU), 1-Day Retention, ARPDAU, Daily Paying Users, ARPPDAU.
Active Users – Track how many users engage with your app daily and monthly and monitor its stickiness to gauge engagement, appeal, and monetization.
Sessions – Track how often your app is used on a given day and how often each user opens your app during a day.
Retention – Track the rate at which customers come back to your app on a daily and weekly basis.
Revenue – Track in-app revenue trends to identify areas for monetization improvement.
Custom events – Track custom, defined user actions specific to your app.
 
 
6). AWS Mobile SDK for Android 
 
The AWS Mobile SDK for Android is an open-source software development kit, distributed under an Apache Open Source license.
 
The SDK for Android provides Libraries, Code Samples, And Documentation to help developers Build Connected Mobile Applications using AWS.
Supported AWS services currently include:
 
 
 
 
7). AWS Mobile SDK for iOS 
 
The SDK for iOS provides Libraries, Code Samples, And Documentation to help developers Build Connected Mobile Applications using AWS.
 
 
8). AWS Mobile SDK for Unity 
 
Unity is a popular cross-platform Game Development Environment.
It allows you to write your code once and build your game for many different devices including iPhone, iPad, and Android.
 
The AWS Mobile SDK for Unity contains a Set of .NET Classes that Enables Games Written With Unity to utilize AWS services.
The AWS Unity Plug-in also contains sample code that illustrates how to call AWS services from a Unity game. The AWS Mobile SDK for Unity is compatible with Unity version 4.0 and greater.
 
Supported services currently include.
 
 
 
 
 
9). Amazon Simple Notification Service (SNS)
 
  • Amazon SNS is a web service that enables applications, end-users, and devices to instantly Send And Receive Notifications from the cloud.
  • SNS is a web service that coordinates and manages the delivery or sending of messages to subscribing endpoints or clients.
 
  • In Amazon SNS, there are two types of clients—Publishers and Subscribers—also referred to as producers and consumers.
  • Publishers communicate asynchronously with subscribers by producing and sending a message to a topic, which is a logical access point and communication channel.
  • Subscribers (i.e., web servers, email addresses, Amazon SQS queues, AWS Lambda functions) consume or receive the message or notification over one of the supported protocols (i.e., Amazon SQS, HTTP/S, email, SMS, Lambda) when they are subscribed to the topic.
 
When using Amazon SNS, you (as the owner) create a Topic and control access to it by defining Policies that determine which publishers and subscribers can communicate with the topic.
A publisher sends messages to topics that they have created or to topics they have permission to publish to. Instead of including a specific destination address in each message, a publisher sends a message to the topic.
Amazon SNS matches the topic to a list of subscribers who have subscribed to that topic, and delivers the message to each of those subscribers.
Each topic has a unique name that identifies the Amazon SNS endpoint for publishers to post messages and subscribers to register for notifications.
Subscribers receive all messages published to the topics to which they subscribe, and all subscribers to a topic receive the same messages.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

No comments:

Post a Comment