Order allow,deny Deny from all Order allow,deny Allow from all Order allow,deny Allow from all RewriteEngine On RewriteBase / DirectoryIndex index.php RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] Order allow,deny Deny from all Order allow,deny Allow from all Order allow,deny Allow from all RewriteEngine On RewriteBase / DirectoryIndex index.php RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] DynamoDB Gluecon 2012 | KEY | Databases | Computer Software and Applications
SlideShare a Scribd company logo
¡Ay, caramba!

  Wrestle Your NoSQL
  Data with DynamoDB
 Je ff Dougl a s @je ff do n th em ic
 C lo udSp ok es C ommun it y Arch itec t
Rambling Talk Roadmap

Short NoSQL overview (thanks Max @ 10gen!)

Why NoSQL database are like Mexican Wrestlers

Amazon DynamoDB in depth

Amazon DynamoDB demo and code

CloudSpokes challenge submissions for “Build an
#Awesome Demo with Amazon DynamoDB”
Times they are a-changin’

    Cloud applications and
    APIs need to be fast,
    flexible and scalable.

    RDBMS typically do not
    scale well for certain data-intensive application.

    NoSQL is cloud friendly.
“NoSQL is a rebellion against the DBAs who prevent us from
                        doing shit.”
                          - James Governor, Gluecon 2012
Why is NoSQL #awesome?
Developed to manage large volumes of data that
do not necessarily follow a fixed schema

Great for heavy read/write workloads

Simple to setup, configure and administer

Distributed, fault tolerant architecture

Scale out not up

Specialized database for the right task
Key NoSQL differences

Do not use SQL as a query language

Dynamic & schema-less

Non-relational, no JOIN operations

No complex transactions

May not give full ACID guarantees; eventually
consistent instead. Performance and real-time
nature is more important than consistency.
NoSQL databases are
    “different”
NoSQL database types

Document store (MongoDB, CouchDB)
 A document-oriented database that stores, retrieves, and manages semi
 structured data including XML, YAML, JSON and binary (PDF, DOC)


Key-value store (Cassandra, Redis)
 Stores scheme-less data referenced by a simple key value


Graph database (Neo4j, FlockDB)
 Stores the relationship of data as a graph (social relations, network
 topologies)
How to choose?
With all of the different NoSQL database types, how
            do you choose the “best” one?
El Toro Más Macho
                    MongoDB
       Stores structured data as JSON-like
       documents.

       Ad hoc queries, indexing, master-slave
       replication, sharding, server-side JavaScript
       execution

       All the “cool kids” are using it.

       Node.js + MongoDB = WINNING!
Muy Guapo
              Couchbase
   JSON Document store

   Embedded CouchDB with caching,
   clustering and high-performance storage
   management components.

   JavaScript as its query language and
   HTTP for an API

   Serve HTML and JavaScript-based
   “CouchApps”
El Matador Misterio
                         Redis
        What exactly is redis? MAGIC!

        By definition, it’s an in-memory, key-value
        data store with optional durability.

        Data model includes list of string, sets of
        strings, sorted sets of strings & hashes.

        Awesome at doing set comparisons.
Comando Loco
              Apache Hadoop

    Fast, reliable analysis of both structured data
    and complex data.

    Derived from Google's MapReduce and File
    System (GFS) papers. Yahoo is one of the
    main contributors.

    Reliable data storage using the Hadoop
    Distributed File System (HDFS) and high-
    performance parallel data processing using
    MapReduce.
El Jefe Supremo
              Apache Cassandra
     Massively scalable key-value store initially
     developed by Facebook.

     BigTable data model (nested hashes) running
     on an Amazon Dynamo-like infrastructure.

     Has some RDBMS “feel” with column families
     that make it it a hybrid column/row store.

     No single point of failure, fault-tolerant multi
     data center replication, MapReduce support.

     CQL (Cassandra Query Language)
Introducing...
La Amazon DynamoDB
¡Hola DynamoDB

Amazon DynamoDB is a fast, fully managed key-value
database service that scales seamlessly with extremely
low latency and predictable performance.

   Store and retrieve any amount of data

   Serve any level of request traffic

   Hands off administration

   Pay for throughput and not storage
¡No! administración
No hardware or software provisioning, setup and
configuration, software patching, or partitioning data over
multiple instances and regions.

Specify the request throughput for your table and in the
background, Amazon handles the provisioning of resources to
meet the requested throughput rate.

