This article throws light on storage in Windows Azure. When it comes to large storage, there are certain things that need to be understood. Windows Azure offers a wide range of storage services supporting virtually all types of storage needs, from structured to unstructured data, NoSQL databases, and queues.
How is data stored in the Cloud
As far as Windows Azure goes it has four form of storage and they are:
- Blob storage
- Queue storage
- Table storage
- Windows Azure drive
Let us try to get a generic explanation for each of them!
Blob is an acronym for Binary Large object. Basically Blob is a sequence of bytes – just what an application needs. Blob can hold audio, video, email messages, archived files, zip files or a word processing document in a very general way.
To use blobs, a developer first creates one or more containers in some storage account. Each of these containers can then hold one or more blobs. There are two types of blob storage available, each provides specific functionality:
1) Block Blob
2) Page Blob
Blobs are stored in and scoped by Blob Containers. Each blob can be up to 50GB. A blob has a unique string name within the container. Blobs can have metadata associated with them, which are <name, value> pairs and they are up to 8KB in size per blob. The blob metadata can be set separately from the blob data bits.
The main goal of queues is to allow communication between different parts of a Windows Azure application. In simple words Queues separate Web Role instances and Worker Role Instances – A queue contains many messages – The queue name is scoped by the account.
- There is no limit on the number of messages stored in a queue.
- A message is stored for at most a week. The system will garbage collect the messages that are more than a week old.
- Queues can have metadata associated with them. Metadata is in the form of <name, value> pairs, and they are up to 8KB in size per queue.
A conventional queue may offer semantics of ‘first in first out’; on the other hand queues in Windows Azure don’t guarantee that a single message can be delivered multiple times.
Processing messages from a queue is a two-stage process, which involves getting the message, and then deleting the message after it has been processed. This pattern guarantees successful message delivery.
Table storage is a collection of row like entities, each of which can contain up to 255 properties; however unlike tables in a database, there is no schema that enforces a certain set of values on all the rows within a table. Table Storage is used by applications requiring storing large amounts of data storage that need additional structure.
While a table stores structured data, it does not provide any way to represent relationships between the data, sometimes called a NoSQL database. Tables in Windows Azure open up room for scalability. It makes sense for developers to design scalable applications. Just design a table and add some entities then Windows Azure take cares of the rest.
The goal here is to help developers to focus on their application development rather than worrying about large data management.