2
votes

I'm doing my first project but large one on developing Azure Application with Intergration Component.

Currently most of the integration are done using SSIS Packages and would like to transform them on to Worker Role in Azure.

Could someone please help me to understand the following queries regarding Worker Role please?

  1. Is there way to start or stop the Worker role (just like SSIS or Windows Schedulers) via GUI? If not how to achieve this?

  2. How do I know my worker role has been running or not running (including why it's not running ie. logs)

  3. How do I spin multiple worker role based on time (i.e. (9:00AM to 11:00AM spin 4 roles and scale down on quiet period)

  4. Does the following code creates any poison message or dead lock (if multiple there are 10,000 messages to process and every 5 seconds the new thread (Processsing.run) is started?

while(true)
            {
                var thread = new Thread(Run);
                  thread.start();

                Thread.Sleep(5000);
                Trace.WriteLine("Working", "Information");
            }


public class PhotoProcessing
    {
        public static void Run()
        {
            // Read from queue
            CloudQueueMessage msg =

Storage.Queue.GetNextMessage();

            while(msg != null)
            {
                string[] message = msg.AsString.Split('$');
                if(message.Length == 2)
                {
                    AddWatermark(message[0], message[1]);
                }                

                // Message has been read so remove it
                Storage.Queue.DeleteMessage(msg);

                // Get next message if any
                msg = Storage.Queue.GetNextMessage();   
            }
        }
1

1 Answers

3
votes

Is there way to start or stop the Worker role (just like SSIS or Windows Schedulers) via GUI? If not how to achieve this?

There are actually many ways to achieve this. You can use Windows Azure Portal to do or you could use 3rd party tools (like our Cloud Storage Studio) or you could write your own application using Windows Azure Service Management API (http://msdn.microsoft.com/en-us/library/ee460799.aspx)

How do I know my worker role has been running or not running (including why it's not running ie. logs)

Again you could use one of the GUI based tools to see the status of your roles. As far as why the roles are not running, you would need to enable Windows Azure Diagnostics in your worker role (http://msdn.microsoft.com/en-us/library/gg433048.aspx)

How do I spin multiple worker role based on time (i.e. (9:00AM to 11:00AM spin 4 roles and scale down on quiet period) You can write your own application using Windows Azure Service Management API to do so or you could make use of 3rd party tools like AzureWatch from Paraleap or Azure Management Cmdlets (both from Microsoft and our company). While the cmdlets will get the job done, I believe Azure Watch is much more sophisticated solution. We wrote a blog post for autoscaling some days back which you can find here: http://www.cerebrata.com/Blog/post/Scale-your-Windows-Azure-instances-with-Azure-Management-Cmdlets.aspx.