Worker Role Communications in Windows Azure, Part 2

In a previous post we explored exposing an endpoint in a worker role to the outside world. Here we will examine one way to implement communication between worker roles internally.

Basically, the idea is this:

Figure 1 Direct Role to Role Communication in Windows Azure

We could implement an architecture where all worker roles communicate with each other directly. We could do this communication over TCP.

There are a lot of good examples of code and projects available showing how to do this (and other things!) on Microsoft sites and others. See, for example, the excellent hands-on labs in the latest Windows Azure Platform Training Kit. These sample applications and labs are a great way to get started using Windows Azure. I encourage you to check them out.

One issue I have with some of those examples, however, is that they often include other details that are not directly relevant to understanding the topic at hand. This can often be overwhelming to someone encountering the technology for the first time.

Let us here consider a very over-simplified scenario. We want all worker roles to be able to directly communicate with each other. What I have tried to do with this example is to eliminate all extraneous stuff. The goal here is to focus down to just the bare necessities of how to do worker role to worker role communication in Azure. Also we want to fit the demo into a 10 minute (maximum) YouTube clip!

Obviously this stuff can still be a little complicated!

It is worthwhile, I think, to mention that more complicated doesn’t necessarily mean better. If you are considering doing something like this, take a good hard look at your design. Is it possible that some other better established pattern (the “asynchronous web/worker role” for example) would be equally well or better suited to the task at hand?

Still, it is nice to know that, as developers, we do have the flexibility in Azure to do pretty much anything that we want and that can be done in .NET.

Consider attending a Learning Tree course to advance your .NET developer skills. We have a wide variety of offerings for the .NET developer, including:

  1. Programming with .NET an Introduction
  2. Visual Basic® Programming for .NET
  3. C# Programming
  4. .NET 3.0/3.5 Overview: Hands-On
  5. ASP.NET WebForms: A Comprehensive Hands-On Introduction
  6. Building Web Applications with ASP.NET and Ajax
  7. Programming .NET Web Services: A Comprehensive Hands-On Introduction
  8. .NET Best Practices and Design Pattern: Hands-On
  9. Building Web Applications with ASP.NET MVC: Hands-On
  10. Programming Windows® and Smart Client Applications with .NET: Hands-On

And others too!

¡Viven los developers!


Type to search

Do you mean "" ?

Sorry, no results were found for your query.

Please check your spelling and try your search again.