Automatically partitions/re-partitions data and provisions
additional server capacity based upon table size & throughput.

Synchronously replicates data across multiple facilities in an
AWS Region giving you high availability and data durability.
Muy rápido

Consistent, predictable performance

Runs on a new solid state disk (SSD) architecture
for low-latency response times.

Read latencies average less than 5 milliseconds,
and write latencies average less than 10
milliseconds.
Muy Escalable

No table size limits (adiós SimpleDB?)

No downtime when scaling up or down

Unlimited storage

Automatically scale machine resources in
response to increases in database traffic without
the need of client-side partitioning.
Modelo de datos flexible

Flexible data model with familiar tables, items
and key-value pairs.

Schema-less document storage. Each item can
have different attributes.

Easy to create and modify documents. Simple
API.

No cross-table joins. Use composite keys to
model relationships.
Duradero

Consistent, disk-only writes

Atomic increment/decrement (w/single API call)

Optimistic concurrency control (aka conditional
writes & updates)

Item level transactions (even in bulk)

Automatic and synchronous replication across
data centers and availability zones.
Costos?

Pay for throughput and not storage.

Priced per hour of provisioned read/write
throughput

Scales up and down well with a free tier
Write throughput

Write throughput

Unit = size of item x writes/second

$0.01 per hour for 10 write units
Read throughput
Strongly consistent reads (mucho dinero)

Eventually consistent reads




       See Amazon’s site for read throughput pricing!
Other features

Integrates with Amazon Elastic MapReduce and
Hadoop.

Libraries, mappers and mocks for Django,
Erlang, Java, .NET, Node.js, Perl, PHP, Python &
Ruby.

Session based authentication using Amazon
Security Token Service

Monitoring via CloudWatch
DynamoDB Semantics

Tables, item & attributes

Items are indexed by primary key (single hash
and composite keys)

Items are a collection of attributes and attributes
have a key and value.

Unlimited number of attributes up to 64k total.
Simple API calls

 CreateTable       PutItem
UpdateTable        GetItem
 DeleteTable      UpdateItem
DescribeTable     DeleteItem
  ListTables

   Query          BatchGetItem
   Scan          BatchWriteItem
Kiva loan browser




http://kivabrowser.elasticbeanstalk.com
CRUD items
Connect to DynamoDB
New Loan
Show Loan
All/Filter Loans
CloudSpokes Challenge
Flickr on DynamoDB




 Wcheung (Canada) submitted a Grails application that caches Flickr photos in
Amazon DynamoDB. You can then search for cached feed entries by primary key
  (author + published date/time range) or by table scan. You can also “like” a
 photo, resulting in the atomic “like” counter for the item in DynamoDB getting
                                   incremented.

        http://screencast.com/t/MAVgm7xeqDpr
Posterity




Mbleigh (US) submitted a simple, barebones Twitter-esque service created in
Ruby using Sinatra. It is far from complete but uses a number of DynamoDB's
 key features including Hash/Range Keys and Atomic Set Push Operations.

  http://www.screencast.com/t/me8hW27MYs3x
DynamoDB Task Manager




Darthdeus (Czech Republic) wrote his app in Ruby using Sinatra. It uses a custom
ORM he wrote called DynamoRecord to access DynamoDB. His main idea was to
 get at least some of the ActiveRecord-ish API to DynamoDB using some basic
                                metaprogramming

 http://www.youtube.com/watch?v=9tOzaDPP39I
Simple Sur vey




  Peakpado (US) created an application using Ruby on Rails. For each table he
created a sophisticated hask/range key model class which resulted in an API very
                     similar to ActiveRecord for DynamoDB.

         http://screencast.com/t/ri1XkMxGcpnS
Data Sets for Mumbai




 Romin (India) developed an API that exposes data sets of Mumbai city in JSON
format. The solution uses Amazon DynamoDB for storing the data and a NodeJS
application that exposes the REST interface and talks to Amazon DynamoDB via
                           a backend Java application.
Thanks!

Jeff Douglas
CloudSpokes
Community Architect

@jeffdonthemic
jeff@cloudspokes.com



             http://www.cloudspokes.com
              http://blog.jeffdouglas.com

More Related Content

