Web worker on cloud service - some questions

Hi all;
Ok, I'm trying to get a web worker implemented (following this) working off of a message queue and have a couple of questions:
So I get a message, perform my operation on it (in my case an update to Sql Azure), and then delete the message. What if Azure shuts me down after I complete the update but before the message is deleted. Then when I start up again, won't I be processing
that message again?
If I mark the message as processing, and then Azure shuts me down just before I call update, then won't I lose that operation?
It says sleep for 1 minute if there's no messages. Is there a way to instead block on an event and trigger that event when I add another message?
thanks - dave
What we did for the last 6 months -
Made the world's coolest reporting & docgen system even more amazing

Hello,
First, azure cloud service has a high availability and it rarely shut down. If the worker role app shuts down, also you unnecessary worry about the azure storage queue service. As this
article mentioned, "Your code de-queues a message from a queue in two steps. When you call
GetMessage, you get the next message in a queue. A message returned from
GetMessage becomes invisible to any other code reading messages from this queue. By default, this message stays invisible for 30 seconds. To finish removing the message from the queue, you must also call
DeleteMessage. This two-step process of removing a message assures that
if your code fails to process a message due to hardware or software failure, another instance of your code can get the same message and try again. Your code calls
DeleteMessage right after the message has been processed."  So we should call the DeleteMessage method after completed your operating.  
As for your third question, not really there is a trigger for worker role app. We should use a long running process to read messages from storage queue.
while (true)
try
//your code to read queue messages
//you can make the thread sleep some times
System.Threading.Thread.Sleep(1000 * 60);
catch (Exception ex)
System.Threading.Thread.Sleep(1000 * 60);
Best Regards,
Fuxiang
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

