SlideShare una empresa de Scribd logo
1 de 59
Descargar para leer sin conexión
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 = bob@gmail.com, JoinDate = 2011-11-15
Email = fred@yahoo.com, 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!
matthew@amazon.com

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Data Warehousing in the Era of Big Data: Intro to Amazon Redshift
Data Warehousing in the Era of Big Data: Intro to Amazon RedshiftData Warehousing in the Era of Big Data: Intro to Amazon Redshift
Data Warehousing in the Era of Big Data: Intro to Amazon Redshift
 
Big Data Architectural Patterns and Best Practices on AWS
Big Data Architectural Patterns and Best Practices on AWSBig Data Architectural Patterns and Best Practices on AWS
Big Data Architectural Patterns and Best Practices on AWS
 
Workshop: Building a streaming data platform on AWS
Workshop: Building a streaming data platform on AWSWorkshop: Building a streaming data platform on AWS
Workshop: Building a streaming data platform on AWS
 
Deep Dive on Log Analytics with Elasticsearch Service
Deep Dive on Log Analytics with Elasticsearch ServiceDeep Dive on Log Analytics with Elasticsearch Service
Deep Dive on Log Analytics with Elasticsearch Service
 
FSI201 FINRA’s Managed Data Lake – Next Gen Analytics in the Cloud
FSI201 FINRA’s Managed Data Lake – Next Gen Analytics in the CloudFSI201 FINRA’s Managed Data Lake – Next Gen Analytics in the Cloud
FSI201 FINRA’s Managed Data Lake – Next Gen Analytics in the Cloud
 
Best Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWSBest Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWS
 
Real-Time Streaming Data Solution on AWS with Beeswax
Real-Time Streaming Data Solution on AWS with BeeswaxReal-Time Streaming Data Solution on AWS with Beeswax
Real-Time Streaming Data Solution on AWS with Beeswax
 
Getting Started with Amazon Redshift
Getting Started with Amazon RedshiftGetting Started with Amazon Redshift
Getting Started with Amazon Redshift
 
Introducing Amazon EMR Release 5.0 - August 2016 Monthly Webinar Series
Introducing Amazon EMR Release 5.0 - August 2016 Monthly Webinar SeriesIntroducing Amazon EMR Release 5.0 - August 2016 Monthly Webinar Series
Introducing Amazon EMR Release 5.0 - August 2016 Monthly Webinar Series
 
Interactive Analytics on AWS - AWS Summit Tel Aviv 2017
Interactive Analytics on AWS - AWS Summit Tel Aviv 2017Interactive Analytics on AWS - AWS Summit Tel Aviv 2017
Interactive Analytics on AWS - AWS Summit Tel Aviv 2017
 
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...
 
Getting Strated with Amazon Dynamo DB (Jim Scharf) - AWS DB Day
Getting Strated with Amazon Dynamo DB (Jim Scharf) - AWS DB DayGetting Strated with Amazon Dynamo DB (Jim Scharf) - AWS DB Day
Getting Strated with Amazon Dynamo DB (Jim Scharf) - AWS DB Day
 
Migrating Netflix from Datacenter Oracle to Global Cassandra
Migrating Netflix from Datacenter Oracle to Global CassandraMigrating Netflix from Datacenter Oracle to Global Cassandra
Migrating Netflix from Datacenter Oracle to Global Cassandra
 
Serverless Streaming Data Processing using Amazon Kinesis Analytics
Serverless Streaming Data Processing using Amazon Kinesis AnalyticsServerless Streaming Data Processing using Amazon Kinesis Analytics
Serverless Streaming Data Processing using Amazon Kinesis Analytics
 
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMR
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMRSpark and the Hadoop Ecosystem: Best Practices for Amazon EMR
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMR
 
Getting Started with Amazon DynamoDB
Getting Started with Amazon DynamoDBGetting Started with Amazon DynamoDB
Getting Started with Amazon DynamoDB
 
Amazon Elastic File System (Amazon EFS)
Amazon Elastic File System (Amazon EFS)Amazon Elastic File System (Amazon EFS)
Amazon Elastic File System (Amazon EFS)
 
Streaming data analytics (Kinesis, EMR/Spark) - Pop-up Loft Tel Aviv
Streaming data analytics (Kinesis, EMR/Spark) - Pop-up Loft Tel Aviv Streaming data analytics (Kinesis, EMR/Spark) - Pop-up Loft Tel Aviv
Streaming data analytics (Kinesis, EMR/Spark) - Pop-up Loft Tel Aviv
 
Log Analytics with Amazon Elasticsearch Service & Kibana
Log Analytics with Amazon Elasticsearch Service & KibanaLog Analytics with Amazon Elasticsearch Service & Kibana
Log Analytics with Amazon Elasticsearch Service & Kibana
 
