I’ll be at DevCamp:Cloud tomorrow March 30th in Los Angeles. See you there?
There was an Azure outage on Feb 29th. While these things can happen, it was really refreshing to see the openness and degree of detail in the explanation of the root cause analysis and the events that followed. The post will also give you some technical insights into what goes on behind the scenes.
You can read about it here:
I’m pleased to announce that I FINALLY have finished and packaged up a cool little ServiceBus demo.
I say “finally” because this demo has a long lifeline, it began over a year ago. I enhanced it, and showed it to a colleague, Tony Guidici, for his comments. He ended up enhancing it, and putting it into his Azure book. I then took it back, enhanced it further, and, well, here it is. Thanks also to my colleagues David Chou and Greg Oliver for their feedback.
There are several resources associated with this demo:
- High def video walkthrough: http://youtu.be/xKHl87_BFT0
- Low def video walkthrough: http://youtu.be/c3KLhsjstco
- Complete source code, http://servicebuseventdemo.codeplex.com/
Note that this is based on the current-when-I-did-this version 1.6 of the Azure SDK and .NET libraries.
At a high level, the scenario is that this is a system that listens for events, and when critical events occur, they are multicast to listeners/subscribers through the Azure ServiceBus. The listeners use the ServiceBus relay bindings, the subscribers use the topical pub/sub mechanism of the ServiceBus.
Why relay *and* subscription? They serve different models. For example, using the subscription model, a listener could subscribe to all messages, or just a subset based on a filter condition (in this demo, we have examples of both). All subscribers will get all messages. By contrast, a great example of the relay bindings is having a Web service deployed on-prem, and remoting that by exposing an endpoint on the ServiceBus. The ServiceBus recently introduced a load balancing feature, where you could have multiple instances of the same service running, but if a message is received only one of them is called.
Both models work very well for inter-application and B2B scenarios. Note that this demo is intended to show the various parts of the ServiceBus, in a real world scenario you would likely not have a subscription listener that in turn publishes to a relay.
The moving parts in this particular demo look like this:
Subscriptions are shown above as ovals, the direct lines are relay bindings. The red lines are critical events, the black line is all events.
The projects in the solutions are:
Their purposes are:
|EventPoint.ConsoleApp||Listens for critical messages multicast through the ServiceBus relay binding|
|EventPoint.ConsoleApp.Topics||Listens for critical messages multicast through the ServiceBus eventpoint-topics namespace|
|EventPoint.Generator||Test harness, publishes messages to the ServiceBus eventpoint-topics namespace|
|EventPoint.Monitor||WinForms app that listens for critical messages multicast through the ServiceBus relay binding|
|EventPoint.CriticalPersister||Listens for critical messages multicast through the ServiceBus relay binding and persists them to SQL Azure|
|EventPoint_WebRole||Table browser UI to see all events that have been persisted to Azure table storage|
|EventPoint_WorkerRole||Worker role that sets up eventpoint-topics subscriptions for 1) All events and 2) critical (priority 0) messages that get multicast to the ServiceBus relay|
|EventPoint.Common||Config, message factory to support push notifications|
|Microsoft.Samples.ServiceBusMessaging||NuGet package to support push notifications|
There are a few things you’ll need to do in order to get the demo working. Remarkably few things actually, considering the number of moving parts in the flow diagram!
First off, in the admin portal, you will need to create two ServiceBus namespaces:
NOTE THAT SERVICEBUS NAMESPACES MUST BE GLOBALLY UNIQUE. The ones shown above are ones I chose, if you want to run the code you will have to choose your own and cannot re-use mine (unless I delete them).
The “eventpoint-critical” namespace is used for the relay bindings, the “eventpoint-topics” is used for the pub/sub (apparently you cannot use the same namespace for both purposes, at least at the time this was written). You don’t have to use those names, but if you change them, you’ll need to change them in the config file too, so I’d suggest just leaving it this way.
Because there are multiple types of apps, ranging from Azure worker roles through console and winforms apps, I created a single shared static config class that is shared among the apps. You can, and need to, update the app.config file with your appropriate account information:
Note: there are more things you need to change that did not fit in the screen shot, they will be self-evident when you look at the App.Config file.
To get the ServiceBus issuer name and secret, you may need to scroll as it is bottom-most right-hand side of the ServiceBus page:
Lastly, you’ll need to add the name/creds of your storage account to the Web and worker roles.
When you run the app, five visible projects will start, plus a web role and a worker role running in the emulator.
In the screen shot below, I generated 5 random messages. Three of them were critical, and you can see they were picked up by the console apps and the WinForms app.
Just as with Windows Azure queues, the Azure ServiceBus is a powerful tool you can use to decouple parts of your application. I hope you find this demo helpful, and that it gives you new ideas about how you can use it in your own solutions.
We are going to be running another series of Windows Azure Discovery events in US West region.
Azure Discovery Events
We would like to offer you the opportunity to attend the Windows Azure Platform Discover Event. A Discover Event will provide a business and technical overview of the Windows Azure Platform. The target audience for these events includes business decision makers, technical decision makers, architects, and development leads. The sessions are targeted at the 100-200 level with a mix of business focused information as well as technical information.
January 31, 2012
9:00 AM – 1:00 PM
February 8, 2012
9:00 AM – 1:00 PM
February 27, 2012
Mountain View, CA
9:00 AM – 1:00 PM
March 1, 2012
9:00 AM – 1:00 PM
To register by phone, call: 1.877.MSEVENT (1.877.673.8368).
There’s just too much to talk about in today’s December update to Windows Azure. There are enhancements across the board, starting with the initial sign-up experience, through to billing, and EVERYTHING in between. There have been pricing updates, SQL Azure size has gone up to 150gb, SQL Federation has now shipped (no longer CTP) enabling massive scale/perf SQL solutions, portal updates….
I could go on and on, but instead, read the official post here.
I thought it would be fun to show the recently released SQL Azure Data Sync at the Azure DevCamp in Santa Monica a couple of days ago. This was my first exposure to the recently released CTP, and I was so impressed by how easy it was to set up a synchronization that I thought I would write it up.
You configure Data Sync by using the Azure portal. You create a “sync group” that contains “member databases”. The member databases are either on-premise or SQL Azure. The following is what my portal view looked like after I created these entities:
Setting up the actual synchronization flow is also done through the portal, this is where you:
- add your cloud and on-prem databases
- defining the synchronization schedule (ie: “sync every 60 minutes”)
- define the sync flow (one way or bi-directional)
- define conflict resolution
- define a synchronization “hub” that is used to track synchronization
In my example, I had an on-premise database that I wanted to replicate to SQL Azure. This was a one-way flow, from on-prem to a SQL Azure instance I had in North Central US. What was super-cool was that in front of the audience, I provisioned a brand new SQL Azure server in South East Asia, and added it to the sync group so that it too would receive changes I made to the on-premise database. Elapsed time was a couple of minutes, because I was pausing to explain. That’s mind-boggling if you think back a few years to what it would have taken to achieve the same result.
Here’s what my sync flow looked like at the end of the demo:
The team has done a great job, this was incredibly easy and intuitive to set up yet is also a very powerful capability for geo-distributed applications.
Various new updates for Windows Azure were just released (Azure SDK for .NET updates shown below):
- Windows Azure SDK (November 2011,)—Multiple updates to the Windows Azure Tools for Visual Studio 2010 that simplify development, deployment, and management on Windows Azure. The full Windows Azure SDK can be downloaded via the Web Platform installer here.
- Windows Azure HPC Scheduler SDK— Works in conjunction with the Windows Azure SDK and includes modules and features to author high performance computing (HPC) applications that use large amounts of compute resources in parallel to complete work. The SDK is available here for download.
- Windows Azure Platform Training Kit—Includes hands-on labs, demos, and presentations to help you learn how to build applications that use Windows Azure. Compatible with the new Windows Azure SDK and Windows Azure Tools for Visual Studio 2010. The training kit can be downloaded here.
You can read about the specifics here.