TechDays 2010: Real-World Patterns for Cloud Computing

Tech Days 2010If it’s Autumn, it must be time for TechDays again here in Canada. This year  I was Microsoft Canada’s Content Lead for the “Real-World Patterns for Cloud Computing” session.

The Toronto flavour of the event has been taking place yesterday and today.

Compute, Store, Scale

The Cloud Computing presentation focused on scenarios involving where we use the cloud for compute, storage, and scaling (of both compute power and storage). It looked at a real-world case study using Windows Azure Worker Roles, and multiple Azure Storage account (leveraging Blobs and Queues – Azure Table Storage and SQL Azure are other stories for other presentations).

Demo Path

"Real World Patterns for Cloud Computing" Demo Path (click to enlarge)
"Real World Patterns for Cloud Computing" Demo Path (click to embiggen)

Here’s the basic demo path (as pictured above):

1. Efficiently upload content to the cloud

2. After upload, add message(s) to Azure Queue indicating to a Worker Role there’s content to process

3. Use a Worker Role to read messages from the Queue and process the uploaded content

4. Show how to scale the whole thing – both storage (if it exceeds 100TB, the limit of an Azure Storage Account), and compute (if there is too much content to process by a single Worker Role).

The focus of the talk was on incorporating good practices (and avoiding gotchas) throughout this process. We started with some simple code that uploaded content to the cloud and processed it using a worker role, and then modified the solution to incorporate a number of improvements. Then we slammed the whole thing with a heavy load and used the Windows Azure Dynamic Scaling Sample to monitor the growth of the queue and scale up and down accordingly.

(This last part addresses what is certainly one of the most frequently asked questions I get about Azure – does it scale its computing automatically, and if not, how do I do so? The Dynamic Scaling Sample provides one very configurable and suitable solution for automated scaling of Azure computing.)

If you were at TechDays and are interested in the sample code, please contact me and I’ll send a link. You may also be interested in Microsoft Evangelist Wade Wegner’s presentation from TechEd2010, which he delivered with Jerry Schulist from the Tribune Company. I’m indebted to Wade and Jerry for their excellent presentation and their pioneering work with Azure.

Today: More TechDays + streaming PDC 2010

If you’re interested in Azure and cloud computing, you almost certainly will be interested in following what’s going on this week in Redmond at Microsoft PDC 2010. The entire conference will be streamed online – follow that link for a slick schedule and some nice .ics links so you can add talks of interest to your calendar.

[Update, 29 Oct 2010: There were indeed quite a few announcements related to Azure at PDC2010 – check them out!]

Thanks Again

Thanks to everyone who came out – I really enjoyed the day and that was probably the best post-presentation Q&A session I’ve ever had, even if Joey had to “Kanye” me off stage again when question time ran out! My compliments to the MS Canada team – they have the choreography of these large-scale tech events down to an art.

Next stop: Ottawa!

I’m looking forward to presenting this talk again in Ottawa on November 9th for the TechDays Ottawa event.

Legend of the Greasepole gets the Silverlight 4 + Analytics treatment

Legend of the Greasepole Title Screen

Legend of the Greasepole has been ported to Silverlight 4 and reincarnated on

Greasepole is the long-suffering game about multimedia tribute to the inexplicable Engineering traditions at Queen’s University in Canada. Over 50 students contributed to the project back in the day.

There’s a significant AI component to Greasepole – the autonomous “frosh” characters have models for learning and communicating with one another.

A couple of years ago I ported it from C++ to C# and XNA. I abstracted out a series of services (graphics, sound, input, timer, persistence) so that it might ultimately be ported again to a platform like, say, Silverlight or something. Why? I don’t know, maybe I’m a little obsessed with the illusion of preservation.

The Silverlight 2 version was a bit shaky. Silverlight 4’s hardware acceleration and bitmap caching make it pretty solid. It is also awesome to hear from friends that it apparently works on the Mac.

Analyze These… Shenanigans

I also added a little analytics. Although it should probably be said that the Greasepole event largely defies analysis, the game itself does not, and so this is the first time I can let someone poke their head in and see how the froshies are doing all around the world.

Back in the day, the worldwide best time was in excess of a mere 53 minutes. But I had to learn that by way of Sean Murray (class of ’05; wonder where he is now) sending me a screenshot. Now the interwebs will tell us immediately. (Admittedly, it’s not a fair fight against Sean, because the frosh are now permanently in “keener” mode, and the Options screen has been replaced by a dozen trendy Achievements for you to “unlock”).

