« November 2009 | Main | January 2010 »

December 2009

December 10, 2009

Cloud Storage Tools

In this post I am going to second what Remy wrote in Windows Azure Storage Made Easy, and will add one more tool as well as my own experience and preferred choice. Here is the list of the tools I looked at:

All of those tools provide graphical user interface for managing data stored in Windows Azure Storage.

 

CloudBerry Explorer for Azure Blob Storage

CloudBerry Explorer for Azure Blob Storage CloudBerry Explorer for Azure Blob Storage is a pretty neat tool that gives you the possibility to copy files from your local machine to the cloud and vice versa using familiar explorer interface. It also offers tabs, allowing you to open different local folders and remote storage accounts.

Another nice feature is Synch Folders – you can set up synchronization between a local folder and container in your storage account, and keep those in synch for as long as CloudBerry is running (you can minimize CloudBerry window to keep it resident in memory - it will clear your taskbar area, and show only the system tray icon).

Initial Experience

One annoyance that I noticed was the first run experience with the registration prompt. The process was quite confusing. First, I still don’t understand why I had to provide username but never use it after that.

CloudBerry Registration Dialog

And second, I find it hard to copy the long cryptic registration key from my web based email and paste it in the registration box.

CloudBerry Registration Key

Also for some reason F1 help never came up for me. I know I am old fashioned but I spent some time working on Windows Help, and apparently lot of people still use help. If you have the option you better make it work.

My sincere suggestion to the developers from CloudBerry Lab is to rethink the registration workflow but once you get past that CloudBerry is pleasure to use.

Limitations

CloudBerry Explorer for Windows Azure Storage can be used with Windows Azure Storage only. You cannot access storage services from other providers using the tool.

Additionally you cannot browse table and queue information with this tool.

 

Cloud Storage Studio

Cloud Storage Studio

Cloud Storage Studio certainly provides much more functionality than CloudBerry Explorer – you can browse blobs, queues and tables. Surprisingly for me you can also manage hosted services with it (hence the name doesn’t match completely:)).

Cloud Storage Studio provides rich functionality to manage your Windows Azure Storage and Hosting Services directly from your desktop.

Initial Experience

Although I was pleasantly surprised by the richness of functionality in Cloud Storage Studio, my initial experience wasn’t great. Every task that you perform requires new pop-up window that either has several tabs or bunch of buttons. The upload window didn’t fit on my laptop’s screen with resolution 1024x768, and there was no way to resize it or move it. In order to upload a file I had to guess what the labels on the buttons are (see screenshot below).

Cloud Storage Studio upload window

My personal opinion is that the UI is not usable on a machine with such or lower resolution.

Additional to that the UI is cluttered with toolbars and icons that show up in different places, and add to the confusion.

Cloud Storage Studio UI

Limitations

Cloud Storage Studio is another tool you can use with Windows Azure only. If you can get over the lack of intuitiveness in the UI you can completely manage your Windows Azure accounts (Storage and Hosting) with it.

 

Azure Storage Explorer

Unfortunately I cannot say any good words for Azure Storage Explorer. Starting with the following error prompting me to start Azure Storage Explorer with admin privileges,

Azure Storage Explorer admin privileges error

and going through the part that right-click doesn’t provide the option Run as Administrator (see below) made me thinking that Azure Storage Explorer wasn’t developed with Vista/Windows 7 security model in mind.

Azure Storage Explorer start as admin

I was finally able to start it but even then the experience wasn’t great. After configuring my storage account I couldn’t get it working – every time I was getting the following error:

Object reference not set to an instance of an object error in Azure Storage Explorer

With all this I gave up but you may want to give it a try. As it came out later though (while trying the other tools) the creation of the blobs succeeded.

 

SpaceBlock

SpaceBlock UII have already used SpaceBlock for a while – mostly for viewing my storage account and transferring sample files. It has familiar Explorer interface with window divided in two for the two storage locations opened.

SpaceBlock provides complete functionality to manage containers and blobs in Windows Azure Storage Account.

Added benefit is that you can manage not only Windows Azure Storage but also Amazon S3, Nirvanix, SQL Server Data Services and Sun Cloud Storage accounts. You can also easily transfer data from one cloud account (S3 for example) to another (Windows Azure). Of course the data is downloaded to your local machine from the first account and then uploaded to the second one, and you are limited by your downstream and upstream connection speed.

Initial Experience

The tool is quite simple and learning the functionality is not hard at all. The UI can be improved a little but at least follows common patterns and is easy to navigate through. The icons are familiar, and rarely confused me.

One annoyance is that every time you do a transfer the focus switches to the Transfers tab – I would expect to have the right side pane updated with the name of the transferred file (for some reason unknown to me, none of the tools handled this well).

SpaceBlock Transfers tab

Limitations

SpaceBlock took another approach – they decided to provide basic storage management functionality for more than one cloud service. Thus SpaceBlock is limited to managing containers and blobs only in Windows Azure Storage.

 

Conclusion

Except Azure Storage Explorer, which I wasn’t able to test at all, all others can be of use for you – either for easy blob management (CloudBerry), tables and queues (Cloud Storage Studio) or migrate data from one cloud provider to another (SpaceBlock).

Give the tools a try and let me know what you think.