Co 4, session 2, aws analytics services
Co 4, session 2, aws analytics servicesCo 4, session 2, aws analytics services
Co 4, session 2, aws analytics services
 

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

Apache Hadoop India Summit 2011 talk "Making Hadoop Enterprise Ready with Am...
Apache Hadoop India Summit 2011 talk  "Making Hadoop Enterprise Ready with Am...Apache Hadoop India Summit 2011 talk  "Making Hadoop Enterprise Ready with Am...
Apache Hadoop India Summit 2011 talk "Making Hadoop Enterprise Ready with Am...
Yahoo Developer Network
 

Similar a AWS Webcast - Build Mobile Apps with a Secure, Scalable Back End on DynamoDB (20)

2017 AWS DB Day | Amazon DynamoDB 서비스, 개요 및 신규 기능 소개
2017 AWS DB Day | Amazon DynamoDB 서비스, 개요 및 신규 기능 소개2017 AWS DB Day | Amazon DynamoDB 서비스, 개요 및 신규 기능 소개
2017 AWS DB Day | Amazon DynamoDB 서비스, 개요 및 신규 기능 소개
 
Achieve big data analytic platform with lambda architecture on cloud
Achieve big data analytic platform with lambda architecture on cloudAchieve big data analytic platform with lambda architecture on cloud
Achieve big data analytic platform with lambda architecture on cloud
 
Data Streaming with Apache Kafka & MongoDB
Data Streaming with Apache Kafka & MongoDBData Streaming with Apache Kafka & MongoDB
Data Streaming with Apache Kafka & MongoDB
 
Android Deep Dive
Android Deep DiveAndroid Deep Dive
Android Deep Dive
 
AWS Webcast - Build high-scale applications with Amazon DynamoDB
AWS Webcast - Build high-scale applications with Amazon DynamoDBAWS Webcast - Build high-scale applications with Amazon DynamoDB
AWS Webcast - Build high-scale applications with Amazon DynamoDB
 
Serverless by Example: Building a Real-Time Chat System
Serverless by Example: Building a Real-Time Chat SystemServerless by Example: Building a Real-Time Chat System
Serverless by Example: Building a Real-Time Chat System
 
Services Over Servers - Innovate VA 2016
Services Over Servers - Innovate VA 2016Services Over Servers - Innovate VA 2016
Services Over Servers - Innovate VA 2016
 
Serverless Web Apps using API Gateway, Lambda and DynamoDB
Serverless Web Apps using API Gateway, Lambda and DynamoDBServerless Web Apps using API Gateway, Lambda and DynamoDB
Serverless Web Apps using API Gateway, Lambda and DynamoDB
 
Building IoT Apps in the Cloud Webinar
Building IoT Apps in the Cloud WebinarBuilding IoT Apps in the Cloud Webinar
Building IoT Apps in the Cloud Webinar
 
Transformation Track AWS Cloud Experience Argentina - Bases de Datos en AWS
Transformation Track AWS Cloud Experience Argentina - Bases de Datos en AWSTransformation Track AWS Cloud Experience Argentina - Bases de Datos en AWS
Transformation Track AWS Cloud Experience Argentina - Bases de Datos en AWS
 
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
 
Couchbase Mobile on Android
Couchbase Mobile on AndroidCouchbase Mobile on Android
Couchbase Mobile on Android
 
Apache Hadoop India Summit 2011 talk "Making Hadoop Enterprise Ready with Am...
Apache Hadoop India Summit 2011 talk  "Making Hadoop Enterprise Ready with Am...Apache Hadoop India Summit 2011 talk  "Making Hadoop Enterprise Ready with Am...
Apache Hadoop India Summit 2011 talk "Making Hadoop Enterprise Ready with Am...
 
Big Data Goes Airborne. Propelling Your Big Data Initiative with Ironcluster ...
Big Data Goes Airborne. Propelling Your Big Data Initiative with Ironcluster ...Big Data Goes Airborne. Propelling Your Big Data Initiative with Ironcluster ...
Big Data Goes Airborne. Propelling Your Big Data Initiative with Ironcluster ...
 
Cloud Roundtable | Amazon Web Services: Key = Iteration
Cloud Roundtable | Amazon Web Services: Key = IterationCloud Roundtable | Amazon Web Services: Key = Iteration
Cloud Roundtable | Amazon Web Services: Key = Iteration
 
(BDT313) Amazon DynamoDB For Big Data
(BDT313) Amazon DynamoDB For Big Data(BDT313) Amazon DynamoDB For Big Data
(BDT313) Amazon DynamoDB For Big Data
 
Microsoft Azure
Microsoft AzureMicrosoft Azure
Microsoft Azure
 
