SlideShare ist ein Scribd-Unternehmen logo
1 von 130
Introducing
          DynamoDB


20th March, 2012
Dr. Matt Wood - matthew@amazon.com
Storage



Tools &
                      Compute
Support



          Databases
Storage
          Databases


Tools &
                      Compute
Support
Databases




Relational                “NoSQL”
databases                databases
Any database on Amazon EC2
     MySQL, DB2, Oracle, PostgreSQL...
Relational Database Service
   Managed MySQL and Oracle databases
Rapid            High
                provisioning    availability
Scalable                                        Scalable
storage                                         compute

 Relational Database Service
           Managed MySQL and Oracle databases
High performance databases

       Increase throughput


       Increase availability


         Reduce latency
High performance databases
                                      Read replicas
Push-button
  scaling     Increase throughput
                                      ElastiCache
              Increase availability


                Reduce latency
High performance databases

           Increase throughput


Multi-AZ   Increase availability


             Reduce latency
High performance databases

       Increase throughput


       Increase availability


         Reduce latency        ElastiCache
Rich query semantics
   Joins, transactions, query optimisation
Problem
Complexity. Performance decreases at scale.
Performance

              Predictable, consistent




                                 Scale
Performance

                  Predictable, consistent




              Degraded performance
                   with scale



                                     Scale
Performance

                  Predictable, consistent




              Degraded performance
                   with scale



                                     Scale
= more problems
Data caching
                                       Provisioning!
Data sharding


          = more problems
Cluster management
                               Fault management
Undifferentiated
 heavy lifting
DynamoDB
Fully managed
NoSQL database
     service
Offload admin and
operational burden
Extremely fast
performance
Seamless scalability
Focus on your stuff
AGENDA
     Getting to know DynamoDB


Gu ided tour of service highlights
Provisioned throughput
Data model
DynamoDB in practice
Analytics with Elastic MapReduce
H   I   G   H   L   I   G   H   T   S




  Low latency                                 Flexible


  Large scale                         Durable storage


Seamless scaling                          Zero admin


        Predictable performance
H    I   G   H   L   I   G   H   T   S



                   SSD backed



     Low latency
          Single digit millisecond



< 5 ms reads                       < 10 ms writes
H   I   G   H   L   I   G   H   T   S




  Massive scale
No table size limits. Unlimited storage.
H   I   G   H   L   I   G   H   T   S




Seamless scale
Live repartitioning. Zero admin.
H   I   G   H   L   I   G   H   T   S




Flexible data model
 Key/attribute store for evolving models
H    I   G   H   L   I   G   H   T   S




Predictable performance
          Provisioned throughput
H   I   G   H   L   I   G   H   T   S




Durable and available
     Consistent, disk-only writes
H   I   G   H   L   I   G   H   T   S




Zero administration
What is provisioned
  throughput?
Reserve required IOPS
  Per table. Set at creation. Scale via API.
Scale at any time
     No downtime
Pay for throughput
Per 1kb item:




$0.01 per hour for every 10 writes/second

  $0.01 per hour for every 50 strongly
        consistent reads/second
Per 1kb item:




          $0.28 per million writes

$0.056 per million strongly consistent reads
Pay for storage
$1.00 per Gb per month of indexed storage
Data model
 Flexible. Schema-less.
Simple key/value pairs
 title => “Introduction to DynamoDB”
          date => “20120320”
Associative array,
      or Hash
[ title => “Introduction to DynamoDB”,
         date => “20120320” ]
Attributes

[ title => “Introduction to DynamoDB”,
         date => “20120320” ]
[ title => “Disaster Recovery with AWS”,
           date => “20120320”,
          format => “webinar”,
       presenter => “Jeff Barr” ]




           Attributes

 [ title => “Introduction to DynamoDB”,
          date => “20120320” ]
[ title => “Disaster Recovery with AWS”,
           date => “20120320”,
          format => “webinar”,
       presenter => “Jeff Barr” ]




               Items

 [ title => “Introduction to DynamoDB”,
          date => “20120320” ]
