• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
AWS Webcast - Build Mobile Apps with a Secure, Scalable Back End on DynamoDB
 

AWS Webcast - Build Mobile Apps with a Secure, Scalable Back End on DynamoDB

on

  • 1,002 views

Mobile apps and connected devices require a secure and scalable back end to deliver an excellent user experience. DynamoDB makes it easy to securely store and serve data, with remarkably low latency. ...

Mobile apps and connected devices require a secure and scalable back end to deliver an excellent user experience. DynamoDB makes it easy to securely store and serve data, with remarkably low latency. Join us to learn how to easily build scalable mobile apps with a powerful back end.

Statistics

Views

Total Views
1,002
Views on SlideShare
1,002
Embed Views
0

Actions

Likes
1
Downloads
13
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    AWS Webcast - Build Mobile Apps with a Secure, Scalable Back End on DynamoDB AWS Webcast - Build Mobile Apps with a Secure, Scalable Back End on DynamoDB Presentation Transcript

    • Build Mobile Apps with a Secure, Scalable Back End on DynamoDB Matt Wood, General Manager, Data Science October 10, 2013
    • Thank you!
    • Three things 1. An introduction to DynamoDB 2. Using DynamoDB with a mobile application 3. Next steps, free stuff and getting started
    • Act One Under the covers of DynamoDB.
    • AWS Database Services Amazon RDS Amazon ElastiCache Deployment & Administration Amazon DynamoDB Application Services Compute Storage Database Networking AWS Global Infrastructure Amazon Redshift
    • Amazon’s Path to DynamoDB DynamoDB RDBMS
    • = Key/value store
    • Predictable Performance = Massively Scalable Fully Managed Low Cost
    • for DEVS OPS USERS
    • for DEVS OPS USERS Fast Application Development Time to Build New Applications • • • • Flexible data models Simple API High-scale queries Laptop development
    • Fast Application Development Super Bowl promotion Millions of interactions over a relatively short period of time Built the app in 3 days, from design to production-ready Weatherbug mobile app Lightning detection & alerting for 40M users/month Developed and tested in weeks, at “1/20th of the cost of the traditional DB approach”
    • Fast Application Development 1 2 3 Relationship Modeling Simple API High Scale Query Patterns
    • Tables, Items, Attributes • A Table is a collection of Items • An Item is a collection of Attributes • Attributes have a key and a value
    • Primary keys • • • • Hash key Composite key Indexed by primary key, and local secondary indices Data is auto-partitioned based primarily on the hash key DynamoDB Table Client Partitions 1 .. N
    • Modeling 1:1 Relationships • Use a table with a hash key • Examples: – Users • Hash key = UserID – Games • Hash key = GameId Users table Hash Key UserId = bob UserId = fred Attributes Email = [email protected], JoinDate = 2011-11-15 Email = [email protected], JoinDate = 2011-1201, Sex = M Games table Hash Key GameId = Game1 GameId = Game2 GameId = Game3 Attributes LaunchDate = 2011-10-15, Version = 2, LaunchDate = 2010-05-12, Version = 3, LaunchDate = 2012-01-20, version = 1
    • Modeling 1:M Relationships • Use a table with hash and range key • Example: – One (1) User can play many (N) Games • UserGames table multi-tenancy tenant-id = hash – Hash key = UserId – Range key = GameId UserGames table Hash Key Range Key Attributes UserId = bob GameId = Game1 HighScore=10500, ScoreDate=2011-10-20, LastPlayed=2013-02-11 UserId = fred GameId = Game2 HIghScore = 12000, ScoreDate = 2012-01-10, LastPlayed=2013-05-19 UserId = bob GameId = Game3 HighScore = 20000, ScoreDate = 2012-02-12, LastPlayed=2012-11-07
    • Simple API CreateTable UpdateTable manage tables PutItem GetItem DeleteTable UpdateItem read and write items DescribeTable ListTables query specific items OR scan the full table DeleteItem Query BatchGetItem Scan BatchWriteItem bulk get or update
    • Query Patterns • • • • • Available for hash+range primary key tables Retrieve all items by hash key Range key conditions: ==, <, >, >=, <=, begins with, between Sorted results. Counts. Top and bottom n values. Paged responses
    • Local Secondary Indexes • Designed for high scale multi-tenant applications • Index local to the hash key (= partition) • Up to 5 indexes with no performance degradation UserGamesIdx index Hash Key UserId = bob UserId = fred UserId = bob Range Key LastPlayed=2013-02-11 LastPlayed=2013-05-19 LastPlayed=2012-11-07 Projected Attributes GameId = Game1 GameId = Game2 GameId = Game3 UserGames table Hash Key Range Key Attributes UserId = bob GameId = Game1 HighScore=10500, ScoreDate=2011-10-20, LastPlayed=2013-02-11 UserId = fred GameId = Game2 HIghScore = 12000, ScoreDate = 2012-01-10, LastPlayed=2013-05-19 UserId = bob GameId = Game3 HighScore = 20000, ScoreDate = 2012-02-12, LastPlayed=2012-11-07
    • Latest News… DynamoDB Local • Disconnected development • Full API support • Download from http://aws.amazon.com/dynamodb/resources/#testing
    • for DEVS OPS USERS Admin-Free (at any scale)
    • Admin-Free (at any scale) “Even though we have years of experience with large, complex NoSQL architectures, we are happy to be finally out of the business of managing it ourselves.” “Our previous NoSQL database required almost an full time administrator to run. Now AWS takes care of it.”
    • Admin-Free (at any scale) Provision / Configure Servers and Storage Monitor and Handle Hardware Failures Repartition Data and Balance Clusters Update Hardware and Software Manage CrossAvailability Zone Replication
    • Provisioned Throughput request-based capacity provisioning model Throughput is declared and updated via the API or the console CreateTable (foo, reads/sec = 100, writes/sec = 150) UpdateTable (foo, reads/sec=10000, writes/sec=4500) DynamoDB handles the rest Capacity is reserved and available when needed Scaling-up triggers repartitioning and reallocation No impact to performance or availability
    • for DEVS OPS USERS Durable Low Latency
    • WRITES Replicated continuously to 3 AZ’s Persisted to disk (custom SSD) READS Strongly or eventually consistent No latency trade-off
    • server-side latency across all APIs Average < 3ms TP90 < 4.5ms
    • Act Two Using DynamoDB with a mobile application.
    • Location Aware Apps Easy geospatial queries on DynamoDB, with the Geospatial library. Small domain specific language for location aware apps.
    • Geo Library for DynamoDB • Available as a Java JAR file • Create geospatial data items in DynamoDB – latitude and a longitude – attribute-value pairs maintained by the application • The library takes care of creating and maintaining the hash keys, range keys, and indexes that allow for fast and efficient execution of location-based queries
    • Set Up The Library Use a table called geo-table:
    • [GeoPoint] data type • Create points of Interest • Store a latitude and a longitude • Write points to DynamoDB using [putPoint] method
    • [queryRectangle] method • Locate all of the items that fall within a pair of GeoPoints that define a rectangle as projected onto a sphere
    • [queryRadius] method Locate all of the items that are within a given radius
    • Behind The Scenes? • • • • • • • Creates a virtual grid that overlays the planet Each grid cell has an address that is derived from the location of the cell. When GeoPoints are inserted into DynamoDB, a geohash is computed and used to map the data record to the correct grid cell. The library stores each item's geohash as an item attribute. The hash preserves the proximity of nearby points and makes for efficient retrieval; it is stored as a local secondary index on the items. When you issue a radial or rectangular query via the library, a list of candidate cells is constructed and used to form the DynamoDB query. The library post-processes the resulting items and returns those which are within the specified bounding box or radius.
    • iOS Sample Code Find Yourself example application. Documentation, library and sample source code, and more are available on GitHub: https://github.com/awslabs/dynamodb-geo
    • Push Notifications High scale, personalized notifications for your apps.
    • Mobile push notifications engage customers when your app is not currently active. • Users opt-in to receive them • Delivered to a specific app on a specific device • Short messages: read, ignore, or acknowledge to launch the app
    • Your cloud application directs mobile push notifications to a specific app on a specific device Cloud App Mobile Apps
    • Notifications are delivered via platform-specific push services, which keep connections with their devices. Platform Service Cloud App Mobile Apps
    • Developers manage tokens for each device, and must proactively swap or disable them based on feedback. Token Feedback Platform Service Token Registration
    • Each platform-specific push service works differently. Apple APNS • Different APIs • Different Features Google GCM Amazon ADM • Different Feedback
    • Push notifications get even more complex as you scale to support millions of devices. Cloud App Platform Services Mobile Apps
    • Developers use intermediaries to abstract platform-specific APIs and manage tokens for millions of apps. Push Intermediary Mobile Apps
    • Developers use intermediaries to abstract platform-specific APIs and manage tokens for millions of apps.  Abstraction so your app can engage users on any platform  Operational complexity  Manage tokens to ensure messages are delivered reliably  Cost – even though the platform services themselves are free  Scalability takes work
    • Amazon SNS Mobile Push is a managed, scalable, crossplatform push intermediary service. Apple Devices Google Devices Amazon SNS Mobile Push Amazon Kindle Fire Devices
    • Amazon SNS Mobile Push is a managed, scalable, crossplatform push intermediary service. Apple Devices Google Devices DynamoDB for device ARNs Amazon SNS Mobile Push Amazon Kindle Fire Devices
    • You can send a distinct payload for each platform, or publish one common message for all platforms. Specify Platform-Specific Payloads Publish Once, Deliver Anywhere Publish Apple Publish Google Kindle Fire Kindle Fire Apple Google Kindle Fire Kindle Fire
    • You can publish unique messages to individual devices, or broadcast identical messages to many devices at once. Direct Publishing Broadcast with SNS Topics Publish Publish Publish Publish
    • SNS consumes feedback from each platform and manages swapping and disabling tokens on your behalf. Token Feedback Cloud App + DynamoDB Amazon SNS Mobile Push Token Registration • Write to one stable endpoint per device • You can access the feedback, but you don’t have to do so in order to use SNS
    • SNS offers easy scalability, so you can just start sending more messages as your app achieves scale. • Go from a few messages to hundreds of millions • Go from a few devices to hundreds of millions ...without provisioning, configuring or managing ...without sacrificing reliable, durable delivery
    • Act Three Next steps, free stuff and getting started
    • Extensive set of SDK and IDE support enables you to build applications tailored to your language or platform. SDKs for your preferred platform and language… Android iOS Java nodeJS .NET …integrated into your preferred IDE Eclipse Visual Studio CLI Powershell PHP Python Ruby
    • Free tier aws.amazon.com/free
    • Free tier Free DynamoDB tables! 100Mb of storage 10 units of read capacity 5 units of write capacity aws.amazon.com/free
    • SNS Mobile Push 1 Million Free per Month • 1 million publishes + 1 million mobile push notifications $1.00 per Million Thereafter • $0.50 per million publishes + $0.50 per million mobile push deliveries • When you broadcast with SNS Topics, your effective price can be lower
    • The console makes it easy to get started with SNS Mobile Push, and easy to migrate existing apps. • One simple workflow to create apps on any platform • Upload or paste in exactly the credentials you receive from each platform • Easily migrate an existing application by batchuploading existing tokens
    • Three things 1. An introduction to DynamoDB 2. Using DynamoDB with a mobile application 3. Next steps, free stuff and getting started
    • Thank you! [email protected]