Wednesday, June 6, 2012

Developing applications for Windows Azure.


So we continue to get acquainted with your platform Windows Azure. In this post I will try to describe how data is stored in the cloud. I think everyone will agree with me that more or less serious modern applications can not live without storing various data. Today, there are two basic approaches to data storage - it is relational and nonrelational. Both approaches are implemented in Windows Azure. to relational.
is SQLAzure, which I 'll discuss in subsequent posts, non-relational to a Windows Azure Storage, and about which to be discussed today.
In the first place to start using all the opportunities WA Storage to create an account with dev- portal in subsection Storage Accounts. After that, we are able to use the following methods of data storage:.



  1. Blobs - named simple files containing in itself apart from the actual data and some metadata.



  2. Tables - structured storage. Tables are composed of entities, each of which contains a set of properties.



  3. Azure Queues - reliable mechanism for storage and delivery of messages that can be used by our applications.



  4. Drives - Reliable NTFS drives for our Windows Azure Applications. Based on blobs.


Each of them has a universal REST interface that allows you to access it with any client. It is natural to abstract from the details of interaction with the service created a library that can make full use of. Let's start with perhaps the blobs. Internally, the device is convenient to display the visual blobs:.


Blob Storage Concepts

As you can see at the top of the hierarchy is our account. Each account can have an unlimited number of containers, which are essentially a way of logical union of blobs. Each container can contain an unlimited number of blobs. Finally, the internal structure of the blob can be represented in the form of blocks or pages. If we analyze the technical implementation of the 2 species, we obtain the following picture:.
































block blobs.



paged blobs.



The main difference from the competitor.



Optimized for sequential access.



Optimized for random access.







The internal structure.



Each blob consists of a sequence of blocks, each of which has its own internal identifier.



Each blob consists of a sequence of pages, each page is identified by a shift from the start of the blob.



The maximum size of a blob.



200 Gb.



1 Tb.



Multiple Access Control.



Optimistic locking (using ETag- s).



Optimistic and pessimistic locking.



For more information on the application scenarios of various blobs, I 'll discuss in future posts. A very important feature, which I would say - is that we are not limited to the 2-level hierarchy. With the help of a special mechanism for naming the blobs can build a deeper virtual hierarchy, thus emulating a disk subsystem. An alternative to this approach is the technology of Windows Azure Drives. In fact, this disc is a virtual hard disk (. VHD. ) Built on top of the page blob. The main advantages of this technology are as follows:.



  1. Ability to use existing classes. BCL. from the space System. IO. Thus, there is no need to change anything when porting existing applications to the cloud, if they are based on the file subsystem and use the standard NTFS API.



  2. The possibility of mounting and unmounting of disks on the fly.



  3. Resistant to falls instance applications and ensure data integrity in an emergency.



  4. The local cache on each application instance increases read performance.



  5. Supports remote mounting using an API.



  6. You can download the VHD to a local file and install locally.


It should be noted that the application instance has the ability to mount no more than 16 disks and the size of each is limited to 1 terabyte (that comes up from the page limitations blob ).
Shoving the results, we found that Azure provides us the means of relational data storage and also non-relational. Scratched the surface of non-relational data storage technology, as well as the mechanism of blobs and disks. In the next post will try to add more code to demonstrate the use of blobs, as well as talk about other mechanisms for storing data: Tables (Windows Azure Storage Tables) and queues (Windows Azure Storage Queues). Thank you for your attention!.

Related Topics:.


No comments:

Post a Comment