December 01, 2009

Your First Application for Windows Azure

Creating your first application for Windows Azure is quite easy – Windows Azure Tools for Microsoft Visual Studio will do all the work for you. Here the steps.

Developing Hello Windows Azure Application

  1. Start Visual Studio 2010 (currently in Beta 2) in elevated mode:

    Run as Administrator

    If you start Visual Studio in non-elevated mode you will be prompted to do so later on, when you try to run your application in Development Fabric.
  2. Once Visual Studio 2010 is started select New Project and in the Installed Templates tree on the left, under Visual Basic and Visual C# you will find the option Cloud Service.

    Windows Azure Cloud Service Project

    Select .NET Framework 3.5 from the drop down because currently Windows Azure doesn’t support .NET Framework 4.0. Type the name of the project (HelloWindowsAzure in our case) and click OK.
  3. You are presented with a second dialog box where you can select the type of the role you want to develop. You can select from the following types:
    ASP.NET Web Role
    ASP.NET MVC 2 Web Role
    WCF Service Web Role
    Worker Role
    and CGI Web Role
    All of those can be developed in C# and Visual Basic; Worker Role can also be developed in F#. For our simple application you can select ASP.NET Web Role:

    ASP.NET Web Role  

    You can click on the pencil icon and change the name of the role to something more meaningful like HelloWindowsAzure Web Role for example.
  4. Once you confirm the dialog your project is created and the Default.aspx file is open in the UI. The only thing you need to do is type

    Hello Windows Azure

    Between the <div> opening and closing tags.

    Hellow Windows Azure text

Deploying the Code to Development Fabric

Development Fabric is the local environment that takes care of the deployment of your application and manages the resources for it. Deploying your app is quite easy:

  1. Right click on the project and select Build to make sure your project has no compilation errors

    Build Windows Azure Web Role
  2. Once the project is build select Debug –> Start Without Debugging (or alternatively you can press Ctrl+F5) from the menu bar.

    Run Windows Azure Application

    Of course Visual Studio will build the project once again, launch Development Fabric and submit your application for deployment. You will know when Windows Azure Simulation Environment containing Development Fabric and Development Storage is started when you see the balloon and the icon in the notification area.

    Windows Azure Simulation Environment icon
  3. Your default browser window will be opened automatically and you will see the default page of your application

    Hello Windows Azure
  4. If you are curious you can right-click on the Windows Azure Simulation Environment icon and select Show Development Fabric UI

    Show Development Fabric UI option

    Development Fabric UI gives you details about your application (also called Hosted Service as you already know:)), which will be very useful in the future for debugging.

    Development Fabric UI

Deploying Your Application to the Cloud

Once you are done with the development and testing of your application you may decide to deploy it to the cloud so everybody can see it. Once again this it done quite simple from the Visual Studio UI.

  1. You can right-click on the project and select Publish or alternatively select Build –> Publish from the menu bar

    Publish Windows Azure Applicaiton to the Cloud
    Although not perfect the workflow helps you a little with the deployment of your application. Visual Studio does two things for you:
    • Opens the folder where Windows Azure package (cspkg) and configuration (cscfg) files are in Windows Explorer

      Windows Azure package (cspkg) and configuration (cscfg) files
    • Opens your default browser and loads Windows Azure Developer Portal in it

      Windows Azure Developer Portal
  2. In Windows Azure Developer Portal you need to click on your project and select the New Service link in the upper right corner

    Windows Azure Project
  3. On the next page click on Hosted Services

    Windows Azure Hosted Services 
  4. You need to fill in Service Label and Service Description and click Next

    Hosted Service Properties
  5. On the next page you will be prompted to specify the Public Hosted Service URL that contains the Public Service Name as well as the Hosted Service Affinity Group. You can leave the Affinity Group unchanged because we are not concerned about geo-location for now.

    Hosted Service URL and Affinity Groups
  6. When you click Create your Hosted Service will be created. The Hosted Service hosts your application.

    Empty Hosted Service
  7. Click on Deploy button and on the new page select the Windows Azure package (scpkg) and configuration (cscfg) files using the Browse buttons. Also type a name for your deployment – this name is used for visual clue in the UI.

    Deploying Hosted Service
  8. Once you click Deploy your files get uploaded and then deployed on Windows Azure. Depending on the size of your files and the number of roles it may take several minutes to have the application deployed on Windows Azure.

    Windows Azure Hosted Service deployed
  9. Once the application is deployed you need to click on Run to start it. It will show Ready once it is running.

    Hosted Service in running state
  10. Now you can access your Hello Windows Azure application clicking on the Web Site URL

    Hello Windows Azure in the cloud

Summary

To summarize here is what the above process described:

  • Create Windows Azure Cloud Service project in Visual Studio 2010
  • Create Web Role in the Cloud Service project
  • Modify Default.aspx page in the Web Role
  • Deploy the service to the local Development Fabric
  • Access the local service via the browser
  • Deploy the service to Windows Azure
  • Access the service on Windows Azure via the browser

In the explanations above I used Hosted Service and application interchangeably. The official term in Windows Azure is Hosted Service, and it can contain several Web and Worker roles. Because Web Application is more familiar for Web Developers and we developer simple Web Role I allowed myself the freedom to do that.