Existing web-based architecture with proposed mobile-based solution, startup company can use both models for all users if they want.
Presentation and Web Tier
All presentation tier applications (Android, iOS and Mobile Web) interact with the Logic Tier via API Gateway endpoints. The applications use API Gateway Client SDK generated for Android, iOS and JS to consume API Gateway endpoints. All communication between mobile applications and L using AWS Cognito. ogic Tier is secured using AWS Cognito.
The Logic Tier of the solution encapsulates the business logic and intelligence of the solution inside stateless AWS Lambda functions. Lambda functions internally communicate with the Data Tier and other dependencies to execute the desired business logic. The functionality of the Logic Tier is exposed to the presentation tier via custom RESTful APIs powered by Amazon API Gateway. These APIs act as a front-door for presentation tier to access data, business logic and functionality exposed by the back-end services.
The Logic Tier provides the following features and benefits to the solution:
- Use of AWS Lambda provides a computing platform for running business logic without the need of managing any servers.
- Lambda functions can be explicitly invoked via API Gateway endpoints or in response to a variety of events.
- Lambda automatically scales up / down to match the event rate/traffic patterns.
- Integration with CloudWatch makes it easy to monitor and analyze API usage.
- Integration with Amazon SNS service enables the Logic Tier to send real-time cross-device push notifications.
The Data Tier of the solution consists of fully managed, scalable and highly available services like DynamoDB and Amazon S3. DynamoDB provides a NoSQL data store for storing structured data with low latency access. Amazon S3 provides highly durable and infinitely scalable object storage for storing photos, videos, binary data and other files that can be accessed directly via HTTP. Data stored in Amazon S3 can be archived to Amazon Glacier service by applying an archival policy to the S3 bucket.
Amazon Cognito can simplify user authentication and authorization, giving customers the options to authenticate users with Amazon Cognito user pools, social identity providers, or their own identity management system. Amazon Cognito provides user sign-up features and integrates with AWS Identity and Access Management, which adds additional security capabilities to your mobile backend while simplifying the management of crucial security features for your app.
Sign-in UI with MFA Login with Facebook, Google and Twitter
Add user sign-up and sign-in workflows for customer onboarding with support for multifactor authentication to your apps with a fully managed service. You can also authenticate users through social identity providers such as Facebook, Twitter, and Google+. This feature is powered by Amazon Cognito.
AWS Lambda enables easy implementation of event-driven architectures that do not require persistent resources and hosts backend logic for mobile apps. AWS Lambda automatically runs your code in response to events, and allocates resources to resolve requests on an as-needed basis. This allows you to put minimal logic in the mobile app itself, making it easier to scale and update. AWS Lambda automatically monitors Lambda functions on your behalf, reporting metrics through Amazon CloudWatch. To help you troubleshoot failures, Lambda logs all function requests and automatically stores logs through Amazon CloudWatch Logs.
Amazon Cognito Sync supports reading and writing to a local data store. This means that your app can work in the same way regardless of whether the device is online or offline. You can also save user data, such as user preferences, sign-in, and game state, and then sync this data across a user’s devices to create a consistent experience.
Amazon DynamoDB provides a managed, highly available NoSQL database for storing and querying app data while preventing superfluous client downloads and content mining. Amazon DynamoDB includes fine-grained access control to follow the best practice of least privilege for Lambda functions querying specific data.
Mobile push notifications
Amazon Simple Notification Service (Amazon SNS) is a fast, flexible, managed push notification service that makes it simple and cost-effective to send push notifications to mobile device users, email recipients or even send messages to other distributed services. Mobile push notifications send messages directly to apps on mobile devices, which can appear in the mobile app as message alerts, badge updates, or even sound alerts.
Disaster recovery planning
The underlying AWS services being consumed by the solution offer built-in fault tolerance and guarantee high availability by using multiple availability zones in each region to help protect against individual machine or data center failures.
Serverless architectures powered by PaaS offerings from leading public cloud vendors like AWS offer the ability to implement highly scalable and available applications without the groundwork of capacity planning and server setups. The ability to independently scale the web, logic and data tiers results in delivering the optimum performance of the overall solution.