[ title => “Disaster Recovery with AWS”,
           date => “20120328”,
          format => “webinar”,
       presenter => “Jeff Barr” ]




               Table

 [ title => “Introduction to DynamoDB”,
          date => “20120320” ]
Table
Item

“ImageID” = “1”


   “Date” =
  “20100915”


“Title” = “flower”


“Tags” = “flower”,
“jasmine”, “white”
“ImageID” = “1”      “ImageID” =”2”        “ImageID” =”3”


   “Date” =              “Date” =             “Date” =
  “20100915”            “20100916”           “20100917”


“Title” = “flower”    “Title” = “ferrari”   “Title” = “coffee”


“Tags” = “flower”,     “Tags” = “car”,      “Tags” = “drink”,
“jasmine”, “white”       “italian”            “delicious”
“ImageID” = “1”     Primary or hash key

“Date” = “20100915”



 “Title” = “flower”


 “Tags” = “flower”,
 “jasmine”, “white”
“ImageID” = “1”     Primary or hash key

“Date” = “20100915”   Composite or range key

 “Title” = “flower”


 “Tags” = “flower”,
 “jasmine”, “white”
“ImageID” = “1”     Primary or hash key

“Date” = “20100915”   Composite or range key

 “Title” = “flower”


 “Tags” = “flower”,    Sets of strings
 “jasmine”, “white”
                      or numbers
Best practice
    Well balanced, fine grained hash keys.
Customer, order, item, etc. rather than store_id.
Simple API
 Only 12 operations.
Consistency
       Writes are always consistent.
Reads are consistent or eventually consistent.
Durability
       Writes occur to disk, not memory.
Writes are acknowledged once they have been
      made in two physical data centres.
Availability
         Region specific (not AZ)
Continuously replicated across multiple AZs
Let’s take a look!
Building a simple DynamoDB powered web application
Threaded discussions



             NP-Complete.me
              Book reviews for programmers



Page view counts                      Tagging
np-complete.me
np-complete.me
np-complete.me/asin
np-complete.me/discuss
np-complete.me/discuss
Book



       Thread



       Thread



       Thread



                Reply



                Reply
Book table
                Book metadata

Hash key
           asin => 0980576830
Book table
                Book metadata




           asin => 0980576830
title => “Host Your Website on the Cloud”
             pages => “364”
        list-price => “£31.49”
Book table
             Book metadata, page views




           asin => 0980576830
title => “Host Your Website on the Cloud”
             pages => “364”
        list-price => “£31.49”


             views => 145
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”]
Thread table
                       Conversation thread

        Hash key
Range key          asin => 0980576830

            subject => “Very informative”
Thread table
                       Conversation thread

        Hash key
Range key          asin => 0980576830

            subject => “Very informative”

content => “This is a first class book...”

                   name => “Matt Wood”
Reply table
                       Conversation replies

Hash key
            id => 0980576830:very-informative
Range key        datetime => “20120320”
Reply table
                       Conversation replies

Hash key
            id => 0980576830:very-informative
Range key        datetime => “20120320”

                  reply => “I agree!”

                 name => “Werner Vogels”
DynamoDB tables




Books          Threads           Replies
(asin)      (asin, subject)   (id, datetime)
DynamoDB tables




Books          Threads           Replies
(asin)      (asin, subject)   (id, datetime)
Book                              Logical model
(asin)



             Thread
         (asin, subject)



             Thread
         (asin, subject)



             Thread
         (asin, subject)



                               Reply
                           (id, datetime)



                               Reply
                           (id, datetime)
Conditional writes


Client #1




DynamoDB    asin => 1934356
             pages => 384




Client #2


  Time
Conditional writes

            asin => 1934356     asin => 1934356
Client #1    pages => 384        pages => 502




DynamoDB    asin => 1934356     asin => 1934356
             pages => 384        pages => 502




            asin => 1934356
Client #2    pages => 384



  Time
Conditional writes

            asin => 1934356     asin => 1934356
Client #1    pages => 384        pages => 502




