DynamoDB Applied Design Patterns

Book description

Apply efficient DynamoDB design patterns for high performance of applications

In Detail

DynamoDB provides fast and predictable performance with seamless scalability. If you are a developer, you can use DynamoDB to create a database table that can store and retrieve any amount of data, and serve any level of request traffic. As a database administrator, you can create and scale up or down your request capacity for your DynamoDB table without downtime or performance degradation.

Designed as a complete solutions guide for AWS DynamoDB, this book is a fully managed proprietary NoSQL database service pattern. The book begins with a description of the concepts of data modeling including tables, items, attributes, primary keys, indexes, and design patterns. You will learn how to access DynamoDB in the management console, command line, and the Eclipse plugin. You will also gain insights into DynamoDB Local and CLI commands. By the end of the book, you will have all that it takes to efficiently use DynamoDB to its utmost capabilities.

What You Will Learn

  • Understand the concepts of data modeling including tables, items, attributes, primary keys, indexes, and design patterns
  • Access DynamoDB in the management console, command line, and the Eclipse plugin
  • Get acquainted with DynamoDB Local and CLI commands and use them from a developer/DBA perspective
  • Discover what global and local secondary indexes are and their importance in DynamoDB
  • Automatically shard your NoSQL databases based on SLA
  • Conduct query and scan operations on DynamoDB tables to get efficient results
  • Call APIs from applications to DynamoDB and retrieve data in appropriate formats for other applications
  • Work closely with AWS services such as Redshift, S3, and MapReduce so they collaborate with DynamoDB efficiently

Table of contents

  1. DynamoDB Applied Design Patterns
    1. Table of Contents
    2. DynamoDB Applied Design Patterns
    3. Credits
    4. About the Authors
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Errata
        2. Piracy
        3. Questions
    8. 1. Data Modeling with DynamoDB
      1. Data model
      2. Efficient use of primary keys
      3. Basics of indexes
        1. Default or primary indexes
        2. Secondary indexes
      4. DynamoDB data types
      5. Summary
    9. 2. DynamoDB Interfaces
      1. The management console
        1. Managing the DynamoDB table
        2. Managing DynamoDB table items
      2. The Eclipse plugin
      3. The command-line interface
      4. Summary
    10. 3. Tools and Libraries of AWS DynamoDB
      1. Creating your first SDK project
      2. Java SDK operations
      3. DynamoDB Local
      4. Summary
    11. 4. Working with Secondary Indexes
      1. Secondary indexes
      2. Projection
        1. Local secondary index
        2. Global secondary index
      3. Item sharding
        1. Ideal item writing
      4. Best practices with secondary indexes
        1. Distributing the load by choosing the correct key
        2. Making use of the sparse index
        3. Using the global secondary index for quicker retrieval
        4. Creating a read replica
        5. Using indexes sparingly
        6. Choosing projections carefully
        7. Optimizing frequent queries to avoid fetches
        8. Watching for expanding item collections
      5. Summary
    12. 5. Query and Scan Operations in DynamoDB
      1. Querying tables
        1. Consistency
        2. Exclusive start key
      2. Scanning tables
      3. Parallel scanning
      4. Summary
    13. 6. Working with the DynamoDB API
      1. Data format
      2. HTTP requests
        1. Request header
        2. Request body
        3. Response header
      3. Error handling
        1. Client-side error with status code 400 - retry not needed
          1. AccessDeniedException
          2. ConditionalCheckFailedException
          3. IncompleteSignatureException
          4. LimitExceededException
          5. MissingAuthenticationTokenException
          6. ResourceInUseException
          7. ResourceNotFoundException
          8. ValidationException
        2. Client-side error with status code 400 - retry possible
          1. ProvisionedThroughputExceededException
          2. ItemCollectionSizeLimitExceededException
          3. ThrottlingException
          4. UnrecognizedClientException
        3. Client-side error with status code 413
        4. Server-side error with status code 500
          1. InternalFailure and InternalServerError
          2. ServiceUnavailableException
        5. Error retry and exponential back off
      4. Operations in DynamoDB
        1. CreateTable
        2. PutItem
        3. UpdateItem
        4. GetItem
        5. Query
        6. Scan
        7. DeleteItem
        8. DescribeTable
        9. UpdateTable
        10. DeleteTable
        11. ListTables
        12. BatchGetItem
        13. BatchWriteItem
      5. Summary
    14. 7. Distributed Locking with DynamoDB
      1. Distributed locking
        1. Solutions available to solve distributed writes
        2. Java high-level API
        3. Optimistic locking
      2. Importance of distributed locking
      3. Summary
    15. 8. DynamoDB with Redshift, Data Pipeline, and MapReduce
      1. Loading data from DynamoDB into Redshift
      2. Importing and exporting data between DynamoDB and S3
        1. Creating Data Pipeline
      3. Exporting, importing, querying, and joining tables using AWS MapReduce
        1. Exporting data from DynamoDB to S3
        2. Exporting the DynamoDB table to HDFS
        3. Importing data to DynamoDB
        4. Querying data in DynamoDB
        5. Joining two DynamoDB tables
      4. Summary
    16. 9. DynamoDB – Best Practices
      1. DynamoDB use cases
        1. Schema-less-ISH
        2. Batch applications
        3. Stating attributes using the :select option
        4. Synchronization
      2. Real-time problem statements and their solutions
        1. Problem statement – 1
          1. Solution
        2. Problem statement – 2
          1. Solution
        3. Problem statement – 3
          1. Solution
        4. Problem Statement – 4
          1. Solution
        5. Problem statement – 5
          1. Solution
      3. AWS DynamoDB on mobile
        1. Storing data in the table
          1. Android
          2. iOS
        2. Updating a record
          1. Android
          2. iOS
        3. Deleting a record
          1. Android
          2. iOS
      4. Uniform workload
      5. Time series tables
      6. When to use and when not to use DynamoDB
      7. Summary
    17. A. Comparing DynamoDB
      1. DynamoDB versus MongoDB
      2. DynamoDB versus Cassandra
      3. DynamoDB versus S3
      4. DynamoDB versus Redis
    18. Index

Product information

  • Title: DynamoDB Applied Design Patterns
  • Author(s): Uchit Vyas, Prabhakaran Kuppusamy
  • Release date: September 2014
  • Publisher(s): Packt Publishing
  • ISBN: 9781783551897