This webinar discusses Amazon DynamoDB, a NoSQL, highly scalable, SSD-based, zero administration database service in the AWS Cloud. We explain how DynamoDB works and also walk through some best practices and tips to get the most out of the service.
27. AGENDA
Getting to know DynamoDB
Gu ided tour of service highlights
Provisioned throughput
Data model
DynamoDB in practice
Analytics with Elastic MapReduce
28. H I G H L I G H T S
Low latency Flexible
Large scale Durable storage
Seamless scaling Zero admin
Predictable performance
29. H I G H L I G H T S
SSD backed
Low latency
Single digit millisecond
< 5 ms reads < 10 ms writes
30. H I G H L I G H T S
Massive scale
No table size limits. Unlimited storage.
31. H I G H L I G H T S
Seamless scale
Live repartitioning. Zero admin.
32. H I G H L I G H T S
Flexible data model
Key/attribute store for evolving models
33. H I G H L I G H T S
Predictable performance
Provisioned throughput
34. H I G H L I G H T S
Durable and available
Consistent, disk-only writes
47. [ title => “Disaster Recovery with AWS”,
date => “20120320”,
format => “webinar”,
presenter => “Jeff Barr” ]
Attributes
[ title => “Introduction to DynamoDB”,
date => “20120320” ]
48. [ title => “Disaster Recovery with AWS”,
date => “20120320”,
format => “webinar”,
presenter => “Jeff Barr” ]
Items
[ title => “Introduction to DynamoDB”,
date => “20120320” ]
49. [ title => “Disaster Recovery with AWS”,
date => “20120328”,
format => “webinar”,
presenter => “Jeff Barr” ]
Table
[ title => “Introduction to DynamoDB”,
date => “20120320” ]
69. Book table
Book metadata
Hash key
asin => 0980576830
70. Book table
Book metadata
asin => 0980576830
title => “Host Your Website on the Cloud”
pages => “364”
list-price => “£31.49”
71. Book table
Book metadata, page views
asin => 0980576830
title => “Host Your Website on the Cloud”
pages => “364”
list-price => “£31.49”
views => 145
72. Book table
Book metadata, page views, book tags
asin => 0980576830
title => “Host Your Website on the Cloud”
pages => “364”
list-price => “£31.49”
views => 145
tags => [“php”, “aws”]
75. Thread table
Conversation thread
Hash key
Range key asin => 0980576830
subject => “Very informative”
content => “This is a first class book...”
name => “Matt Wood”
76. Reply table
Conversation replies
Hash key
id => 0980576830:very-informative
Range key datetime => “20120320”
77. Reply table
Conversation replies
Hash key
id => 0980576830:very-informative
Range key datetime => “20120320”
reply => “I agree!”
name => “Werner Vogels”
102. Tagging: many to many
Book
(asin, tags = [“php”, “aws”])
Query by key, retrieve tag collection
Add tags conditionally
No secondary indexes
Retrieve all books by tag
103. Tagging: many to many
Book
(asin, tags = [“php”, “aws”])
Tag
(tag, asin =
[“1449393683”, “0596515812”])
Query by book, retrieve tag collection
Query by tag, retrieve book collection
109. Considerations
Limited index and query model
Throughput is provisioned in 1K operations
Maximum 64K item size
Backup and restore via Elastic MapReduce
120. Export to S3
CREATE EXTERNAL TABLE orders_s3_new_export ( order_id
string, customer_id string, order_date int, total
double )
PARTITIONED BY (year string, month string)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
LOCATION 's3://export_bucket';
INSERT OVERWRITE TABLE
orders_s3_new_export
PARTITION (year='2012', month='01')
SELECT * from orders_ddb_2012_01;
121. Live data in DynamoDB
SELECT customer_id, sum(total) spend, count(*)
order_count
FROM orders_ddb_2012_01
WHERE order_date >= unix_timestamp('2012-01-01', 'yyyy-
MM-dd')
AND order_date < unix_timestamp('2012-01-08', 'yyyy-MM-
dd')
GROUP BY customer_id
ORDER BY spend desc
LIMIT 5;
123. AGENDA
Getting to know DynamoDB
Gu ided tour of service highlights
Provisioned throughput
Data model
DynamoDB in practice
Analytics with Elastic MapReduce
Slides available shortly.