DynamoDB    asin => 1934356     asin => 1934356          ?
             pages => 384        pages => 502




            asin => 1934356                       asin => 1934356
Client #2    pages => 384                          pages => 450



  Time
Conditional writes

            asin => 1934356     asin => 1934356
Client #1    pages => 384        pages => 502




                                                  Failed condition
DynamoDB    asin => 1934356     asin => 1934356
             pages => 384        pages => 502




            asin => 1934356                       asin => 1934356
Client #2    pages => 384                          pages => 450



  Time
Atomic increment/decrement


                  asin => 0980576830
                     views => 145



tables[‘books’].items[‘0980576830’].attributes.add(:views => 1)




                  asin => 0980576830
                     views => 146
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
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
Autoscaling via SNS


$Res = $DDB->describe_table(array('TableName' => 'books'));

$Read = (int) $Res->body->Table->ProvisionedThroughput->ReadCapacityUnits;
$Write = (int) $Res->body->Table->ProvisionedThroughput->WriteCapacityUnits;

$Read *= 2;
$Write *= 2;

$PT = array('ReadCapacityUnits' => (string) $Read,
            'WriteCapacityUnits' => (string) $Write);

$Res = $ddb->update_table(array('TableName' => 'books',
                                'ProvisionedThroughPut' => $PT));
Autoscaling via SNS


$Res = $DDB->describe_table(array('TableName' => 'books'));

$Read = (int) $Res->body->Table->ProvisionedThroughput->ReadCapacityUnits;
$Write = (int) $Res->body->Table->ProvisionedThroughput->WriteCapacityUnits;

$Read *= 2;
$Write *= 2;

$PT = array('ReadCapacityUnits' => (string) $Read,
            'WriteCapacityUnits' => (string) $Write);

$Res = $ddb->update_table(array('TableName' => 'books',
                                'ProvisionedThroughPut' => $PT));
Autoscaling via SNS


$Res = $DDB->describe_table(array('TableName' => 'books'));

$Read = (int) $Res->body->Table->ProvisionedThroughput->ReadCapacityUnits;
$Write = (int) $Res->body->Table->ProvisionedThroughput->WriteCapacityUnits;

$Read *= 2;
$Write *= 2;

$PT = array('ReadCapacityUnits' => (string) $Read,
            'WriteCapacityUnits' => (string) $Write);

$Res = $ddb->update_table(array('TableName' => 'books',
                                'ProvisionedThroughPut' => $PT));
Autoscaling via SNS


$Res = $DDB->describe_table(array('TableName' => 'books'));

$Read = (int) $Res->body->Table->ProvisionedThroughput->ReadCapacityUnits;
$Write = (int) $Res->body->Table->ProvisionedThroughput->WriteCapacityUnits;

$Read *= 2;
$Write *= 2;

$PT = array('ReadCapacityUnits' => (string) $Read,
            'WriteCapacityUnits' => (string) $Write);

$Res = $ddb->update_table(array('TableName' => 'books',
                                'ProvisionedThroughPut' => $PT));
Autoscaling via SNS


$Res = $DDB->describe_table(array('TableName' => 'books'));

$Read = (int) $Res->body->Table->ProvisionedThroughput->ReadCapacityUnits;
$Write = (int) $Res->body->Table->ProvisionedThroughput->WriteCapacityUnits;

$Read *= 2;
$Write *= 2;

$PT = array('ReadCapacityUnits' => (string) $Read,
            'WriteCapacityUnits' => (string) $Write);

$Res = $ddb->update_table(array('TableName' => 'books',
                                'ProvisionedThroughPut' => $PT));
Considerations
     Limited index and query model

Throughput is provisioned in 1K operations

         Maximum 64K item size


Backup and restore via Elastic MapReduce
Elastic MapReduce
 Built for data. Designed for humans.
Collection   Computation   Collaboration
Collection    Computation           Collaboration
  DynamoDB             Elastic MapReduce

  Amazon S3              Amazon EC2
DynamoDB

Data
DynamoDB

          Data




Code     Elastic
       MapReduce
