Networking

Amazon's SimpleDB makes it easier to work with data

Amazon says that its SimpleDB offering simplifies data management. Developer Tony Patton takes a closer look at this beta offering to try to determine if Amazon keeps its promise.

When you develop Web-based services, it can be difficult to achieve the goal of simplification. Working with the plethora of Web services offered by companies such as Google and Amazon provide plenty of examples, but these examples utilize complicated code to use the valuable services. This is why I was intrigued by Amazon's recent announcement that its SimpleDB offering simplifies data management. I decided to take a closer look at this beta offering to try to determine if Amazon keeps its promise.

Working in a cloud

A key concept with Amazon and many of its Web services is cloud computing. Wikipedia defines cloud computing as a computing paradigm shift in which computing is moved away from personal computers or an individual application server to a cloud of computers.

In the case of Amazon, the cloud is the Internet; that is, the Internet is what removes hardware and network from the equation for developers. Amazon's numerous service offerings expose their functionally via APIs that are called over the HTTP protocol. Thus, you may build a powerful Web application that uses services via the cloud.

SimpleDB also takes advantage of Amazon Simple Storage Service (Amazon S3) and Amazon Elastic Compute Cloud (Amazon EC2). The combination provides developers with the ability to store, process, and query data sets in the cloud via scalable architecture provided by Amazon.

The basic premise

SimpleDB is a Web service for running queries on structured data in real time. Most developers have experience working with relational data stored in backend database systems such as MySQL, SQL Server, PostgreSQL, and so forth.

The SimpleDB APIs allow developers to easily create SimpleDB-based data and manipulate this data. Developers only have to focus on the data as opposed to spending time on database server setup and maintenance when working with their data storage infrastructure. Amazon provides a simple cost structure whereas you are charged a standard rate for data transfers and data storage — it offers a friendly pay-as-you-go pricing model.

The concepts

SimpleDB removes some of the constraints associated with relational database systems. For instance, SimpleDB-based data is organized into domains. All data contained in the domain may be queried. Domains are comprised of items, and items are described by attribute-value pairs.

Amazon uses the analogy of comparing SimpleDB-based data to a spreadsheet. The following list defines the various concepts associated with SimpleDB.

  • Customer Account: A user's SimpleDB account may be thought of as a spreadsheet; it may contain multiple individual sheets.
  • Domains: The individual sheets within the spreadsheet container are called domains. Domains are analogous to tables in the relational database world. Queries and all data operations use domains as their data source. The SimpleDB service maintains multiple copies of each domain, thus built-in data redundancy.
  • Items: The individual rows within domains (individual sheets) are called items. These items may contain one or more attribute name-value pairs.
  • Attributes: The individual columns within a domain or sheet are called attributes; they represent categories of data that can be assigned to items.
  • Values: The individual cells within a domain or sheet are called values. Values are instances of attributes or the actual values.

These concepts offer a simple approach to working with structured data (even though concepts can be a little confusing at first).

Using the service

SimpleDB has a small set of APIs that provide everything you need to work with SimpleDB-hosted data. These APIs allow you to create and work with domains, as well as the individual items, attributes, and values contained in individual domains. The following components are involved in SimpleDB transactions:

  • Subscriber: Any calls to the SimpleDB Web service use a unique access key for identification and billing.
  • Request: A call and its data to the SimpleDB Web service.
  • Response: The response and its data from the SimpleDB Web service.

Amazon provides plenty of sample SimpleDB code; however, access is restricted because the service is still in beta.

Performance

So how does SimpleDB stack up to a database system like MySQL in terms of performance? A key issue with SimpleDB is that each request is sent over the network via HTTP; this could introduce performance issues even though Amazon has a solid infrastructure.

A way to address performance issues could involve a cache between the Web application and SimpleDB, issuing batch requests as opposed to numerous small requests and so forth.

A key concept with SimpleDB is not that it will replace your existing relational database system, but that it provides an opportunity to offload some services or application layers via a scalable service. Check out Amazon's discussion forums to see what others are doing with the service.

Exciting offering

I am excited about SimpleDB because it provides an easy way to provide a data source for a Web application. While I do not envision SimpleDB replacing relational database systems across the world, I recognize its potential for smaller Web applications; it could also provide special services to larger applications such as user data maintenance. The applications are restricted to developer ingenuity.

SimpleDB is still in beta, so it remains to be seen when it will be released to the public. Do you envision yourself using or taking a look at SimpleDB? Can you think of any drawbacks with the offering? Share your thoughts with the Web Developer community.

Tony Patton began his professional career as an application developer earning Java, VB, Lotus, and XML certifications to bolster his knowledge.

———————————————————————————————————————————-

Get weekly development tips in your inbox Keep your developer skills sharp by signing up for TechRepublic's free Web Developer newsletter, delivered each Tuesday. Automatically subscribe today!

————————————————————————————————————————————

About

Tony Patton has worn many hats over his 15+ years in the IT industry while witnessing many technologies come and go. He currently focuses on .NET and Web Development while trying to grasp the many facets of supporting such technologies in a productio...

Editor's Picks

Free Newsletters, In your Inbox