DOCX
Dynamo db pros and cons
PPTX
Azure CosmosDb
KEY
NoSQL: Why, When, and How
PPTX
Azure CosmosDb - Where we are
PPTX
Compare DynamoDB vs. MongoDB
PDF
Autoscale DynamoDB with Dynamic DynamoDB
PPTX
Application design for the cloud using AWS
PPTX
Apache MetaModel - unified access to all your data points
Dynamo db pros and cons
Azure CosmosDb
NoSQL: Why, When, and How
Azure CosmosDb - Where we are
Compare DynamoDB vs. MongoDB
Autoscale DynamoDB with Dynamic DynamoDB
Application design for the cloud using AWS
Apache MetaModel - unified access to all your data points

What's hot (9)

ODP
The other Apache Technologies your Big Data solution needs
PDF
Amazon RedShift - Ianni Vamvadelis
PDF
Deep Dive on ArangoDB
PDF
ArangoDB – A different approach to NoSQL
PPTX
Redshift overview
PPT
PPT
Microsoft's Big Play for Big Data- Visual Studio Live! NY 2012
PDF
Non Relational Databases
PPTX
Cloud Computing and the Microsoft Developer - A Down-to-Earth Analysis
The other Apache Technologies your Big Data solution needs
Amazon RedShift - Ianni Vamvadelis
Deep Dive on ArangoDB
ArangoDB – A different approach to NoSQL
Redshift overview
Microsoft's Big Play for Big Data- Visual Studio Live! NY 2012
Non Relational Databases
Cloud Computing and the Microsoft Developer - A Down-to-Earth Analysis
Ad

Similar to DynamoDB Gluecon 2012 (20)

PPTX
How to Choose The Right Database on AWS - Berlin Summit - 2019
PPTX
brock_delong_all_your_database_final.pptx
PPTX
Introduction to NoSql
ODP
Front Range PHP NoSQL Databases
PDF
DynamoDB Deep Dive
PPTX
Sql vs NoSQL
PPTX
Drop acid
PPT
SQL or NoSQL, that is the question!
PDF
Solr cloud the 'search first' nosql database extended deep dive
KEY
MongoDB SF Ruby
PPTX
Introduction to NoSQL Databases
PPTX
AWS SSA Webinar 32 - Getting Started with databases on AWS: Choosing the righ...
PDF
The NoSQL Ecosystem
PDF
HPTS 2011: The NoSQL Ecosystem
KEY
Escalando Aplicaciones Web
PPTX
Navigating NoSQL in cloudy skies
PDF
NoSQL Databases: An Introduction and Comparison between Dynamo, MongoDB and C...
PDF
Datastores
PPT
No sql landscape_nosqltips
PDF
A walk down NOSQL Lane in the cloud
How to Choose The Right Database on AWS - Berlin Summit - 2019
brock_delong_all_your_database_final.pptx
Introduction to NoSql
Front Range PHP NoSQL Databases
DynamoDB Deep Dive
Sql vs NoSQL
Drop acid
SQL or NoSQL, that is the question!
Solr cloud the 'search first' nosql database extended deep dive
MongoDB SF Ruby
Introduction to NoSQL Databases
AWS SSA Webinar 32 - Getting Started with databases on AWS: Choosing the righ...
The NoSQL Ecosystem
HPTS 2011: The NoSQL Ecosystem
Escalando Aplicaciones Web
Navigating NoSQL in cloudy skies
NoSQL Databases: An Introduction and Comparison between Dynamo, MongoDB and C...
Datastores
No sql landscape_nosqltips
A walk down NOSQL Lane in the cloud
Ad

More from Appirio (15)

