Friday, May 25, 2012

Windows Azure Mythbuster: Open Source

Interesting timing: I saw a post by fellow Microsoftee Buck Woody the other day, dispelling a few Windows Azure myths. You can check out Buck’s myth-debunking,  here.

One of the more interesting Windows Azure myths called out in that post (for me, at least):

It’s only for Microsoft stuff – can’t use Open Source

This is a myth I hear quite often. I’ve been presenting Windows Azure at several user groups, conferences, and community events over the past few years, and most of my recent talks have, in some way, involved open source code. I’m amazed at the large percentage of people who understand Windows Azure to be “the cloud platform that runs .NET.”  This simply isn’t true, but just saying “This simply isn’t true” doesn’t really get the message across.

So… for my recent talks, I’ve twisted things around, to get some reality into the mix. Not being much of a slides guy, I usually dive right into code. And that means… firing up Eclipse and starting a new Java project. At this point, I usually have to sit back for a bit and wait for the wide-eyed, confused attendees to settle down and accept the fact that, indeed, it’s pretty straightforward to develop a Java app for Windows Azure.

Of course, I kinda want that wide-eyed, confused attendee look to last a wee bit longer. So I then open a browser window and pull up the latest Windows Azure SDK for Java. On github. And explain how all of the Windows Azure SDKs are now open-sourced, and that anyone can submit a pull request. As for the Java SDK, it’s continuing to evolve. The latest update, April 2012, provides Service Runtime, Storage, and Service Bus.

Language stuff aside, several of my demos include MongoDB running in Windows Azure. MongoDB is one of several NoSQL databases (pronounced like Nose Equal), and is completely open source. This is always a fun exercise because of sheer cool-factor, but more importantly, it lets me demonstrate the ability to run just about any Windows application in Windows Azure with the help of startup scripts and a bit of scaffolding code in the Windows Azure project itself. The scaffolding and scripting differs, depending on whether I’m building my Windows Azure solution via Visual Studio or Eclipse, but I can accomplish the same thing from either environment.

Several open source projects have Windows variants, and several of those will run just fine in Windows Azure by getting the configuration correct. If you can get something running in Windows Server, chances are you’ll be able to run it in Windows Azure. Of course, there are always exceptions, some of them requiring complex installation and setup (such as MongoDB replicasets, or WordPress). Sometimes you’ll find that pre-built projects that help get these apps up and running quickly; for others, you’ll need to figure it out (or find a good blog post about it).

One last thought on working with alternative languages such as Java or PHP: The Window Azure Virtual Machine images don’t have the runtimes or libraries installed. This is something you’ll need to provide, along with any other apps and libraries your app may need (such as Tomcat, log4j, etc.). These may be bundled with your Windows Azure deployment (simple approach but increases deployment file size considerably), or placed in Blob storage and downloaded to your VMs and boot time (requires initial upload to Blob storage, plus a bit of startup script to download from Blob storage to running VMs).

So: Myth Busted.

Disclaimer: I like to demo Java as the .NET alternative, as I’ve been working with a few Java+Windows Azure projects lately. You can certainly develop Windows Azure apps in other languages. Even if your favorite language doesn’t have an SDK yet on the Windows Azure github repo, you can easily access the API with REST calls. If you’re into PHP, check out the latest PHP SDK on CodePlex, a collaboration project by RealDolmen and Microsoft.

No comments:

Post a Comment