DynamoDB

          Data




Code     Elastic   Name
       MapReduce   node
DynamoDB

          Data




Code     Elastic   Name
       MapReduce   node




                           Elastic
                           cluster
DynamoDB

          Data




Code     Elastic   Name
       MapReduce   node


                                     HDFS


                           Elastic
                           cluster
DynamoDB

          Data




Code     Elastic   Name                     Output
       MapReduce   node                       S3



                                     HDFS


                           Elastic
                           cluster
DynamoDB

Data




                  Output
                    S3
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;
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;
Live and archive data
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.
DynamoDB free tier
        5 writes/second
   10 consistent reads/second
        100Mb storage
Developer Guide
aws.amazon.com/documentation/dynamodb
Drop us a line!
 aws.amazon.com/contact-us
Thank you!
Q&A
matthew@amazon.com
SimpleDB
Zero maintenance, NoSQL datastore
Flexible queries

  10Gb / 1 billion                              No native
attributes per tabel                          data sharding

                       SimpleDB
              Zero maintenance, NoSQL datastore

Weitere ähnliche Inhalte

Was ist angesagt?

AWS (Amazon Redshift) presentation
AWS (Amazon Redshift) presentationAWS (Amazon Redshift) presentation
AWS (Amazon Redshift) presentation
Volodymyr Rovetskiy
 

Was ist angesagt? (20)

Dynamodb ppt
Dynamodb pptDynamodb ppt
Dynamodb ppt
 
Amazon DynamoDB 키 디자인 패턴
Amazon DynamoDB 키 디자인 패턴Amazon DynamoDB 키 디자인 패턴
Amazon DynamoDB 키 디자인 패턴
 
AWS DynamoDB and Schema Design
AWS DynamoDB and Schema DesignAWS DynamoDB and Schema Design
AWS DynamoDB and Schema Design
 
Amazon DynamoDB Deep Dive Advanced Design Patterns for DynamoDB (DAT401) - AW...
Amazon DynamoDB Deep Dive Advanced Design Patterns for DynamoDB (DAT401) - AW...Amazon DynamoDB Deep Dive Advanced Design Patterns for DynamoDB (DAT401) - AW...
Amazon DynamoDB Deep Dive Advanced Design Patterns for DynamoDB (DAT401) - AW...
 
Dynamodb Presentation
Dynamodb PresentationDynamodb Presentation
Dynamodb Presentation
 
Deep Dive: Amazon DynamoDB
Deep Dive: Amazon DynamoDBDeep Dive: Amazon DynamoDB
Deep Dive: Amazon DynamoDB
 
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
 
Deep Dive on Amazon S3
Deep Dive on Amazon S3Deep Dive on Amazon S3
Deep Dive on Amazon S3
 
워크로드 특성에 따른 안전하고 효율적인 Data Lake 운영 방안
워크로드 특성에 따른 안전하고 효율적인 Data Lake 운영 방안워크로드 특성에 따른 안전하고 효율적인 Data Lake 운영 방안
워크로드 특성에 따른 안전하고 효율적인 Data Lake 운영 방안
 
Deep Dive on Amazon DynamoDB
Deep Dive on Amazon DynamoDB Deep Dive on Amazon DynamoDB
Deep Dive on Amazon DynamoDB
 
Module 2 - Datalake
Module 2 - DatalakeModule 2 - Datalake
Module 2 - Datalake
 
Amazon Aurora
Amazon AuroraAmazon Aurora
Amazon Aurora
 
Amazon DocumentDB vs MongoDB 의 내부 아키텍쳐 와 장단점 비교
Amazon DocumentDB vs MongoDB 의 내부 아키텍쳐 와 장단점 비교Amazon DocumentDB vs MongoDB 의 내부 아키텍쳐 와 장단점 비교
Amazon DocumentDB vs MongoDB 의 내부 아키텍쳐 와 장단점 비교
 