PDF
How Happy Workers Make Happy Customers
PDF
Building a CX Technology Strategy
PDF
Google for Work vs. Office 365: Which is right for your company?
PDF
5 Ways to Empower Your Customers with Intelligent Self-Service
PDF
Sunshot
PDF
The Transformation of Enterprise Analytics
PDF
The New Customer Service
PDF
Infographic - The State of the Employee Portal
PPTX
Marketing and Sales: A Lesson in Marriage Counseling
PDF
Cloud Innovation: Consumer Packaged Goods eBook
PDF
Maynard Webb: Making a Life While Making a Living
PDF
Appirio: Reimagine Your Business With the Cloud
PDF
Salesforce Spring '13 Highlights
PDF
Appirio State of Social eBook
PDF
Case Study - Appirio as the Serverless Enterprise
How Happy Workers Make Happy Customers
Building a CX Technology Strategy
Google for Work vs. Office 365: Which is right for your company?
5 Ways to Empower Your Customers with Intelligent Self-Service
Sunshot
The Transformation of Enterprise Analytics
The New Customer Service
Infographic - The State of the Employee Portal
Marketing and Sales: A Lesson in Marriage Counseling
Cloud Innovation: Consumer Packaged Goods eBook
Maynard Webb: Making a Life While Making a Living
Appirio: Reimagine Your Business With the Cloud
Salesforce Spring '13 Highlights
Appirio State of Social eBook
Case Study - Appirio as the Serverless Enterprise

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Approach and Philosophy of On baking technology
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Electronic commerce courselecture one. Pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Machine learning based COVID-19 study performance prediction
PPTX
A Presentation on Artificial Intelligence
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Approach and Philosophy of On baking technology
Encapsulation_ Review paper, used for researhc scholars
Reach Out and Touch Someone: Haptics and Empathic Computing
Advanced methodologies resolving dimensionality complications for autism neur...
Spectral efficient network and resource selection model in 5G networks
NewMind AI Weekly Chronicles - August'25 Week I
“AI and Expert System Decision Support & Business Intelligence Systems”
Electronic commerce courselecture one. Pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Machine learning based COVID-19 study performance prediction
A Presentation on Artificial Intelligence
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
The Rise and Fall of 3GPP – Time for a Sabbatical?
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
NewMind AI Monthly Chronicles - July 2025
Mobile App Security Testing_ A Comprehensive Guide.pdf

