Table of Contents
Preface
Chapter 1: Getting to Know SimpleDB
Chapter 2: Getting Started with SimpleDB
Chapter 3: SimpleDB versus RDBMS
Chapter 4: The SimpleDB Data Model
Chapter 5: Data Types
Chapter 6: Querying
Chapter 7: Storing Data on S3
Chapter 8: Tuning and Usage Costs
Chapter 9: Caching
Chapter 10: Parallel Processing
Index
- Chapter 1: Getting to Know SimpleDB
- Experimenting with SimpleDB
- How does SimpleDB work?
- Domain
- Item
- Attributes
- Values
- How do I interact with SimpleDB?
- How is SimpleDB priced?
- Free tier
- Why should I use SimpleDB?
- Make your applications simpler to architect
- Build flexibility into your applications
- Create high-performance web applications
- Take advantage of lower costs
- Scale your applications on demand
- Architect for the cloud
- Summary
- Chapter 2: Getting Started with SimpleDB
- Creating an AWS account
- Enabling SimpleDB service for AWS account
- Query API and authentication
- SimpleDB libraries
- SDBtool — Firefox plugin
- Sample outline — performing basic operations
- Basic operations with Java
- Exploring SimpleDB with Java
- Creating a domain with Java
- Listing domains with Java
- Manipulating items with Java
- Deleting a domain with Java
- Basic operations with PHP
- Exploring SimpleDB with PHP
- Creating a domain with PHP
- Listing domains with PHP
- Manipulating items with PHP
- Deleting a domain with PHP
- Basic operations with Python
- Introducing boto
- Exploring SimpleDB with Python
- Creating a domain with Python
- Retrieving a domain with Python
- Creating items with Python
- Summary
- Chapter 3: SimpleDB versus RDBMS
- No normalization
- No joins
- No schemas
- Simpler SQL
- Only strings
- Eventual consistency
- Flash: February 24, 2010 — consistent read added
- Scalability
- Low maintenance
- Advantages of the SimpleDB model
- Disadvantages of the SimpleDB model
- Summary
- Chapter 4: The SimpleDB Data Model
- Domains
- Domains with Java
- Domains with PHP
- Domains with Python
- Exploring the metadata for a domain and costs
- Retrieving domain metadata
- Retrieving domain metadata with Java
- Retrieving domain metadata with PHP
- Retrieving domain metadata with Python
- Components of a domain's metadata
- SimpleDB domain constraints
- Retrieving domain metadata
- Items
- Adding attributes to an item with Java
- Adding attributes to an item with PHP
- Adding attributes to an item with Python
- Constraints on SimpleDB items
- Attributes
- Attributes with Java
- Attributes with PHP
- Attributes with Python
- Constraints on SimpleDB item attributes
- Values
- Storing multiple values in a single attribute with Java
- Storing multiple values in a single attribute with PHP
- Storing multiple values in a single attribute with Python
- Constraints on values of a SimpleDB item
- Consistent Read and Conditional Put / Delete announcement
- ConsistentRead = true for getAttributes and Select
- Conditional Put / Delete
- Summary
- Domains
- Chapter 5: Data Types
- What is lexicographical comparison?
- Storing numeric values
- Storing numeric values with Java
- Storing numeric values with PHP
- Storing numeric values with Python
- Storing date values
- Storing date values with Java
- Storing date values with PHP
- Storing date values with Python
- Storing Boolean values
- Storing Boolean values with Java
- Storing Boolean values with PHP
- Storing Boolean values with Python
- XML-restricted characters
- Using base64 values with Java
- Using base64 values with PHP
- Using base64 values with Python
- Summary
- Chapter 6: Querying
- Sample data
- Loading the sample data
- Importing the sample data with Java
- Importing the sample data with PHP
- Importing the sample data with Python
- Using Select
- Simple select with Java
- Simple select with PHP
- Simple select with Python
- Quoting values in Select expressions
- Predicates in Select expressions
- Simple predicate query with Java
- Simple predicate query with PHP
- Simple predicate query with Python
- Loading the sample data
- Comparison operators
- Queries with Select
- Comparison operators
- Greater than
- LIKE
- NOT LIKE
- BETWEEN
- IN
- IS NULL
- IS NOT NULL
- EVERY()
- Combining expressions
- INTERSECTION
- NOT
- OR
- Sorting
- Counting the results
- COUNT()
- Queries on multi-valued attributes
- Querying for multi-valued attributes
- getAttribute
- getAttributes in Java
- getAttributes in PHP
- getAttributes in Python
- getAttribute
- Summary
- Sample data
- Chapter 7: Storing Data on S3
- Amazon S3
- Buckets
- Objects
- Keys
- Pricing for S3
- Plan of action
- Creating an S3 bucket
- Creating an S3 bucket with Java
- Creating an S3 bucket with PHP
- Creating an S3 bucket with Python
- Creating additional metadata
- Creating additional metadata with Java
- Creating additional metadata with PHP
- Creating additional metadata with Python
- Uploading the songs to S3
- Uploading the songs to S3 with Java
- Uploading the songs to S3 with PHP
- Uploading the songs to S3 with Python
- Retrieving the files from S3
- Retrieving the files from S3 with Java
- Retrieving the files from S3 with PHP
- Retrieving the files from S3 with Python
- Creating an S3 bucket
- Summary
- Amazon S3
- Chapter 8: Tuning and Usage Costs
- BoxUsage
- Computing costs using BoxUsage
- Usage reports
- BoxUsage — Java
- Cost of Select
- BoxUsage — PHP
- Cost of NextToken
- Cost of Select
- Cost of creating a domain
- Cost of creating items
- BoxUsage — Python
- Partitioning
- Summary
- BoxUsage
- Chapter 9: Caching
- Caching
- Memcached
- Memcached and security
- Installing memcached
- Installing memcached client
- Memcached client in Java
- Memcached client in PHP
- Memcached client in Python
- Storing and retrieving data from memcached
- Storing and retrieving data from memcached in Java
- Storing and retrieving data from memcached in PHP
- Storing and retrieving data from memcached in Python
- Cache_Lite
- Logic flow for using caching with SimpleDB
- Using memcached with SimpleDB in Java
- Using Cache_Lite with SimpleDB in PHP
- Using memcached with SimpleDB in Python
- Summary
- Chapter 10: Parallel Processing
- BatchPutAttributes
- BatchPutAttributes in Java
- BatchPutAttributes in PHP
- BatchPutAttributes in Python
- Serialized SimpleDB requests
- Parallelizing SimpleDB requests
- Parallelizing SimpleDB requests in Java
- Parallelizing SimpleDB requests in PHP
- Parallelizing SimpleDB requests in Python
- Simple threading
- Threading with queues
- Threading with workerpool
- Concurrency and SimpleDB
- Summary
- BatchPutAttributes