RDS Postgres and Aurora Postgres | AWS Public Sector Summit 2017
RDS Postgres and Aurora Postgres | AWS Public Sector Summit 2017RDS Postgres and Aurora Postgres | AWS Public Sector Summit 2017
RDS Postgres and Aurora Postgres | AWS Public Sector Summit 2017
 
Getting started with Amazon DynamoDB
Getting started with Amazon DynamoDBGetting started with Amazon DynamoDB
Getting started with Amazon DynamoDB
 
Amazon RDS: Deep Dive - SRV310 - Chicago AWS Summit
Amazon RDS: Deep Dive - SRV310 - Chicago AWS SummitAmazon RDS: Deep Dive - SRV310 - Chicago AWS Summit
Amazon RDS: Deep Dive - SRV310 - Chicago AWS Summit
 
Migrating Oracle to PostgreSQL
Migrating Oracle to PostgreSQLMigrating Oracle to PostgreSQL
Migrating Oracle to PostgreSQL
 
AWS (Amazon Redshift) presentation
AWS (Amazon Redshift) presentationAWS (Amazon Redshift) presentation
AWS (Amazon Redshift) presentation
 
DynamoDB의 안과밖 - 정민영 (비트패킹 컴퍼니)
DynamoDB의 안과밖 - 정민영 (비트패킹 컴퍼니)DynamoDB의 안과밖 - 정민영 (비트패킹 컴퍼니)
DynamoDB의 안과밖 - 정민영 (비트패킹 컴퍼니)
 
AWS RDS
AWS RDSAWS RDS
AWS RDS
 

Ähnlich wie Webinar | Introduction to Amazon DynamoDB

AWS Cloud School | London - Part 2
AWS Cloud School | London - Part 2AWS Cloud School | London - Part 2
AWS Cloud School | London - Part 2
Amazon Web Services
 

Ähnlich wie Webinar | Introduction to Amazon DynamoDB (20)

AWS Cloud School | London - Part 2
AWS Cloud School | London - Part 2AWS Cloud School | London - Part 2
AWS Cloud School | London - Part 2
 
Running Databases on AWS
Running Databases on AWSRunning Databases on AWS
Running Databases on AWS
 
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
 
Dynamo DB & RDS Deep Dive - AWS India Summit 2012
Dynamo DB & RDS Deep Dive - AWS India Summit 2012Dynamo DB & RDS Deep Dive - AWS India Summit 2012
Dynamo DB & RDS Deep Dive - AWS India Summit 2012
 
AWS Cloud Experience CA: Bases de Datos en AWS: distintas necesidades, distin...
AWS Cloud Experience CA: Bases de Datos en AWS: distintas necesidades, distin...AWS Cloud Experience CA: Bases de Datos en AWS: distintas necesidades, distin...
AWS Cloud Experience CA: Bases de Datos en AWS: distintas necesidades, distin...
 
(BDT310) Big Data Architectural Patterns and Best Practices on AWS
(BDT310) Big Data Architectural Patterns and Best Practices on AWS(BDT310) Big Data Architectural Patterns and Best Practices on AWS
(BDT310) Big Data Architectural Patterns and Best Practices on AWS
 
How and when to use NoSQL
How and when to use NoSQLHow and when to use NoSQL
How and when to use NoSQL
 
How & When to Use NoSQL at Websummit Dublin
How & When to Use NoSQL at Websummit DublinHow & When to Use NoSQL at Websummit Dublin
How & When to Use NoSQL at Websummit Dublin
 
AWS November Webinar Series - Architectural Patterns & Best Practices for Big...
AWS November Webinar Series - Architectural Patterns & Best Practices for Big...AWS November Webinar Series - Architectural Patterns & Best Practices for Big...
AWS November Webinar Series - Architectural Patterns & Best Practices for Big...
 
Getting Started with Big Data and HPC in the Cloud - August 2015
Getting Started with Big Data and HPC in the Cloud - August 2015Getting Started with Big Data and HPC in the Cloud - August 2015
Getting Started with Big Data and HPC in the Cloud - August 2015
 