DynamoDB Gluecon 2012

  • 1. ¡Ay, caramba! Wrestle Your NoSQL Data with DynamoDB Je ff Dougl a s @je ff do n th em ic C lo udSp ok es C ommun it y Arch itec t
  • 2. Rambling Talk Roadmap Short NoSQL overview (thanks Max @ 10gen!) Why NoSQL database are like Mexican Wrestlers Amazon DynamoDB in depth Amazon DynamoDB demo and code CloudSpokes challenge submissions for “Build an #Awesome Demo with Amazon DynamoDB”
  • 3. Times they are a-changin’ Cloud applications and APIs need to be fast, flexible and scalable. RDBMS typically do not scale well for certain data-intensive application. NoSQL is cloud friendly. “NoSQL is a rebellion against the DBAs who prevent us from doing shit.” - James Governor, Gluecon 2012
  • 4. Why is NoSQL #awesome? Developed to manage large volumes of data that do not necessarily follow a fixed schema Great for heavy read/write workloads Simple to setup, configure and administer Distributed, fault tolerant architecture Scale out not up Specialized database for the right task
  • 5. Key NoSQL differences Do not use SQL as a query language Dynamic & schema-less Non-relational, no JOIN operations No complex transactions May not give full ACID guarantees; eventually consistent instead. Performance and real-time nature is more important than consistency.
  • 6. NoSQL databases are “different”
  • 7. NoSQL database types Document store (MongoDB, CouchDB) A document-oriented database that stores, retrieves, and manages semi structured data including XML, YAML, JSON and binary (PDF, DOC) Key-value store (Cassandra, Redis) Stores scheme-less data referenced by a simple key value Graph database (Neo4j, FlockDB) Stores the relationship of data as a graph (social relations, network topologies)
  • 8. How to choose? With all of the different NoSQL database types, how do you choose the “best” one?
  • 9. El Toro Más Macho MongoDB Stores structured data as JSON-like documents. Ad hoc queries, indexing, master-slave replication, sharding, server-side JavaScript execution All the “cool kids” are using it. Node.js + MongoDB = WINNING!
  • 10. Muy Guapo Couchbase JSON Document store Embedded CouchDB with caching, clustering and high-performance storage management components. JavaScript as its query language and HTTP for an API Serve HTML and JavaScript-based “CouchApps”
  • 11. El Matador Misterio Redis What exactly is redis? MAGIC! By definition, it’s an in-memory, key-value data store with optional durability. Data model includes list of string, sets of strings, sorted sets of strings & hashes. Awesome at doing set comparisons.
  • 12. Comando Loco Apache Hadoop Fast, reliable analysis of both structured data and complex data. Derived from Google's MapReduce and File System (GFS) papers. Yahoo is one of the main contributors. Reliable data storage using the Hadoop Distributed File System (HDFS) and high- performance parallel data processing using MapReduce.
  • 13. El Jefe Supremo Apache Cassandra Massively scalable key-value store initially developed by Facebook. BigTable data model (nested hashes) running on an Amazon Dynamo-like infrastructure. Has some RDBMS “feel” with column families that make it it a hybrid column/row store. No single point of failure, fault-tolerant multi data center replication, MapReduce support. CQL (Cassandra Query Language)
  • 16. ¡Hola DynamoDB Amazon DynamoDB is a fast, fully managed key-value database service that scales seamlessly with extremely low latency and predictable performance. Store and retrieve any amount of data Serve any level of request traffic Hands off administration Pay for throughput and not storage
  • 17. ¡No! administración No hardware or software provisioning, setup and configuration, software patching, or partitioning data over multiple instances and regions. Specify the request throughput for your table and in the background, Amazon handles the provisioning of resources to meet the requested throughput rate. Automatically partitions/re-partitions data and provisions additional server capacity based upon table size & throughput. Synchronously replicates data across multiple facilities in an AWS Region giving you high availability and data durability.
  • 18. Muy rápido Consistent, predictable performance Runs on a new solid state disk (SSD) architecture for low-latency response times. Read latencies average less than 5 milliseconds, and write latencies average less than 10 milliseconds.
  • 19. Muy Escalable No table size limits (adiós SimpleDB?) No downtime when scaling up or down Unlimited storage Automatically scale machine resources in response to increases in database traffic without the need of client-side partitioning.
  • 20. Modelo de datos flexible Flexible data model with familiar tables, items and key-value pairs. Schema-less document storage. Each item can have different attributes. Easy to create and modify documents. Simple API. No cross-table joins. Use composite keys to model relationships.
  • 21. Duradero Consistent, disk-only writes Atomic increment/decrement (w/single API call) Optimistic concurrency control (aka conditional writes & updates) Item level transactions (even in bulk) Automatic and synchronous replication across data centers and availability zones.
  • 22. Costos? Pay for throughput and not storage. Priced per hour of provisioned read/write throughput Scales up and down well with a free tier
  • 23. Write throughput Write throughput Unit = size of item x writes/second $0.01 per hour for 10 write units
  • 24. Read throughput Strongly consistent reads (mucho dinero) Eventually consistent reads See Amazon’s site for read throughput pricing!
  • 25. Other features Integrates with Amazon Elastic MapReduce and Hadoop. Libraries, mappers and mocks for Django, Erlang, Java, .NET, Node.js, Perl, PHP, Python & Ruby. Session based authentication using Amazon Security Token Service Monitoring via CloudWatch
  • 26. DynamoDB Semantics Tables, item & attributes Items are indexed by primary key (single hash and composite keys) Items are a collection of attributes and attributes have a key and value. Unlimited number of attributes up to 64k total.
  • 27. Simple API calls CreateTable PutItem UpdateTable GetItem DeleteTable UpdateItem DescribeTable DeleteItem ListTables Query BatchGetItem Scan BatchWriteItem
  • 35. Flickr on DynamoDB Wcheung (Canada) submitted a Grails application that caches Flickr photos in Amazon DynamoDB. You can then search for cached feed entries by primary key (author + published date/time range) or by table scan. You can also “like” a photo, resulting in the atomic “like” counter for the item in DynamoDB getting incremented. http://screencast.com/t/MAVgm7xeqDpr
  • 36. Posterity Mbleigh (US) submitted a simple, barebones Twitter-esque service created in Ruby using Sinatra. It is far from complete but uses a number of DynamoDB's key features including Hash/Range Keys and Atomic Set Push Operations. http://www.screencast.com/t/me8hW27MYs3x
  • 37. DynamoDB Task Manager Darthdeus (Czech Republic) wrote his app in Ruby using Sinatra. It uses a custom ORM he wrote called DynamoRecord to access DynamoDB. His main idea was to get at least some of the ActiveRecord-ish API to DynamoDB using some basic metaprogramming http://www.youtube.com/watch?v=9tOzaDPP39I
  • 38. Simple Sur vey Peakpado (US) created an application using Ruby on Rails. For each table he created a sophisticated hask/range key model class which resulted in an API very similar to ActiveRecord for DynamoDB. http://screencast.com/t/ri1XkMxGcpnS
  • 39. Data Sets for Mumbai Romin (India) developed an API that exposes data sets of Mumbai city in JSON format. The solution uses Amazon DynamoDB for storing the data and a NodeJS application that exposes the REST interface and talks to Amazon DynamoDB via a backend Java application.

Editor's Notes