Thursday, May 7, 2009

Azure Sudoku now on CodePlex


Azure Sudoku is now available on CodePlex. This is an Azure-hosted Silverlight implementation of the popular game Sudoku. Various Hawaiian backgrounds accompany each new game.

The significance of this project isn't entertainment. It combines Azure, Silverlight, and WCF in the same solution--something that takes a lot of work (and work-arounds) to get right. If you're attempting to combine all 3 technologies for the first time, this project may be helpful to look at and will hopefully save you some of the headscratching I went through.





I could have implemented Azure Sudoku without the WCF service, but since this is meant to be a reference project I wanted to include WCF for an important reason: Silverlight can't directly access Azure's RESTful services. That means when you work on Azure-hosted Silverlight solutions the only way you'll be able to make use of cloud storage and other Azure services is if your solution contains a WCF service that Silverlight can go through to get to Azure services.

While we're on the subject of Sudoku, you may be surprised to learn that it isn't a Japanese invention. The game originally known as "Number Place" first appeared in the U.S. in Dell Pencil Puzzles and Word Games magazine in 1979 but didn't command a lot of attention. It made its way to Japan at some point where it became a major hit, and the rest is history. It's really Howard Garns of Indianapolis we have to thank for Sudoku. Thanks Howard!

Article

Monday, May 4, 2009

AzureMortgageService now on CodePlex


I've written a demo WCF service that calculates mortgage schedules, along with a WPF-based desktop app for invoking the service and displaying the results. The demo is on CodePlex at http://AzureMortgageService.codeplex.com. If you're looking for a working Azure service with a real-world scenario that's clean and simple, you might find this useful.


Azure Developer Contest


Microsoft has just announced a contest for Azure developers! Now this should be fun. The contest is called "new CloudApp()" and has an official site at http://www.newcloudapp.com/.

Both PHP and .NET applications can be submitted. The .NET and PHP category applications will be judged by industry leaders, Om Malik and Michael Cote. Entries will be evaluated based on user experience and user interface, innovation and creativity of the application, applicability to cloud computing, and real-world applicability of the application. The overall Community winner will be decided by public voting.

Key Dates:

• Monday, May 4: Contest Open
• Thursday, June 18: Submission deadline
• Friday, June 19: Community voting starts
• Thursday, June 25: .NET & PHP category winners announced at Structure 09
• Monday, June 29: Community voting ends
• Tuesday, June 30: Community winner announced

So what do winners get?

• Featured on www.azure.com as well as at major Microsoft events
• Featured in a video interview on Channel 9 with the application author
• Winners will be announced at Structure 09
• Receive cash ($):
  o NET Applications Category winner: $5,000 Visa gift card
  o PHP Applications Category winner: $5,000 Visa gift card
  o Community winner: $2,500 Visa gift card

Contestants can choose to submit one entry into either the .NET or the PHP applications category. Azure applications that have already been built can be submitted for the contest.

Valid submissions are limited to residents 18 years and older of the 50 United States and District of Columbia.


Friday, May 1, 2009

InfoQ Article on Azure Grid Computing


InfoQ is running my recent 3-part article series on Azure grid computing with some expanded content.

Part 1 went up today, the other parts will run at 2-week intervals.

Wednesday, April 29, 2009

Azure Best Practice #4: REST is In, SOAP is Out


Best Practice #4 is to favor REST over SOAP, except for those scenarios that demand SOAP.

When it comes to cloud computing platforms, it's a RESTful world and Azure is no exception. The vast majority of the services in the platform can only be accessed via REST (even if you're using .NET library code, REST is what's happening under the hood). SOAP isn't completely out of the picture, however. For functionality that depends on WS-* protocols (such as federated security) Azure does use SOAP.

Which should you use for your own Azure-hosted web services, REST or SOAP? It makes sense to emulate what the platform itself does and favor REST, except where you must use SOAP. Using SOAP makes sense for compatibility reasons or when you need WS-* functionality. When these conditions don't apply, a RESTful interface is recommended. It's simpler and more in line with "how we do things in the cloud."

The popularity of REST is due to its simplicity and its resource-oriented nature while SOAP has become cumbersome in the opinion of many. There is a good discussion of whether SOAP and REST are complements or competitors on David Chappell's blog.

Azure Best Practice #3: What's Good for SOA is Good for the Cloud


Azure best practice #3 is to apply SOA principles to your cloud applications. The core ideas of SOA apply equally strongly to the cloud:

  • Software components are loosely coupled.
  • Message-based programs do a lot of the work.
  • Boundaries of communication/reliability/security/transactions are a key consideration in solution architecture.
  • Use of standard protocols and message formats provides broad interoperability.
  • Stateless service development is encouraged which facilitates easy load balancing.
  • Communication is presumed to be expensive.
  • Coarse-grained interfaces are preferred over chatty interfaces.

This isn't a recommendation to use SOAP, however. See Best Practice #4 for a discussion of SOAP vs. REST.

Azure Best Practice #2: Keep Code and Data Close Together


Azure best practice #2 is to keep code and the data it needs close to each other. If the code lives in the enterprise, so should the data it frequently accesses. If the code lives in a cloud data center, that's where its data should be also--and in the same geo-location.

This best practice is simple common sense: going between the enterprise and the cloud over the Internet is not terribly fast, so you want to keep it to a minimum.

This is not an absolute rule, since you may have a perfectly legitimate reason to interconnect enterprise code with cloud data or vice-versa--but you should avoid this kind of cross-traffic when it isn't necessary.

You can use the affinity group setting in the Azure portal to ensure related hosting and storage projects are running in the same geo-location.

Example: you have a cloud-hosted web site and you need to store user profile data. The best location for that user profile data is cloud storage.