So get going stalling those frosh, and my question for you is – what statistics would you like to see?

“Number of pints Al ‘Pop Boy’ Burchell has quaffed?”

“Number of hippos fed”?

“Height of human pyramid vs time”?

I am going to enjoy cooking up visualizations for some of those.

(Coding notes: A few new VS2010 things helped with this update: Web.config transformation (rocks), improvements to Web Publish functionality, XAML designer, Entity Framework experience… and more.)

Play Legend of the Greasepole Online Edition.

TechDays 2009: ‘Optimizing Your Apps for Windows 7’ Follow-up

This is a belated follow-up to my TechDays 2009 presentation about Optimizing your Applications for the Windows 7 User Experience.

Included are all the links you need with information about how to get compatible, optimize, and differentiate.

TechDays 2009This is a belated follow-up to my TechDays presentation last week about Optimizing your Applications for the Windows 7 User Experience.

The presentation was in “good, better, best” format, and followed this three-step progression:

1. Get Compatible.
Focus on quality by reviewing the available guidance, documents and training. Download tools for testing and verification. Strive to meet Logo Requirements. Ensure you’re using features (like the common dialogs and Most Recently Used list) that give you new functionality “for free” on Windows 7.

2. Optimize.
Employ the new UI features (Taskbar, Libraries, Federated Search, etc.) to make your app look and feel “at home” on Windows 7. Also consider employing the Performance and Robustness features (Trigger Start Services, Restart Manager, etc.)

3. Differentiate.
If it suits your application, consider the use of “natural user experiences” (Multi-touch, the Sensor and Location platform, the “Scenic” Ribbon, and new DirectX capabilities).

For more follow-up info, please see all the links above, or send me a note.

Windows 7 JumpLists
Windows 7 Jump Lists are a new Taskbar feature

Taskbar bonus link: If you’re interested in the new Taskbar, including the JumpLists functionality shown above, Rudi Grobler’s newly-minted series Anatomy of the Windows 7 Taskbar will be relevant to your interests.

And the One Link To Rule Them All for those of us writing in Managed Code is the Windows API Code Pack for .NET. The Windows 7 Training Kit for Developers link was the close runner-up in the “One Link to Rule Them All” competition.

Two links to rule them all? Well, you know what they say: one does not simply code into Mordor.

TechDays 2009: ‘Building REST-ful Services with WCF’ Follow-up

TechDays 2009I’m by no means a native REST-afarian: I was a Microsoftie during the time when SOAP and WS-* were all the rage, and the first version of WCF was released (all lathered up in SOAP) to unify communications in .NET.

But as I do more client-side development – particularly with Silverlight and ASP.NET AJAX – I’ve encountered more and more service scenarios where the REST architecture, and lightweight data formats like JSON, make a lot of sense.

So it’s a case of horses for courses, and very good news that the ultra-extensible WCF now has strong built-in support for both SOAP and REST… and JSON and ATOM/RSS syndication and more.

The verbs that make up the uniform REST-ful interface
The verbs that make up the uniform REST-ful interface

Get the REST Starter Kit

If you’re interested in WCF’s support for REST, please download the WCF REST Starter Kit, and check out the resources for REST in Windows Communication Foundation linked here.

Paste XML as Types
Paste XML as Types

The REST Starter Kit gives Visual Studio 2008 SP1 a lot of additional helpful functionality for consuming REST services from a client, including the “Paste XML as Types” functionality that got an audible “oooh!” today.

Here’s how it works: You copy some XML into your clipboard, and then use this menu item to paste it into your code as C# classes. Then, you can use the HttpClient classes (found in the Microsoft.Http and Microsoft.Http.Extensions assemblies, also part of the Starter Kit) to load your data into a client app without munging the XML. Very nice, and no “Add Service Reference” magic needed.

More on WCF+REST:

I am immensely indebted to Jon Flanders, a true REST-afarian, for the foundation of today’s presentation. He literally wrote the book on REST-ful .NET.

He’s presented on this subject at the past two TechEd conferences. You can watch his TechEd2009 presentation here and download that presentation’s sample code here.

Hope that helps, and happy service building!