When Written: Dec 2008
This is the starting point for Azure
On a different tack, there is lots of talk about Cloud Computing and Microsoft has announced development tools for Azure, their version. The idea with Cloud computing is that you put your application and data on interconnected third party servers in a virtual ‘Cloud’. Your application is shared across these servers and is not hosted nor is dependant on any one single server. This makes the hosting solution very resilient and immensely scalable. This collection of server farms around the world will host your solution and balance the load to it dependant on the number of user visits. The obvious advantage of this way of hosting is that you have no need to run your own servers and upgrading to handle more requests is often automatic or simply by adding an extra line of code. The implementation of an Azure application is claimed to be simplicity itself with the launch of the Azure SDK and the Azure Tools for Visual Studio 2008. So I thought it would be fun to have a play.
Reading the installation notes I saw that these tools had to be installed either on Vista or Windows server 2008. So I fired up a spare virtual Windows Vista machine and there then followed two days of downloading and installing the necessary patches and applications. First Vista had to have Service Pack 1 on, but to do this the Vista installation had to be fully patched with Windows Update before it even suggested that I could install Service Pack 1. The downloads, various installs and reboots caused no real problems except the length of time spent doing them. Next .Net Framework 3.5 needed to be installed after which it needed upgrading to .Net Framework 3.5 Service Pack 1. Visual studio 2008 was then installed with its own Service Pack 1. Next Internet Information Server with Asp.Net support had to be installed and enabled. Sql Server Express 2005 or 2008 was the next program that was installed. If you install the 2005 version you will then need to install Sql Server 2005 Service Pack 2 or later. Now at last we were ready to install Azure SDK. If you have installed all the previous items this goes on surprisingly easily. Finally you need to download and install Windows Azure Tools for Visual Studio 2008 which although I had installed the required Visual Studio 2008 Service Pack 1, it reported that some pre-Service Pack 1 components had been installed so I had to re-install the Service Pack 1 for Visual Studio 2008! At this point I was very close to giving up on this roundabout of downloads and installation of various components and their patches. Another 40 minute download later followed by an hour install and a reboot I was ready to try to install the Azure Tools for Visual Studio again. At last there was success! The reason for these installing these tools for Visual Studio is to make it aware of Azure and to provide an easy way of creating an Azure aware project.
Once setup, creating an Azure application is a breeze in Visual Studio 2008
After this marathon of program installation which one is left feeling could have been made simpler, a quick fire up of Visual Studio 2008 shows an extra option when creating a project of ‘Cloud Service’. Here you can create four types of Cloud services, a simple blank one, a web one, a worker one and a web and worker one. I will come back to these basic types later, but for now lets us try ‘Cloud Web Service’ . This creates a project with the necessary files. You then create your killer app, in this case I added a text box and a button to the default.aspx page, just to test things. You can then run and debug your app locally just as you would with any Visual Studio project. The first time you do this the system has to make some changes to the configuration of your machine and set up the SQL Database so it takes a little time. Assuming your web application runs fine which mine did, let’s face it if something as simple as that did not work then we would be in trouble. Microsoft calls this debugging environment ‘ The Cloud on your desktop’ as it fully emulates the Cloud environment so if your app works here it should work for real out on the Cloud, but it also gives you breakpoints and single stepping with variable watch, all the things you would expect in a modern development environment. This is one of the more compelling reasons for developing your Cloud applications, as debugging some of the competitor’s environments can be very tricky.
Creating an application space on the Azure Cloud
The next stage is to publish your project to the Cloud. To do this you must have previously registered to Azure and requested tokens for whatever services you wish to use, in this case Azure Hosting. The allocation of these tokens is done depending on the capacity of the current Azure system so you may have to wait for your tokens to come through. The publish option creates just the files needed to run your application on the live web servers in the ‘Cloud’. It then opens a browser which takes you to your Azure area with the option to create a new project. Just fill in the text boxes for such things as ‘project name’ and ‘URL of project’ and then the project area will be created and the files will uploaded. Once the system has created this solution, a password will be generated, don’t lose this! When the upload is finished you can test your Azure application by pointing a browser to the URL you specified. Apart from the setting up of the development environment it really is quite easy and trouble free.
You can use the Azure Cloud to host any ASP .NET application apparently, at present the service is free but the billing modules are shown as ‘to follow’. So now you can forget about having your own servers and the worry of bandwidth requirements, your web application will scale to capabilities you could only have dreamt of in the past. Your servers and data will be backed up and you can sleep easy knowing that your web application will be available 100% of the time. All this is promised, so will I be porting all my web apps to Azure? Will I be recommending that my clients host their future apps in the Cloud? Sorry Microsoft, but for now I will not. This is not just because it is an early release of the development environment but because Azure comes from a company that in the past has shown a desire for ‘coolness’ and functionally over security.
Time and time again there has been a security flaw that needs to be patched. Should Azure become vulnerable or they have to patch it in such a way as it breaks your application, what course of action would you have against a company the size of Microsoft or for that matter any of the ‘cloud’ providers like Google and Amazon. How secure will your company data be when hosted out on the Cloud? Sure, such arguments could be made against you own servers, but that is the point. They are your own and you have full control over them and their data. Cloud computing does offer great possibilities for many future solutions, but a panacea for all the internet’s hosting problems, it ain’t.
Article by: Mark Newton
Published in: Mark Newton