logo
follow us On Twitter Follow us on Facebook Gladinet Cloud Storage Blog Support forum
DOWNLOAD PURCHASE PRODUCT

Tuesday, January 26, 2010

If you know C#, you know Windows Azure Storage

I have been using Gladinet Cloud Desktop to manage files on the Azure Blob Storage for a while now. It has a drive letter, accessible from Windows Explorer and it works just like another network drive on my PC.

However, just like when you are driving a car on a daily basis but sometimes still curious about what is under the hood and check the oil level on weekends, I am curious about how Azure Storage works.



image

To dive into the Azure Storage, you will need the Azure SDK (Nov 2009 Release) to work with Visual Studio 2005 or VS08. VS 2010 will have Azure SDK built in.

First, you will need to have some basic knowledge about the Azure Blob Storage. As shown in the following picture, Each Windows Live ID (Master Azure Account) can have multiple projects (Accounts). Each Account has multiple containers. Each containers may have multiple Blobs. Each Blob may have multiple blocks.  After you know this, the rest will be just C# and .NET.
Presentation2

After you download and install the Azure SDK, you will notice that you have several new assemblies to reference.
image

The following two lines are all that you need to start coding.
image
Step 1: Get a reference to the Account using the CloudBlobClient Class
image
Step 2: Get a reference to the Container Object
image
You can also use the ListContainers method to get all containers.
Step 3: Get a reference to the Blob Object, after you have the CloudBlobContainer reference.
image

Step 4: Now you get a reference to the CloudBlob Class
With a CloudBlob object, you can start uploading using the OpenWrite method. You can start downloading using the OpenRead method. With the Visual Studio’s IntelliSense, coding it up is so easy!

If you know C#, it is guaranteed that you can start coding to the Azure Blob Storage in 30 minutes. You can start manipulating Azure Blobs in about 10 lines of code! Cloud Computing could be so easy.

If you are curious about what is behind the Azure Network Drive in the Gladinet Cloud Desktop, you can dive in with Visual Studio to probe around.

If you know C#, you know Azure Storage already.

No comments: