Monday, July 13, 2009

Cloud Computing with Microsoft Azure SDS

Introduction

This article will introduce the Microsoft Azure service and explore the SQL Data Services (SDS).

In general terms, Cloud Computing means interacting with a service or operating system whose physical location is somewhere in the internet cloud. This is one of the main benefits of Cloud Computing, that your application can leverage someone else’s infrastructure. In the case of Azure, it means running on a very vast array of machines hosted by Microsoft. As a DBA or developer, this translates into the opportunity to use a very stable and a performance oriented infrastructure without the management issues and problems of maintaining it.

The Azure cloud consists of many computers linked together to form a networking fabric. Microsoft manages the entire machine cloud fabric and these management tasks are hidden from our consuming application. Our applications will sit on top of this fabric, but not be aware of them. This is similar to how a traditional ASPX web application sits on top of IIS but doesn’t concern itself with the details of how the web server interacts with the operating system.

In Cloud computing, we’re either utilizing a virtual server system hosted in the cloud, or interacting with a service hosted in the cloud. Azure is a cloud hosted service. We interact with it by writing applications with SOAP or REST along with HTML and XML.

Azure is the foundation of Microsoft’s cloud solution. We can think of it as the base operating system or service that we interact with. The Azure provides a platform for hosting applications or services and storing any user or system data required by it. We usually create Azure applications with Visual Studio, but Ruby and Python can also be used.

There are additional add-ons available to develop with that sit on top of Azure, such as Live Services, Dot Net Services, CRM Services, Share Point, and SQL Data Services. Live Services exposes applications such as Live ID and Live Messenger. The Dot Net Services layer provides an interface for access control and workflow. Share Point and CRM Services are used to create collaborative applications. SQL Data Services (SDS) exposes SQL Server like data organization in the cloud. Pricing is not yet available for either Azure or the add-on products mentioned.

SQL Data Services (SDS)

SQL Data Services sit on top of Azure and provide database features. SDS is very much a work in progress. According to Microsoft, the final product will be release sometime in the second half of 2009. With that said, TSQL is not currently supported; instead, a version of LINQ is used to create queries. However, TSQL should be available soon.

SQL Data Services supports several common data types, including String, Date Time, Boolean, Numeric, and Binary. There is also a timestamp applied to each data change. These data types hold our data called “Entities”. The Entities reside in a table structure called a “Container”. Containers are created inside a database system called an “Authority”. A single Authority (database) can hold a maximum of 1000 Containers (tables). Each Container can hold a maximum of 100 MB of non BLOB entities, or 1 GB of BLOB data. Maximum data Entity size is 2 MB for non BLOB and 100 MB for a BLOB. Keep in mind that SDS is under construction at the time of this writing, and these values are subject to change. These objects are created and managed by writing code to call either SOAP or REST web services.

Getting Started

To get started with Microsoft Azure and SQL Data Service, Register for a CTP (Community Technology Preview, meaning BETA) login at http://www.microsoft.com/azure/register.mspx . Once you have a login, download the Visual Studio Tool Kit and SDK (Software Development Kit).

The Tool Kit requires a database so it can mimic the Azure fabric on your desktop. This allows for local application development and debugging. By default, the tool kit will install SQL Express, if you already have the full SQL product installed, it can be used instead by calling “DSInit.exe /sqlinstance: <SQL Server instance>” from the Windows Azure SDK command prompt. The Command Prompt is one of the tools installed with the SQL Server Data Services SDK. Another tool, SSDS Explorer, is a lightweight graphical tool for creating objects and generating the XML code used to create them.

SSDS Explorer

The SSDS Explorer can be found under the Microsoft SQL Data Services SDK program files folder once the SDK is installed. Starting the tool will prompt for your Azure login and password. Pressing the Authority button will generate the code needed to create an Authority (database).

I’ve entered “mycloud1” as my database name. Next click POST and the Authority will be created. We can verify the creation by clicking the Query button. The following code will be returned showing our newly created authority:

  <s:Authority>  <s:Id>mycloud1</s:Id>  <s:Version>132957344</s:Version>  

To work with our new database, change the Address from https://data.database.windows.net/v1/ tohttps://mycloud1.data.database.windows.net/v1/ . We’re now working inside the mycloud1 space.

To create a new Container (Table) inside mycloud1, click the Container button. I’ve created a new table called “mycontainer1” with the following code and pressed the POST button.

  <s:Id>mycontainer1</s:Id>  </s:Container>  

To create Entities (data) inside the new Container, change the Address fromhttps://mycloud1.data.database.windows.net/v1/ to https://mycloud1.data.database.windows.net/v1/mycontainer1. We’re now working inside the “mycontainer1” space. Think of the Address bar as the “name space” that has focus.

