Windows Azure offers four key data services: blobs, tables, queues,
and a database. All these services share the characteristics described in
the previous section. Let’s take a brief look at three of the four
services, as well as a glance at SQL Azure.
1. Blob Storage
The blob storage service provides a simple interface for
storing named files along with metadata. You can store unstructured data
up to several hundred gigabytes in size. Blobs are stored together in a
container, which is roughly analogous to a
directory in a normal filesystem. Each blob and container has a unique
URL, and blobs can be created, deleted, updated, and accessed through
the REST API.
Containers are also used to set permissions and access control
policy. Set a container to be publicly accessible and any blobs under
that container can be accessed by anyone over the public Internet. Since
everything works over HTTP, this access can be as simple as typing the
blob’s URL in a web browser. Under the covers, all blob data is
replicated multiple times to ensure that no data loss occurs in case of
hardware failure. Moreover, the system scales automatically when under
load, so even if your blobs are being heavily accessed, you won’t see a
drop in performance.
Blobs are also the underlying storage mechanism for a feature
called Windows Azure XDrives. These are NTFS volumes in the cloud that
are backed by blob storage. This lets you use normal filesystem access
code, which in turn writes to blob storage underneath.
2. Queue Storage
Queues provide reliable storage and delivery of messages for your
application. At a high level, they are similar in concept to MSMQ, IBM’s
WebSphere MQ, or other queuing systems. However, the actual
implementation is different from MSMQ, and the two technologies have
Queues are typically used to compose different parts of an
application. Applications can enqueue an unlimited number of messages,
and can be guaranteed that the messages are delivered at least once.
Like the other Windows Azure storage services, the queue service is
accessed using a REST API, and can be accessed from the public Internet.
3. Table Storage
Table storage enables you to store massive amounts of structured data
cheaply and efficiently, and query over the tables. This is used in the
same way relational databases are used, but table storage differs
significantly from traditional RDBMSs. Data is stored in the form of
entities, each with a set of
properties. However, there is no fixed schema for
each table. Every row/entity can have a different set or number of
Application developers have precise control over how this data is
partitioned physically using partition keys.
Picking the right partition key is critical, since the selection also
affects query performance. Speaking of queries, you can’t query table
storage with SQL since it isn’t a relational store. Instead, you can use
an ADO.NET Data Services REST interface (or write LINQ code using the
.NET wrapper) to perform queries against your entities. Querying support
is not as rich as SQL—you have access to a limited subset of query
In return for giving up some of the power of SQL, you get almost
unlimited scale. Several applications routinely write millions of
entities every day to their tables. There are no indexes to tune or
database administration to perform—the system takes care of optimizing
queries and other storage operations.
4. SQL Azure
While Windows Azure table storage is optimized for cheap and highly scalable
storage, SQL Azure is focused more on bringing SQL Server to the cloud.
With SQL Azure, you can work against a SQL Server database with your
normal tools and code, except that the actual database is running in
Microsoft’s data centers.
As mentioned, the following chapters dig into each of these
services in depth. In the remainder of this chapter, you’ll learn how to
get started with a storage account, and how the REST API access to these
storage services looks. You’ll also learn about some common tools that
you can use to help develop code and manage these services.