February 2016 Webinar Series - Architectural Patterns for Big Data on AWS
February 2016 Webinar Series - Architectural Patterns for Big Data on AWSFebruary 2016 Webinar Series - Architectural Patterns for Big Data on AWS
February 2016 Webinar Series - Architectural Patterns for Big Data on AWS
 
AWS March 2016 Webinar Series - Managed Database Services on Amazon Web Services
AWS March 2016 Webinar Series - Managed Database Services on Amazon Web ServicesAWS March 2016 Webinar Series - Managed Database Services on Amazon Web Services
AWS March 2016 Webinar Series - Managed Database Services on Amazon Web Services
 
(WRK302) Event-Driven Programming
(WRK302) Event-Driven Programming(WRK302) Event-Driven Programming
(WRK302) Event-Driven Programming
 
Amazon Dynamo DB for Developers (김일호) - AWS DB Day
Amazon Dynamo DB for Developers (김일호) - AWS DB DayAmazon Dynamo DB for Developers (김일호) - AWS DB Day
Amazon Dynamo DB for Developers (김일호) - AWS DB Day
 
Deep Dive in Big Data
Deep Dive in Big DataDeep Dive in Big Data
Deep Dive in Big Data
 
Choosing the Right Database Service (김상필, 유타카 호시노) - AWS DB Day
Choosing the Right Database Service (김상필, 유타카 호시노) - AWS DB DayChoosing the Right Database Service (김상필, 유타카 호시노) - AWS DB Day
Choosing the Right Database Service (김상필, 유타카 호시노) - AWS DB Day
 
MongoDB at ZPUGDC
MongoDB at ZPUGDCMongoDB at ZPUGDC
MongoDB at ZPUGDC
 
Aws Summit Berlin 2013 - Understanding database options on AWS
Aws Summit Berlin 2013 - Understanding database options on AWSAws Summit Berlin 2013 - Understanding database options on AWS
Aws Summit Berlin 2013 - Understanding database options on AWS
 
MongoDB at FrozenRails
MongoDB at FrozenRailsMongoDB at FrozenRails
MongoDB at FrozenRails
 
AWS re:Invent 2016: Big Data Architectural Patterns and Best Practices on AWS...
AWS re:Invent 2016: Big Data Architectural Patterns and Best Practices on AWS...AWS re:Invent 2016: Big Data Architectural Patterns and Best Practices on AWS...
AWS re:Invent 2016: Big Data Architectural Patterns and Best Practices on AWS...
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

+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@
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
+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...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