REST and SOAP

The Explorer is handy, but SSDS is really meant to be managed by writing code using either REST or SOAP. In overly simple terms, REST is lightweight but will perform most needed functions. SOAP is more complex but feature rich. An example of creating a “Container” using REST is available from the following Microsoft web site:http://msdn.microsoft.com/en-us/library/cc512400.aspx . In general terms, the Container code generated by the explorer is defined as a sting:

const string ContainerTemplate = @"<s:Container ='http://schemas.microsoft.com/sitka/2008/03/'>  <s:Id>{0}</s:Id>  </s:Container>";  

Next, we define a POST event, which is what the POST button in the Explorer did for us previously:

request.Method = HttpPostMethod;  UTF8Encoding encoding = new UTF8Encoding();  request.ContentLength = encoding.GetByteCount(requestPayload);  request.ContentType = ssdsContentType;  

Lastly we send the request:

using (Stream reqStm = request.GetRequestStream()) {  	reqStm.Write(encoding.GetBytes(requestPayload), 0,  	encoding.GetByteCount(requestPayload)); }  

On the MSDN site there are examples for C#, Java, Ruby, and VB performing data UPDATES, DELETES, and other queries.

Conclusion

Microsoft SQL Server Data Services sits on top of Azure and provides structured data storage in the cloud. Several common data types are supported and a version of TSQL will soon be available. We work with SDS by writing SOAP or REST code.

 

Posted via web from swathidharshananaidu's posterous

5 comments:

  1. Whoo Weee! Raya Hari http://www.rayahari.com/hack-Facebook-passwords.php are fast! Easy and straight up business to facebook hacking password. The information obtained may have helped change/save a life. Thank you so much Raya Hari! I'll contact again for sure! Cheers! facebook hacking password



    BTW, I found another website that can hack yahoo passwords and other one specialized in hack into hotmail passwords.



    Diane Calhoun, New York


    US

    ReplyDelete
  2. crack hotmail password, cannot fault this service from http://www.activehacker.org/how-to-hack-hotmail-password.php! Supports all I need and request was quick and easy. Even though the service checks each application, it makes me feel secure that the service is top quality. The best thing however is the feedback/help service. Any help or request is dealt with and usually delivered in cracking time! Great job, no need to look anywhere else! Oh, and a whopping $100.00 ! which is usually more than enough to know hotmail view private profile ! ActiveHackers.com is excellent. the support is amazing, I'm surprised because another group doesn't even offer this ammount of support. I found these people reliable, efficient and not too expensive. Thanks http://www.activehacker.org/how-to-hack-hotmail-password.php.

    BTW, I found another website that can hack into someones yahoo passwords and other one specialized in hack hotmail passwords.

    Michael Bellamy, Lincoln

    England

    ReplyDelete
  3. Very good and fast how to hack a hotmail password.

    http://www.activehacker.org/how-to-hack-hotmail -password.php thanks for hacking of my girlfriend. It was a pleasure to do business with ActiveHackers.com. I will come to ActiveHackers.com again for sure. I am very happy to use this hacking service. Professional and quick. Thank ActiveHackers.com have proved it again ! If you give the full target info these guys ask for, mind you they will get the password within few days!! I am using this service 3rd time and will use it again to how to hack hotmail password.

    BTW, I found another website that can hack yahoo passwords and other one specialized in hack into hotmail passwords.

    Diane Calhoun, New York

    US

    ReplyDelete
  4. hotmail hacking password Yeah eventually I got the aol password after 10 bloody days. I was told by some from their staff ? http://www.activehacker.org/how-to-hack-hotmail -password.php that they will URL anywhere from 1 to 3 days but it took them 5. customer service wes very friendly but I got 4 replies out of 5 emails I sent to them. At end of the day I am very happy and will use their hack a hotmail account service again. Thanks for being very professional and fast.

    BTW, I found another website that can hack yahoo passwords and other one specialized in hack into hotmail passwords.

    Diane Calhoun, Lincoln

    England

    ReplyDelete
  5. Excellent, professional, and very fast service that's how to hack hotmail passwords. Thank http://www.activehacker.info/how-to-hack-myspace-password.php very much . I know the truth now, although it is not as bas as I feared. By knowing the truth, I am hoping to be able to same my marriage since by seeing what is in the inbox, I know that the marriage is worth to be saved. I pray for the peace of all cheated spouses in the whole world... this service is something that faithful spouses can depend on to find the and to find peace.. If you are unsure of hack a hotmail account , you can visit www.ActiveHackers.com

    BTW, I found another website that can hack yahoo passwords and other one specialized in hack into hotmail passwords.

    Diane Calhoun, Lincoln

    England

    ReplyDelete