Similar Messages

  • Deallocating a Web/Worker Roles Cloud Service

    I'm seeking some clarification on whether its possible to shutdown a PaaS Cloud Service into a non-chargeable state in the same way one can do this with IaaS virtual machine deployments? In an automated CI/CD environment then PaaS is attractive but paying
    for instances we use for development to run the 16-18 hours a day no one is using them isn't. Yet shutting down at night and restarting IaaS VMs in the morning via scheduled automated tasks appears fairly trivial to achieve. 
    Shutting down PaaS instances via Powershell or the Management API fails, stopping the service via the portal appears to still leave them chargeable.  So the only solution currently appears to be fully delete them and then recreate when you need
    them again (along with the time penalties spinning up new instances carries). Am I missing something or is this really not possible? If it isn't possible then is it something that is in the pipeline? (I had heard on the grapevine that the PaaS solution that
    currently exists is pencilled in to be replaced/removed).

    Hi,
    Worker and Web Roles are charged per hour of deployment so even if doing nothing it is being charged out as you have physically commission the vm to be spun up. Even if the role is stopped but the deployment hasn't been deleted you will still pay for the
    instance. So, it is not possible now, At currently, please vote this voice:
    http://feedback.azure.com/forums/34192--general-feedback/suggestions/6887568-not-bill-for-a-stopped-cloud-service
    Best Regards,
    Jambor 
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Can my hp color laserjet 3500 work with cloud services

    can my hp color laserjet 3500 work with cloud services
    This question was solved.
    View Solution.

    The printer listed doesn't support cloud services.
    Cloud Services supported printers

  • Cloud Service Billing Question

    We are in the process of creating some Virtual Machines in Microsoft Azure. We will only be using Virtual Machines in Azure and none of the programming or other hosting features. When you create a virtual machine, you must create a Cloud
    Service, or specify one that you've already created.
    So really I have 2 questions:
    1. Will I be billed for this Cloud Service AND a VM? My understanding is that the cloud service is a only container for the virtual machines.
    2. If I am being billed, how do I know the size of the Cloud Service that I deployed? There is no option to select a size, but all the pricing information I can find on Cloud Services requires that I specify a size (A1, A2, D3, etc).
    Any information at all would be very helpful. Thanks

    Hi,
    First, we need to know the difference between cloud service and Azure VM, here is an article:
    http://blogs.msdn.com/b/plankytronixx/archive/2014/04/24/i-m-confused-between-azure-cloud-services-and-azure-vms-what-the.aspx, hope it helps.
    As far as I know, the cloud service contains two types of instance: web role and worker role, each role could contains multiple instances, the computers (Windows Servers) that lived in these Roles were known as “instances”. So, you could think of the instance
    as a "Virtual Machine", for example, your cloud service has one web role with two instances A0, you will be charge $22*2/mo (http://azure.microsoft.com/en-us/pricing/details/cloud-services/),
    you could also find these pricing information from azure VM pricing (Standard tier) (http://azure.microsoft.com/en-us/pricing/details/virtual-machines/), as my first
    post, you will not be charged twice, please note:  Cloud Services now offers two hardware options for web and worker roles: A-series and D-series.
    More detail about instance sizes.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Change basicHttpBinding to wsHttpBinding in azure cloud service web role

    So I created a cloud service project in visual studio and added wcf service web role to cloud service.
    By default wcf service web role binding is set to basicHttpBinding.
    Currently my web.config looks like this:
    <?xml version="1.0"?>
    <configuration>
    <system.diagnostics>
    <trace>
    <listeners>
    <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    name="AzureDiagnostics">
    <filter type="" />
    </add>
    </listeners>
    </trace>
    </system.diagnostics>
    <system.web>
    <compilation debug="true" targetFramework="4.0" />
    </system.web>
    <system.serviceModel>
    <behaviors>
    <serviceBehaviors>
    <behavior>
    <!-- To avoid disclosing metadata information, set the value below to false before deployment -->
    <serviceMetadata httpGetEnabled="true"/>
    <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
    <serviceDebug includeExceptionDetailInFaults="false"/>
    </behavior>
    </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    </system.serviceModel>
    <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    <directoryBrowse enabled="true"/>
    </system.webServer>
    </configuration>
    How do I change my config to use wsHttpBinding?

    Hi,
    Please refer to
    http://msdn.microsoft.com/en-us/library/ms733099.aspx. From my experience, in Windows Azure, we cannot use Windows authentication (the default configuration for WSHttpBinding), unless we use WAAD and let the cloud server join the local domian. So it is
    needed to turn off authentication, or use an alternative authentication mechanism (such as username and password).
    Best Regards,
    Ming Xu
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

  • Visual Studio cannot remote debug Azure cloud service: There was a failure to launch the remote debugger

    I am trying to invoke remote debugger on an Azure worker role cloud service, following the example of
    http://msdn.microsoft.com/en-us/library/azure/ff683670.aspx
    But on attaching the remote debugger for the cloud service instance
    Microsoft Visual Studio
    There was a failure to launch the remote debugger.
    OK  
    According to somebody else's extra coverage on the topic, there are extra ports 4016/4017 that need to be taken care of (but do they have to be exposed externally)?
    http://developers.de/blogs/damir_dobric/archive/2014/02/04/behind-windows-azure-remote-debugger.aspx
    So servicedefinition.csdef gets
        <Endpoints>
          <InputEndpoint name="Endpoint1" protocol="http" port="80" />
          <InputEndpoint name="RemoteDebugger" protocol="tcp" port="4016" localPort="4016" />
          <InputEndpoint name="RemoteDebugger2" protocol="tcp" port="4017" localPort="4017" />
          <InstanceInputEndpoint name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.Connector" protocol="tcp" localPort="30398">
            <AllocatePublicPortFrom>
              <FixedPortRange min="30400" max="30424" />
            </AllocatePublicPortFrom>
          </InstanceInputEndpoint>
          <InstanceInputEndpoint name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.Forwarder" protocol="tcp" localPort="31398">
            <AllocatePublicPortFrom>
              <FixedPortRange min="31400" max="31424" />
            </AllocatePublicPortFrom>
          </InstanceInputEndpoint>
        </Endpoints>
    Serviceconfiguration.cscfg gets
          <Setting name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.Connector.Enabled" value="true" />
          <Setting name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.Connector.Version" value="2.3" />
          <Setting name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.ClientThumbprint" value="THUMBNAIL" />
          <Setting name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.ServerThumbprint" value="THUMBNAIL" />
        </ConfigurationSettings>
        <Certificates>
          <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.TransportValidation" thumbprint="THUMBNAIL" thumbprintAlgorithm="sha1"
    />
        </Certificates>
    But all these are to no avail; the same error still pops for Visual Studio 2013 Update 4; Azure SDK 2.3
    Anybody regularly perform remote debugging for Azure cloud services?
    The melody of logic will always play out the truth. ~ Narumi Ayumu, Spiral

    And, how do I control that in Visual Studio?
    All I get is the Attach Debugger... context menu option in the Azure cloud service nodes in Server Explorer. That is where it is failing. There are no customisable options.
    Because of that, the Attach to Process dialog box is unable to retrieve the list of processes (to debug) in the remote worker role instance server.
    I tested a blank-template worker role project and published to a new cloud project, and this simplistic copy had no problems with the Remote debugger.
    Now the question is, what is it about this real-world project/cloud service that is different from blank sample? From what I compare between what I think are the relevant settings, there are none.
    ServiceDefinition.csdef
    <Imports>
    <Import moduleName="Diagnostics" />
    <Import moduleName="RemoteAccess" />
    <Import moduleName="RemoteForwarder" />
    <Import moduleName="RemoteDebuggerConnector" />
    </Imports>
    <Contents>
    <Content destination=".\">
    <SourceDirectory path="D:\Projects\experiments\workerrole1\workerrole1\rcf\Debug\RemoteDebuggerContent\" />
    </Content>
    </Contents>
    <Endpoints>
    <InstanceInputEndpoint name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.Connector" protocol="tcp" localPort="30398">
    <AllocatePublicPortFrom>
    <FixedPortRange min="30400" max="30424" />
    </AllocatePublicPortFrom>
    </InstanceInputEndpoint>
    <InstanceInputEndpoint name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.Forwarder" protocol="tcp" localPort="31398">
    <AllocatePublicPortFrom>
    <FixedPortRange min="31400" max="31424" />
    </AllocatePublicPortFrom>
    </InstanceInputEndpoint>
    </Endpoints>
    ServiceConfiguration.cscfg
    <ConfigurationSettings>
    <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=storage;AccountKey=" />
    <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
    <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="" />
    <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="" />
    <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="2015-12-31T23:59:59.0000000+08:00" />
    <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" />
    <Setting name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.Connector.Enabled" value="true" />
    <Setting name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.Connector.Version" value="2.4" />
    <Setting name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.ClientThumbprint" value="" />
    <Setting name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.ServerThumbprint" value="" />
    </ConfigurationSettings>
    <Certificates>
    <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="" thumbprintAlgorithm="sha1" />
    <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.TransportValidation" thumbprint="" thumbprintAlgorithm="sha1" />
    </Certificates>
    The melody of logic will always play out the truth. ~ Narumi Ayumu, Spiral

  • Newbie, i have some question

    i'm starting a work and i have some question.
    do i have any advantage in storing procedures and functions in my database?
    what happen if i do the command : grant create any view to user_xpto;
    this is some really dum question but if you can help me i appreciate. before starting to work i realy want to undertand this. i'm doing this in oracle 9i and i am programing in pl/sql developer.

    Hi Ricardo,
    I don't think you've picked the right forum for your question, but I'll try and answer it anyway ;)
    Yes there are huge advantages to storing your procedures and functions in the database. Note however that I would suggest you really use packages rather than standalone procedures and functions. The main reason for this is that you won't have the nightmare (that most of us encounter at some time o r other) of broken dependencies.
    For me, the database is the place to store the logic that affects my data. If you have a routine that you use to create a customer (for example)...if you store that routine in the database (in a package) then ANY client application (Forms, C, Delphi, HTMLDB etc) will be able to call that routine. If however you coded that routine into your client app then you would not be able to reuse it and you would end up having to implement it in each client application. If you then have to change that routine then you would have to change it in multiple client applications as opposed to a single routine if you held it in the database.
    The other big big BIG reason to put your code in the database, is that it will be far more efficient to put your code in the database and to make use of bind variables (etc) than to code it outside of the database.
    There can be exceptions to this rule, for example if you have an incredible complex calculation that could be written faster in C then it could make sense to code the logic externally...however those cases are few and far between (in my opinion).
    There are two groups of Database users in my opinion...
    1) Those who use the database only store and retrieve data, they do all their logic in their client apps...don't believe in constraints, believe that PL/SQL isn't a real language etc....
    2) The ones with the smile on their faces....
    As for your question about "grant create any view"....ummm it will allow the user_xpto to create any view....it's quite "dangerous"...they could replace another users view...do you really want them to be able to do that?

  • What are Azure limitations for Websockets in Cloud Services (web and worker role)?

    A WebSocket Server should be built on Azure platform with OnPrem connections and have questions regarding limitations for Websockets in Azure Cloud Services - web and worker roles.
    Websockets can be configured for Web Sites and limitations are understood, but Azure Websites is not an option. 
    Nevertheless it is planned to run a web service (without UI - no web site) as a Cloud service which has secure websocket (WSS) connections to OnPrem machines. Websocket protocol is enabled for IIS8 on Cloud services web and worker roles. Azure Service Bus Relay
    is not an option.
    Questions:
    1) Are Websockets supported for Azure Cloud services web and worker roles? we assume yes
    2) What are potential limitations from Azure side to support concurrent Websocket connections? We are aware that CPU, memory etc are limitations, but are there additional limitations from MS Azure side? 
     

    Hi,
    As I know, azure cloud service web and worker role support Websockets, users can connect to the role via the special endpoint, if we use Azure cloud service, I think we can monitor the metrics such as CPU, memory, etc... and scale our cloud service via these
    metrics to keep the websockets working, refer to
    http://azure.microsoft.com/en-us/documentation/articles/cloud-services-how-to-scale/ for more information about how to scale a cloud service.
    Regards

  • Is it possible to do Continuous deployment for azure cloud services(website,web and worker roles) using VSO Release management?

    Hi,
    I am trying to do continuous deployment using visual studio online and release management for Azure cloud services. But not able to find the way to do it(with the help of different blogs, those are describing using VM only).
    I tried using Release management visual studio extension also. But no Luck.
    Please help me if it is possible to do continuous deployment using release management.
    Thanks,
    Phani

    Hi,
     Please refer to the following Forum Thread with similar question which has been answered. Let us know if this helps.
     https://social.msdn.microsoft.com/Forums/en-US/9d8322f6-36e5-4cca-a982-d420d34d2072/realease-management-deployment-to-azure-websites-webworker-roles?forum=tfsbuild
    Regards,
    Nithin Rathnakar

  • Java Web Services Newbie Questions

    I have some questions concerning developing Web Services in java. I understand the basic technology and concepts, but am not familiar with the available Java pieces to accomplish what I need to.
    1. What application do I need to service a Web Service? I would prefer to run apache (running on an AS/400). Can apache do this? What in addition to apache (plug-in?) do I need to service the Web Service?
    2. What application (plug-in?) do I need to provide the UDDI lookup for my Web Services? Again, I would prefer to do this in apache. Do I need a plug-in, etc.
    3. Is there an IDE or package that will make creating the Web Service easier. I am currently using Eclipse for some other java work, so it would be nice if this IDE would work well for this. I am hoping for some plug-in that will make it easy for me to provide a method prototype, and the WSDL and perhaps client proxy classes get generated from this?
    4. How should I create my WSDL? (this may be answered by the previous question)
    5. How should I create the client proxy classes? (this may be answered by the previous question)
    6. Anything else (tools, API's, plug-ins) I need to know how to make this happen quickly. I need to implement a couple web services in just a few weeks.
    Thanks.

    1. There are 3 ways i can think of:
    a. J2EE 1.4 App Server (e.g., 1.4 Beta 2 from Sun)
    b. JWSDP
    c. 1.3 IDE with Web Services support (WebShere, Sun One...)
    2. You need to register with a public registry, such as those by IBM, Microsoft, etc.
    3. Partly answered in 1... I prefer working with 1.4, because that is a new standard coming up, so no serious changes will be needed later.
    WSDL and stubs/ties are generated for you by tools like wscompile, but you do have to code the client itself :)
    4. wscompile, etc. can be invoked by tools like ant based on your build file, or by IDE.
    5. Automatically done...
    6. I think i covered the tools above. For the rest, I'd recommend going through J2EE 1.4 Tutorial, or cases like those provided by some IDEs.
    HTH,
    Reshat.

  • Cloud service web role did not get request

    Hi Team,
    we have an application host in web role in a cloud service, 
    sometimes it keeps loading when clicking a button in GUI and got no response till our GUI timeout (30 minutes)
    we use Fiddler to trace the http request and also check IIS logs and found that sometimes the web role didn't get a request,  sometimes the IIS
    got the request and finished to processe the request but didn't return result to GUI.
    it seems the message lost during interaction between UI and web role.
    note that this problems comes out just recently.
    is there some known issues related with this kind of problems. 
    thanks in advance.

    hi Baker,
    Firstly, I need confirm what's meaning is GUI from your description ? The GUI is your cloud service project UI? Or your UI in your client?
    Secondly, base on my experience, we usually could occur timeout error because of the azure load balancer and the long time request.
    For this error, I recommend you refer to those thread:
    Azure Web Role - Long Running Request (Load Balancer Timeout?)
    Windows Azure Load Balancer TimeOut for Cloud Service Roles (PAAS Web/Worker)
    Windows Azure Load Balancer Timeout Details
    http://social.msdn.microsoft.com/Forums/windowsazure/en-US/89b283f0-dfca-49a7-99fe-c3b73d77ff6d/azure-load-balancer-sending-http-request-to-multiple-web-role-instances?forum=windowsazuredevelopment
    If I misunderstood, please let me know.
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Azure VM Web Servers, Cloud Service and SSL?

    I am deploying two web servers in a cloud service for load balancing. I have tested and I have that working with no problems. My question is how do I setup for SSL? Do I setup a certificate on the cloud service? Do I setup on each server? Any help would
    be greatly appreciated!!

    Hi,
    You could use the following link to configure SSL for your Cloud Service:
    http://azure.microsoft.com/en-us/documentation/articles/cloud-services-configure-ssl-certificate/
    Regards,
    Malar.

  • We have concerns with Adobe Acrobat DC - document cloud services and how it relates to HIPAA.  Has anyone else worked through these issues?

    We have questions relating to the Document Cloud services offered with Acrobat DC.  We are considering disabling the cloud feature to stay in compliance with HIPAA.  Has anyone else worked through these issues?

    Hi mikem82897618,
    You can refer the following link to know what can be done with Adobe Document Cloud Services when working in Acrobat DC:
    Store Files Online, Share & Access From Anywhere | Adobe Acrobat.com
    Also, visit this link to know more on how Adobe Document Cloud services are compliant with HIPAA security standards:
    E-signatures vs digital signatures | eSign services from Adobe
    Please specify more details on the same as why you would need to disable the Cloud feature.
    What and where exactly are you facing the trouble?
    Let me know.
    Regards,
    Anubha

  • A question regarding using a JDBC class to connect with cloud service database

    Hello,
    I am currently working on a small scale cloud service report where the company I chose is obviously Oracle. My question is regarding the cloud service in the following way. I was doing my report with the free trial until it just came to me that
    why not to do a small one class program with my netBeans or Eclipse that uses JDBC but I am not sure what username, password and the url to use in the connection to retrieve, manipulate and store values. Can somebody help me please if this is possible or not?
    edit: Anyone please? I have a deadline in 15.8. and could create something great until then if I get the anwser in few days

    To correct my question, I already have the oracle account and I created the cloud service trial account with database and java section.

  • Cloud service with iTunes - how does it work?

    May I use "cloud" service to storage my podcasts? (http://selectel.ru/services/cloud-storage/) iTunes doesn't see the link (Bad http error 502)

    I can't read the page you link to as it's in Russian. However, many 'cloud' service are intended for you to store your files for your own use, requiring a login, and this won't work for a podcast. You need to host the feed and the media files on a web sperver, the same as if they were actually web pages, so that they are accessible to all.
    You may find my 'get you started' page on podcasting helpful:
    http://rfwilmut.net/pc

Maybe you are looking for

  • Component in Multisim

    Hi guys, I just started learning in Multisim.  I tried to add a 4011 and 4017 CMOS Gate into my circuit, but I don't know how to connect VDD and GND to the ICs.  Because there are only input and output pins.  I also wonder that if I can enlarge the 4

  • WiFi settings problem

    I was having trouble with my network/internet connection and made a big mistake.  On the settings page I said "forget this network" and thought I could rejoin my network after entering security info, etc.  No such luck.  Can I recover my network sett

  • Unexplainable pixilating of the screen HELP

    We've had an iMac since 2008/2009 and yesterday the screen started to pixelate. We've got no explanation for why. My mum used it about an hour before it happened and it was running as normal, an hour later my brother went to use it and the screen was

  • PJC deployment best practice

    Hi We have started using several PJCs to enhance our 10g webforms. The conversion has not gone live and I need to decide how to deploy the PJCs. The 2 options that I can think of: 1. Have all PJCs packaged into one jar. Pro - no need to change formsw

  • TextEdit's "Open Recent" menu command: how to increase # of files listed?

    In TextEdit (v. 1.6, in OS 10.6.5), under the "File" menu, there is a command called "Open Recent >" which when chosen lists the ten most recently opened TextEdit files. Select one from the list, and it re-opens. I find this functionality very useful