AWS 201 - A Walk through the AWS Cloud: App Hosting on AWS - Games, Apps and ...
AWS 201 - A Walk through the AWS Cloud: App Hosting on AWS - Games, Apps and ...AWS 201 - A Walk through the AWS Cloud: App Hosting on AWS - Games, Apps and ...
AWS 201 - A Walk through the AWS Cloud: App Hosting on AWS - Games, Apps and ...
 
Automate Your Big Data Workflows (SVC201) | AWS re:Invent 2013
Automate Your Big Data Workflows (SVC201) | AWS re:Invent 2013Automate Your Big Data Workflows (SVC201) | AWS re:Invent 2013
Automate Your Big Data Workflows (SVC201) | AWS re:Invent 2013
 
PPT Companion to Android
PPT Companion to AndroidPPT Companion to Android
PPT Companion to Android
 

Más de Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Más de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 

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

  • 1. Build Mobile Apps with a Secure, Scalable Back End on DynamoDB Matt Wood, General Manager, Data Science October 10, 2013
  • 3. Three things 1. An introduction to DynamoDB 2. Using DynamoDB with a mobile application 3. Next steps, free stuff and getting started
  • 4. Act One Under the covers of DynamoDB.
  • 5. AWS Database Services Amazon RDS Amazon ElastiCache Deployment & Administration Amazon DynamoDB Application Services Compute Storage Database Networking AWS Global Infrastructure Amazon Redshift
  • 6. Amazon’s Path to DynamoDB DynamoDB RDBMS
  • 10. for DEVS OPS USERS Fast Application Development Time to Build New Applications • • • • Flexible data models Simple API High-scale queries Laptop development
  • 11. 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”
  • 13. Tables, Items, Attributes • A Table is a collection of Items • An Item is a collection of Attributes • Attributes have a key and a value
  • 14. 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
  • 15. 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 = bob@gmail.com, JoinDate = 2011-11-15 Email = fred@yahoo.com, 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
  • 16. 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
  • 17. 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
  • 18. 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
  • 19. 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
  • 20. Latest News… DynamoDB Local • Disconnected development • Full API support • Download from http://aws.amazon.com/dynamodb/resources/#testing
  • 22. 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.”
  • 23. 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
  • 24. 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
  • 26. WRITES Replicated continuously to 3 AZ’s Persisted to disk (custom SSD) READS Strongly or eventually consistent No latency trade-off
  • 27. server-side latency across all APIs Average < 3ms TP90 < 4.5ms
  • 28. Act Two Using DynamoDB with a mobile application.
  • 29. Location Aware Apps Easy geospatial queries on DynamoDB, with the Geospatial library. Small domain specific language for location aware apps.
  • 30. 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
  • 31. Set Up The Library Use a table called geo-table:
  • 32. [GeoPoint] data type • Create points of Interest • Store a latitude and a longitude • Write points to DynamoDB using [putPoint] method
  • 33. [queryRectangle] method • Locate all of the items that fall within a pair of GeoPoints that define a rectangle as projected onto a sphere
  • 34. [queryRadius] method Locate all of the items that are within a given radius
  • 35. 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.
  • 36. 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
  • 37. Push Notifications High scale, personalized notifications for your apps.
  • 38. 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
  • 39. Your cloud application directs mobile push notifications to a specific app on a specific device Cloud App Mobile Apps
  • 40. Notifications are delivered via platform-specific push services, which keep connections with their devices. Platform Service Cloud App Mobile Apps
  • 41. Developers manage tokens for each device, and must proactively swap or disable them based on feedback. Token Feedback Platform Service Token Registration
  • 42. Each platform-specific push service works differently. Apple APNS • Different APIs • Different Features Google GCM Amazon ADM • Different Feedback
  • 43. Push notifications get even more complex as you scale to support millions of devices. Cloud App Platform Services Mobile Apps
  • 44. Developers use intermediaries to abstract platform-specific APIs and manage tokens for millions of apps. Push Intermediary Mobile Apps
  • 45. 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
  • 46. Amazon SNS Mobile Push is a managed, scalable, crossplatform push intermediary service. Apple Devices Google Devices Amazon SNS Mobile Push Amazon Kindle Fire Devices
  • 47. 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
  • 48. 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
  • 49. 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
  • 50. 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
  • 51. 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
  • 52. Act Three Next steps, free stuff and getting started
  • 53. 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
  • 55. Free tier Free DynamoDB tables! 100Mb of storage 10 units of read capacity 5 units of write capacity aws.amazon.com/free
  • 56. 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
  • 57. 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
  • 58. Three things 1. An introduction to DynamoDB 2. Using DynamoDB with a mobile application 3. Next steps, free stuff and getting started