Monthly Archives: July 2011

July Boston Azure User Group – Recap

The July Boston Azure User Group meeting had a tough act to follow: the June meeting included a live, energy-packed Rock, Paper, Azure hacking contest hosted by Jim O’Neil! The winners were chosen completely objectively since the Rock, Paper, Azure server managed the who competition. First prize was taken by two teenagers (Kevin Wilder and T.J. Wilder) whose entry beat out around 10 others (including a number of professional programmers!).

This month’s July Boston Azure User Group meeting was up for the challenge.

Hope to see you at the Boston Azure meeting in August (Windows Phone 7 + Azure), two meetings in September (one in Waltham (first time EVER), and the “usual” one at NERD), and then kicking off a two-day Boston Azure Bootcamp!

Details on ALL upcoming Boston-area events of interest to Azure folks (that I know about) can be found in this blog post about Boston-events in August and September. Those hosted by Boston Azure are also at www.bostonazure.org and the upcoming events page.

About these ads

August and September Azure Cloud Events in Boston Area

Are you interested in Cloud Computing generally, or specifically Cloud Computing using the Windows Azure Platform? Listed below are the upcoming Azure-related events in the Greater Boston area which you can attend in person and for FREE.

[Note - this post originally was mis-titled to say July and August instead of the correct August and September. I have not changed its URL, but did fix the title.]

Since this summary page is – by necessity – a point-in-time SNAPSHOT of what I see is going on, it will not necessarily be updated when event details change. So please always double-check with official event information!

Know of any more cloud events of interest to the Windows Azure community? Have any more information or corrections on the events listed? Please let us know in the comments.

Events are listed in the order in which they will occur.

August Events

1. Boston Azure User Group meeting: Special Guest John Garland on Windows Phone

  • when: Thu 25-Aug-2011, 6:30 – 8:30 PM
  • where: Hosted at NERD Center
  • wifi: Wireless Internet access will be available
  • food: Pizza and drinks will be provided
  • cost: FREE
  • what: Windows Phone 7 expert John Garland (a Senior Consultant at Wintellect) is the featured speaker. John’s presentation will show how the Windows Azure Toolkit for Windows Phone 7 can be used to quickly create Azure-enabled applications for the Windows Phone platform.  This talk will also include a discussion of some of the new features available in the Windows Phone “Mango” release due later this Fall (update), and how they can be used to further enhance the experience of working with Azure-based applications.
  • more info: See the Boston Azure cloud user group site for more info, or join the (low volume) Boston Azure mailing list to keep most up to date
  • register: here
  • twitter: #bostonazure

September Events

2. Vermont Code Camp 2011

