Windows Azure – Messaging (Part #1)

Messaging is an integral part of all servers, codes needs to communicate with the other codes in order to know what’s actually going on. Sometimes they can be put on a timer, other times the messaging process can be kept incredibly basic (like queued messaging). When it calls for it, more complex (as well as in-depth) processes can be achieved if it’s what you’re going for. Windows Azure has a few different ideas and ways to try out when it comes to finding the right “message”!

The term “Queue” is going to pop up a lot when you’re talking about messaging with cloud servers. It’s a very simple, yet intricate process. One of the applications puts a message in a “queue”, then that message is eventually sent over to the next application in order for it to process the new info. If this is all you’d need to be running, Windows Azure Queues would probably be your best bet seeing as it’s easy to use and rather straight-forward. Another common use we have found for the queue these days is to let a web role instance communicate and interact with another worker role instance (of course, withing the same Cloud Services application). Let’s say you’ve created your own little application on Azure that pertains to video sharing, the code of the application itself is made up of PHP that runs in a web role (in order to let users watch and upload their videos accordingly). This is paired with a worker role in C# that will translate and transfer the videos themselves in various formats on the server.

Whenever the web instance is gracd with a new video from a consumer, it can store the video in an abundance of data forms (usually a blob) and then sent to the worker role with a “Queue” in order to tell it where it can find this new video. After this has been accomplished a working role will take the video that’s required and “translate” the whole thing in the background of processes.

Whenever you take the opportunity to structure your application in this fashion it allows for a more immersive experience. You will be able to asynchronously process data, as well as scale your application as you’d please. This is all dependent on the web roles and worker roles, because they can be scaled to you liking as well. All in all, once again it doesn’t hurt to know more than you need to know in this case (applying to Messaging that is) because you never know what’s around the next corner!