Friday, June 11, 2010

NoVa Code Camp June 2010 Materials: Azure

On Saturday, June 12, I presented “Azure: The Essential Setup Guide” at the Northern Virginia Code Camp. There were several great questions today. Two immediately come to mind. As I think of the others, I’ll add them here.

  • Can multiple roles be combined to run on a single virtual machine? No. Each role runs in its own VM instances. My advice is to build worker roles that handle multiple tasks. For instance, I gave an example in class where a single worker role processes both thumbnails and PDF generation based on different queue messages.
  • Does all code need to be added to a role, including code that used to reside in separate class libraries? Azure roles simply have to reference those class libraries – just add them to your solution and add a reference to the specific role that needs the library.
  • When creating an Azure service, does it only store the code? The service definition has a specific URL as well as the data center affinity. Affinity equates to the specific regional data center to run your code. Be sure that all of your related storage and services have the same affinity! This way, the bandwidth between them is free, and the speed is very fast (all communication stays within the data center).
  • When my virtual machine’s OS is upgraded, does Azure start a new instance before taking down the old instance? Azure will take down your instance and then re-launch it in an upgraded virtual machine. If you want to avoid downtime, run a minimum of two instances; at this point, Azure upgrades in server groups and won’t upgrade all at once.

I also called out a few tips and pointers:

  • When running your web role locally, be sure that the cloud project is set as the startup project. Make sure you see your website running on something like port 81, and that Visual Studio tells you it’s starting up the development fabric. If you’re running on some high-value random port, chances are you’re running in the development server.
  • If you’re pushing code to the cloud, and you’re set up for more than one instance, be sure to delete your deployment at the end of the workday to conserve hours.
  • When debugging locally, open the dev fabric UI (the Azure flag in the system tray). You can then view each running instance and see all of your Trace statements.

Here’s the slide deck and our simple Hello Azure app:

The slide deck contains the links we discussed and visited today.

If you have any specific questions, or you recall a question or tip from class that I forgot to list above, please post a comment!

No comments:

Post a Comment