Webcast Tutorial: Using Worker Roles for Simple Background Processing

There are many common scenarios in web development that require processing of information, gathering data, or handling message traffic that can be accomplished asynchronously -- meaning in the background while the user is doing other things with the application.[…]Windows Azure provides simple tools to make this type of background processing a snap. First's the queue […]

There are many common scenarios in web development that require processing of information, gathering data, or handling message traffic that can be accomplished asynchronously -- meaning in the background while the user is doing other things with the application.

[…]Windows Azure provides simple tools to make this type of background processing a snap. First's the queue system -- a part of Azure storage. Azure queues allow you to store a simple message in a durable FIFO (first-in, first-out) queue. This means that once the message is queued, it's stored securely in the cloud, waiting for someone to do something with it - even if your app goes down for one reason or another. The second piece of the Azure platform that enables this scenario is the "worker role". The worker role can be thought of as a simple program with no user interface (in most cases) that does simple tasks in the background regardless of what your "web role" (the interface for your web app) is doing. It's configured by default to run in an endless loop -- to look for work, do the work, take a small rest, and then do it again. This type of run loop works very well for processing message queues. The worker role will check the message queue, de-queue and handle all of the messages, then sleep for N seconds (up to the developer to decide). If there're no messages in the queue, the process just goes back to sleep and waits for its next chance to check again.[…]

This web tutorial teaches you the process:

For more information, step by step instructions and source code, vist

here.