While not strictly a “Boston-area” event, this may be of interest still. I attended Vermont Code Camp 2010 as both an attendee (hitting lots of great sessions) and as a speaker (spoke about Azure, of course). There was a great deal of buzz and energy at the event. There was also major swag – some really good stuff. I don’t know what this year will hold, but they did set a pretty high bar last year across the board. I will be attending again this year (and have proposed a talk: Applying Architecture Patterns for Scalability and Reliability to the Windows Azure Cloud Platform). Hope to see you there!

  • when: Saturday, September 10, 2011 8am6pm
  • where: Kalkin Hall on the University of Vermont campus in Burlington, VT
  • wifi: (I think so)
  • food: (Pretty sure)
  • cost: FREE
  • what: It’s a Code Camp! (from http://vtcodecamp.org/):  “Last year’s event had four rooms with sessions on .NET, PHP, Ruby, Python, and more. Two of the rooms had .NET topics and another had sessions on free/open source software. There was a fourth room where developers were introduced to various technologies that they may not use every day. Check back for details about Vermont Code Camp 2011 or follow us on Twitter.”
  • more info: http://vtcodecamp.org/
  • register: http://vtcodecamp.org/register/
  • twitter: @VTCodeCamp

3. Cloudy Mondays

  • when: Mon 19-Sep-2011, 5:00 – ?:?? PM
  • where: Venture Development Center, 100 Morrissey Blvd, Boston, MA
  • wifi: (not sure)
  • food: (not sure, though food and beer were offered last time)
  • cost: FREE
  • what: (topics not posted yet, though generally cloud and cloud startup-related)
  • more info: http://www.meetup.com/Cloudy-Mondays/
  • register: here
  • twitter: (not sure)

4. Boston Azure User Group meeting in Waltham: Special Guest Thom Robbins!

In this special event, the Boston Azure User Group is combining forces with both the Boston .NET Architecture Study Group and the New England ASP.NET Professionals Group to host this talk from Thom Robbins. Note the location is Waltham (not NERD).

  • when: Wed 21-Sept-2011, 6:00 – 8:30 PM
  • where: Hosted at Microsoft Office in Waltham (201 Jones Road, Waltham, MA 02451 – come to the 6th floor) – ample free parking is available
  • wifi: Wireless Internet access is NOT available to attendees
  • food: Pizza and drinks will be provided
  • cost: FREE
  • what: Special Guest speaker is Thom Robbins

Kentico CMS: A Case Study in Building for Today’s Web

Building software is a set of smart choices to meet the needs of your customers and the possibilities of technology.  Today’s Web demands that customers have a choice in how they deploy their applications. With over 7,000 websites in 84 countries, Kentico CMS for ASP.Net is delivered as a single code base for use as a cloud, hosted, or on-premise solution. With over 34 out of the box modules and everything built on a SQL Server backend – How did we do it?  What tradeoffs did we make? In this session we will answer that question and look at how to build a rich and compelling website using Windows Azure.

About Thom Robbins

Thom Robbins is the Chief Evangelist for Kentico Software. He is responsible for evangelizing Kentico CMS for ASP.NET with Web developers, Web designers and interactive agencies. Prior to joining Kentico, Thom joined Microsoft Corporation in 2000 and served in a number of executive positions.  Most recently, he led the Developer Audience Marketing group that was responsible for increasing developer satisfaction with the Microsoft platform. Thom also led the .NET Platform Product Management group responsible for customer adoption and implementation of the .NET Framework and Visual Studio. Thom was also a Principal Developer Evangelist working with developers across New England implementing .NET based solutions. A regular speaker and writer, he currently resides in Seattle with his wife and son. He can be reached at thomasr@kentico.com or on Twitter at @trobbins.

5. Boston Azure User Group meeting: Special Guest Brian Prince!

  • when: Thu 29-Sep-2011, 6:00 – 8:30 PM
  • where: Hosted at NERD Center
  • wifi: Wireless Internet access will be available
  • food: Pizza and drinks will be provided
  • cost: FREE
  • what: Brian Prince – from Microsoft, and co-author of the most excellent Azure in Action book – is our featured speaker.
  • more info: See the Boston Azure cloud user group site for more info, or join the (low volume) Boston Azure mailing list to keep most up to date.
  • register: (will open in early September)
  • twitter:

6. Boston Azure Bootcamp

  • when: Fri/Sat Sep 30 – Oct 1 (full days, but start/end times are tbd)
  • where: Hosted at NERD Center
  • wifi: Wireless Internet access will be available
  • food: Expected to be provided, but details being worked out
  • cost: FREE
  • what:This free event is a two-day, hands-on bootcamp with the goal of learning a whole lot about the Windows Azure Platform. The primary programming environment will be Visual Studio 2010 (a free version is available). Coding will be primarily done in C#. (Other programming environments and other languages are available for Windows Azure. If you plan to program in other than Visual Studio and C#, please let us know it advance in the “Any Other Comments” section of the sign-up form.)The two days will largely consist of a sequence segments where important general topics in cloud computing will be introduced, and the Windows Azure approach will be discussed in detail. Each of these segments will include both a lecture by an Azure expert followed by a hands-on lab where you code a basic solution to get these concepts to really sink in. Azure experts will be in the room to help you with any questions or issues during labs.At the end of this two days, you will have learned key cloud and Windows Azure concepts, and have hands-on experience building, debugging, and deploying real applications. You need bring your own Azure-ready laptop – or let us know on the signup form if you would like a loaner – or would like to pair with someone for the coding part.
  • more info: See the Boston Azure Bootcamp page on Eventbrite for more info
  • register: Registration is LIMITED BY SPACE - register here
  • twitter: #bostonazurebootcamp

Omissions? Corrections? Comments? Please leave a comment or reply on the Twitters!

Talk: Architecture Patterns for Scalability and Reliability in Context of Azure Platform

I spoke last night to the Boston .NET Architecture Study Group about Architecture Patterns for Scalability and Reliability in Context of the Windows Azure cloud computing platform.

The deck is attached at the bottom, after a few links of interest for folks who want to dig deeper.

Command Query Responsibility Segregation (CQRS):

Sharding is hard:

NoSQL:

CAP Theorem:

PowerPoint slide deck used during my talk:

Azure FAQ: Can I create a Startup Task that executes only when really in the Cloud?

Q. Can I create a Startup Task that executes only when really in the Cloud? I mean really in the cloud. In other words, can I get my Startup Task to NOT RUN when I debug/deploy my Windows Azure application on my development machine?

A. The short answer is that while there is no built-in support for this, you can get the same effect by using a simple trick to add logic to your Startup Script to provide sufficient control. Before getting into that, let’s describe the problem in a bit more detail. Update 14-Oct-2011: Stop the presses!! This capability is now built into Windows Azure! Steve Marx has a blog post on the matter. I will leave this blog post around since the details in it may be of value for other scenarios.

Suppose you want to use ASP.NET MVC 3 in your Windows Azure Web Role. At the time of this writing, MVC 2 was installed in Azure, but not MVC 3. What to do? The short answer is, you can install MVC 3 along with your application at deployment time in the cloud. This type of prerequisite installation is most conveniently handled using a Startup Task. The idea is that I include the ASP.NET MVC 3 bits with my app, and define a Startup Task that installs these bits, and I can set things up easily so that these bits are already installed before my Web Role tries to run (via a Simple Startup Task). This is a pretty clean solution. (For more on Startup Tasks and how to configure them see How to Define Startup Tasks for a Role. For specific guidance on installing ASP.NET MVC 3 as a Startup Task, see Technique #2 in the ASP.NET MVC 3 in Windows Azure post on Steve Marx’s blog.)

Example Startup Task That ALWAYS Runs

Of course, installing ASP.NET MVC 3 is only one example. Here is another example – a Startup Task that enables support for ADSI with IIS – let’s call it enable-webmetabase.cmd. First, you would add the following entry to ServiceDefinition.csdef:

<?xml version=”1.0″ encoding=”utf-8″?>
<ServiceDefinition name=”NameOfMyAzureApp” xmlns=”http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition“>

<Startup>
<Task commandLine=”enable-webmetabase.cmd” executionContext=”elevated” taskType=”simple” />
</Startup>

The contents of enable-webmetabase.cmd would be something like the following (first enabling PowerShell scripting, then executing a specific script):

powershell -command “Set-ExecutionPolicy Unrestricted”
powershell .\enable-webmetabase.ps1

Though the specifics are not important for these instructions, since this script invokes a PowerShell script – let’s call it enable-webmetabase.ps1 – here is what that might look like:

Import-Module ServerManager
Add-WindowsFeature Web-Metabase

And as a final step, you would include both enable-webmetabase.cmd and enable-webmetabase.ps1 with your Visual Studio Project, and set the Copy to Output Directory property on each of these two files to be Copy always. Now, every time you deploy this Azure solution this Startup Task will be executed – and you can feel confident that you won’t have to worry about ADSI in IIS not being available (or whatever it is your Startup Tasks do for you).

Startup Tasks Run in Development Too

But what happens when I wish to deploy this solution on my development machine so I can quickly test it out while I am in the midst of development? Since the Windows Azure Platform has an outstanding local cloud simulation environment (which can be downloaded for free), “local” is the most common deployment target! It is not ideal that the Startup Tasks will run locally – I do not want to continually install ASP.NET MVC (or re-enable web metabase support, etc.) since that will just slow me down.

The Simple Workaround

I know of no built-in support that makes it easy for a Startup Task to “know” whether it is running in the cloud or in your local development environment. But it is simple to roll your own. Here’s what I do:

  • Create an Environment Variable called AZURE_CLOUD_SIMULATION_ENVIRONMENT. While the exact value of this variable does not matter, for the sake of someone else who may see it and be puzzled, I set mine to be “set manually per http://bit.ly/rs5SRN” where the bit.ly link points back to this blog post. :-) It also doesn’t matter if the Environment Variable is user-specific or System-wide. If it is a shared development machine, I would make it System-wide (for all users).
  • It is common practice when defining Startup Tasks to create command script using a .cmd file and have that be the Startup Task. Within the Startup Task .cmd file, use the defined keyword (supported in the command shells of recent versions of Windows, such as those you will be using for Azure development and deployment) to add a little logic so that you run only those commands you wish to execute in the current environment.

To set up the AZURE_CLOUD_SIMULATION_ENVIRONMENT environment variable:

  1. Run SystemPropertiesAdvanced.exe to bring up the System Properties dialog box:
  2. Click the Environment Variables button to bring up the Environment Variables dialog box:
  3. Click the New… button at the bottom to bring up the New System Variable dialog box:
  4. Type AZURE_CLOUD_SIMULATION_ENVIRONMENT into the Variable name field, and set manually per http://bit.ly/rs5SRN into the Variable value field:
  5. Hit a few OK buttons and you’ll be done.

Revised “Smart” Startup Task

Of course the trick is that the AZURE_CLOUD_SIMULATION_ENVIRONMENT variable will only be set on development machines, so it will NOT be set in the real cloud, getting you the desired results. Here is the same enable-webmetabase.cmd Startup Task script from above, except rewritten so that when you run it locally it will not do anything to your development machine.

if defined AZURE_CLOUD_SIMULATION_ENVIRONMENT goto SKIP

powershell -command “Set-ExecutionPolicy Unrestricted”
powershell .\enable-webmetabase.ps1

:SKIP

The line “if defined AZURE_CLOUD_SIMULATION_ENVIRONMENT goto SKIP” simply checks whether AZURE_CLOUD_SIMULATION_ENVIRONMENT exists in the environment, and if it does exist, the script jumps over the two powershell lines. This is pretty handy!

Again, in summary, if you follow the very simple approach in this post, the AZURE_CLOUD_SIMULATION_ENVIRONMENT will exist only on development machines – in the simulated cloud – and not out in the “real” cloud.

Not to be Confused with RoleEnvironment.IsAvailable

There is another technique – that is built into Azure – which you can use in code that needs to behave one way when running under Windows Azure, and another way when not running under Windows Azure: RoleEnvironment.IsAvailable. This is good for code that might be deployed both in, say, an Azure Web Role and in a non-Azure ASP.NET web site. For Azure applications, RoleEnvironment.IsAvailable will be true for both the local development machine and when deployed into the public cloud.

While RoleEnvironment.IsAvailable and AZURE_CLOUD_SIMULATION_ENVIRONMENT serve different purposes, they are complementary and can be used together.

For more information on RoleEnvironment.IsAvailable, there is documentation and a good description of its use.

Other Uses for the Technique

Maybe you want to do certain things ONLY in your development environment. For example, perhaps you wish to launch Fiddler. Or maybe uninstall a Windows Service (via InstallUtil /u <service exe name>). Whatever your needs – you can use the same simple technique to make this easy. The following syntax is also supported – each bullet being a single line (though some of them may appear on more than one line in this blog post):

  • if defined AZURE_CLOUD_SIMULATION_ENVIRONMENT (echo AZURE_CLOUD_SIMULATION_ENVIRONMENT equals %AZURE_CLOUD_SIMULATION_ENVIRONMENT%) else (echo AZURE_CLOUD_SIMULATION_ENVIRONMENT is NOT defined)
  • if defined AZURE_CLOUD_SIMULATION_ENVIRONMENT echo DOING SOMETHING
  • if NOT defined AZURE_CLOUD_SIMULATION_ENVIRONMENT echo DOING SOMETHING ELSE

Is this useful? Did I leave out something interesting or get something wrong? Please let me know in the comments! Think other people might be interested? Spread the word!