Webinar | Introduction to Amazon DynamoDB

  • 1. Introducing DynamoDB 20th March, 2012 Dr. Matt Wood - matthew@amazon.com
  • 2. Storage Tools & Compute Support Databases
  • 3. Storage Databases Tools & Compute Support
  • 4. Databases Relational “NoSQL” databases databases
  • 5. Any database on Amazon EC2 MySQL, DB2, Oracle, PostgreSQL...
  • 6. Relational Database Service Managed MySQL and Oracle databases
  • 7. Rapid High provisioning availability Scalable Scalable storage compute Relational Database Service Managed MySQL and Oracle databases
  • 8. High performance databases Increase throughput Increase availability Reduce latency
  • 9. High performance databases Read replicas Push-button scaling Increase throughput ElastiCache Increase availability Reduce latency
  • 10. High performance databases Increase throughput Multi-AZ Increase availability Reduce latency
  • 11. High performance databases Increase throughput Increase availability Reduce latency ElastiCache
  • 12. Rich query semantics Joins, transactions, query optimisation
  • 14. Performance Predictable, consistent Scale
  • 15. Performance Predictable, consistent Degraded performance with scale Scale
  • 16. Performance Predictable, consistent Degraded performance with scale Scale
  • 18. Data caching Provisioning! Data sharding = more problems Cluster management Fault management
  • 25. Focus on your stuff
  • 26.
  • 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
  • 35. H I G H L I G H T S Zero administration
  • 36. What is provisioned throughput?
  • 37. Reserve required IOPS Per table. Set at creation. Scale via API.
  • 38. Scale at any time No downtime
  • 40. Per 1kb item: $0.01 per hour for every 10 writes/second $0.01 per hour for every 50 strongly consistent reads/second
  • 41. Per 1kb item: $0.28 per million writes $0.056 per million strongly consistent reads
  • 42. Pay for storage $1.00 per Gb per month of indexed storage
  • 43. Data model Flexible. Schema-less.
  • 44. Simple key/value pairs title => “Introduction to DynamoDB” date => “20120320”
  • 45. Associative array, or Hash [ title => “Introduction to DynamoDB”, date => “20120320” ]
  • 46. Attributes [ title => “Introduction to DynamoDB”, date => “20120320” ]
  • 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” ]
  • 50. Table
  • 51. Item “ImageID” = “1” “Date” = “20100915” “Title” = “flower” “Tags” = “flower”, “jasmine”, “white”
  • 52. “ImageID” = “1” “ImageID” =”2” “ImageID” =”3” “Date” = “Date” = “Date” = “20100915” “20100916” “20100917” “Title” = “flower” “Title” = “ferrari” “Title” = “coffee” “Tags” = “flower”, “Tags” = “car”, “Tags” = “drink”, “jasmine”, “white” “italian” “delicious”
  • 53. “ImageID” = “1” Primary or hash key “Date” = “20100915” “Title” = “flower” “Tags” = “flower”, “jasmine”, “white”
  • 54. “ImageID” = “1” Primary or hash key “Date” = “20100915” Composite or range key “Title” = “flower” “Tags” = “flower”, “jasmine”, “white”
  • 55. “ImageID” = “1” Primary or hash key “Date” = “20100915” Composite or range key “Title” = “flower” “Tags” = “flower”, Sets of strings “jasmine”, “white” or numbers
  • 56. Best practice Well balanced, fine grained hash keys. Customer, order, item, etc. rather than store_id.
  • 57. Simple API Only 12 operations.
  • 58. Consistency Writes are always consistent. Reads are consistent or eventually consistent.
  • 59. Durability Writes occur to disk, not memory. Writes are acknowledged once they have been made in two physical data centres.
  • 60. Availability Region specific (not AZ) Continuously replicated across multiple AZs
  • 61. Let’s take a look! Building a simple DynamoDB powered web application
  • 62. Threaded discussions NP-Complete.me Book reviews for programmers Page view counts Tagging
  • 68. Book Thread Thread Thread Reply Reply
  • 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”]
  • 73.
  • 74. Thread table Conversation thread Hash key Range key asin => 0980576830 subject => “Very informative”
  • 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”
  • 78.
  • 79. DynamoDB tables Books Threads Replies (asin) (asin, subject) (id, datetime)
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.
  • 93.
  • 94.
  • 95. DynamoDB tables Books Threads Replies (asin) (asin, subject) (id, datetime)
  • 96. Book Logical model (asin) Thread (asin, subject) Thread (asin, subject) Thread (asin, subject) Reply (id, datetime) Reply (id, datetime)
  • 97. Conditional writes Client #1 DynamoDB asin => 1934356 pages => 384 Client #2 Time
  • 98. Conditional writes asin => 1934356 asin => 1934356 Client #1 pages => 384 pages => 502 DynamoDB asin => 1934356 asin => 1934356 pages => 384 pages => 502 asin => 1934356 Client #2 pages => 384 Time
  • 99. Conditional writes asin => 1934356 asin => 1934356 Client #1 pages => 384 pages => 502 DynamoDB asin => 1934356 asin => 1934356 ? pages => 384 pages => 502 asin => 1934356 asin => 1934356 Client #2 pages => 384 pages => 450 Time
  • 100. Conditional writes asin => 1934356 asin => 1934356 Client #1 pages => 384 pages => 502 Failed condition DynamoDB asin => 1934356 asin => 1934356 pages => 384 pages => 502 asin => 1934356 asin => 1934356 Client #2 pages => 384 pages => 450 Time
  • 101. Atomic increment/decrement asin => 0980576830 views => 145 tables[‘books’].items[‘0980576830’].attributes.add(:views => 1) asin => 0980576830 views => 146
  • 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
  • 104. Autoscaling via SNS $Res = $DDB->describe_table(array('TableName' => 'books')); $Read = (int) $Res->body->Table->ProvisionedThroughput->ReadCapacityUnits; $Write = (int) $Res->body->Table->ProvisionedThroughput->WriteCapacityUnits; $Read *= 2; $Write *= 2; $PT = array('ReadCapacityUnits' => (string) $Read, 'WriteCapacityUnits' => (string) $Write); $Res = $ddb->update_table(array('TableName' => 'books', 'ProvisionedThroughPut' => $PT));
  • 105. Autoscaling via SNS $Res = $DDB->describe_table(array('TableName' => 'books')); $Read = (int) $Res->body->Table->ProvisionedThroughput->ReadCapacityUnits; $Write = (int) $Res->body->Table->ProvisionedThroughput->WriteCapacityUnits; $Read *= 2; $Write *= 2; $PT = array('ReadCapacityUnits' => (string) $Read, 'WriteCapacityUnits' => (string) $Write); $Res = $ddb->update_table(array('TableName' => 'books', 'ProvisionedThroughPut' => $PT));
  • 106. Autoscaling via SNS $Res = $DDB->describe_table(array('TableName' => 'books')); $Read = (int) $Res->body->Table->ProvisionedThroughput->ReadCapacityUnits; $Write = (int) $Res->body->Table->ProvisionedThroughput->WriteCapacityUnits; $Read *= 2; $Write *= 2; $PT = array('ReadCapacityUnits' => (string) $Read, 'WriteCapacityUnits' => (string) $Write); $Res = $ddb->update_table(array('TableName' => 'books', 'ProvisionedThroughPut' => $PT));
  • 107. Autoscaling via SNS $Res = $DDB->describe_table(array('TableName' => 'books')); $Read = (int) $Res->body->Table->ProvisionedThroughput->ReadCapacityUnits; $Write = (int) $Res->body->Table->ProvisionedThroughput->WriteCapacityUnits; $Read *= 2; $Write *= 2; $PT = array('ReadCapacityUnits' => (string) $Read, 'WriteCapacityUnits' => (string) $Write); $Res = $ddb->update_table(array('TableName' => 'books', 'ProvisionedThroughPut' => $PT));
  • 108. Autoscaling via SNS $Res = $DDB->describe_table(array('TableName' => 'books')); $Read = (int) $Res->body->Table->ProvisionedThroughput->ReadCapacityUnits; $Write = (int) $Res->body->Table->ProvisionedThroughput->WriteCapacityUnits; $Read *= 2; $Write *= 2; $PT = array('ReadCapacityUnits' => (string) $Read, 'WriteCapacityUnits' => (string) $Write); $Res = $ddb->update_table(array('TableName' => 'books', 'ProvisionedThroughPut' => $PT));
  • 109. Considerations Limited index and query model Throughput is provisioned in 1K operations Maximum 64K item size Backup and restore via Elastic MapReduce
  • 110. Elastic MapReduce Built for data. Designed for humans.
  • 111. Collection Computation Collaboration
  • 112. Collection Computation Collaboration DynamoDB Elastic MapReduce Amazon S3 Amazon EC2
  • 114. DynamoDB Data Code Elastic MapReduce
  • 115. DynamoDB Data Code Elastic Name MapReduce node
  • 116. DynamoDB Data Code Elastic Name MapReduce node Elastic cluster
  • 117. DynamoDB Data Code Elastic Name MapReduce node HDFS Elastic cluster
  • 118. DynamoDB Data Code Elastic Name Output MapReduce node S3 HDFS Elastic cluster
  • 119. DynamoDB Data Output S3
  • 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.
  • 124. DynamoDB free tier 5 writes/second 10 consistent reads/second 100Mb storage
  • 126. Drop us a line! aws.amazon.com/contact-us
  • 130. Flexible queries 10Gb / 1 billion No native attributes per tabel data sharding SimpleDB Zero maintenance, NoSQL datastore