Respondido Windows service on Azure

  • quarta-feira, 19 de outubro de 2011 19:26
     
     

    Hi

    I have found that Azure does not support windows servcie and has an alternate approach known as "Worker Role". Is this correct? Are there any difference between them.

    I need to fetch some queued data using a web service from one web application analyise it and push it some other web application using web service. Is this possible to do using worker process. If no is there any other apprach to do this? If yes is it the right approach?

    I dont want to host a windows service on the intranet.

Todas as Respostas

  • quinta-feira, 20 de outubro de 2011 10:05
    Moderador
     
     Respondido

    Hi,

    Yes, worker role is very similar to Windows Service. Worker role allows you to run an application when the virtual machine instance starts up, and it allows you to run it continuously until the instance shuts down.

    I don’t know the details of your scenario. Usually in a worker role, you have a while loop that checks the queue continuously, and process messages if there’s any:

    while (true)
    {
    Message msg = queue.GetMessage();
    ProcessMessage(msg);
    Thread.Sleep(10000);
    }

    You can get started from http://msdn.microsoft.com/en-us/wazplatformtrainingcourse_introtowindowsazurelabvs2010_topic3.

     

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
    • Sugerido como Resposta Horizon_Net sábado, 22 de outubro de 2011 21:37
    • Marcado como Resposta MingXu-MSFTModerator quarta-feira, 26 de outubro de 2011 06:18
    •  
  • quinta-feira, 20 de outubro de 2011 20:31
     
     

    Jayesh, the quickest way you could do this would be to simply host a VM of your current server in Azure.  That way, you can use your existing Windows Service, likely without modification.  Here is the link:

    http://msdn.microsoft.com/en-us/library/windowsazure/gg433107.aspx

     

    Cheers,

    Matt

  • segunda-feira, 31 de outubro de 2011 08:22
     
     

    Thans a lot.

    I dont have the service ready it is going to be developed what would be better a worker role or Server VM. Are there any limitations of worker role?

  • segunda-feira, 31 de outubro de 2011 10:38
    Moderador
     
     

    Hi,

    Essentially, at runtime, your worker role does not have administrator privilege. In addition, the only way to install software on a worker role is to write a startup task and use a script to install it.

    VM role allows you to use any images you like, as long as the image is a Windows Server 2008 R2 image. So essentially it is the same as your local environment (with a few exceptions such as network). But you have to manage the VM image yourself, including tasks such as Windows update.

     

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
  • terça-feira, 22 de maio de 2012 21:57
     
     

    I would like to understand the best way to do an equivalent of Windows services.

    Is worker role in Azure a single tenant?

    Can I write multiple services within one Azure Worker role?

    Can the service be consumed by multiple applications?


    Jawaid