none
Is this the correct approach to poll the database?

    Question

  • Hi, I am creating a WCF service (CALLER) for Azure. The service(CALLER) calls async methods of another third party service(EXTN). The third party service calls the callback methods of another WCF service (LISTENER) hosted by me on Azure. CALLER enter the service details in the database with status = PENDING. In the callback service (LISTENER) I am updating the status of the request as COMPLETED/FAILED in the database. But I want the CALLER should be notified when status is updated in the SQL Azure db. I am thinking of creating a worker thread which will poll the database periodically to check the status update and notify the CALLER about this. Is there any other better / efficient alternative to this approach?
    Tuesday, August 03, 2010 8:41 AM

Answers

  • Hi khenatram,

    I understand that you have two WCF service, one(CALLER) is submit jobs to third party through service, the other(LISTENER) is handling the status of jobs returned from third party. Now, you want the CALLER got notified when LISTENER update the job status in db. If I misunderstood you, please correct me.

    You could utilize Windows Azure Queue storage to achieve this. the LISTENER send message in queue, and CALLER receive queue message to get notification on job status. In this way, the CALLER needn't polling query the db.

    Thanks, 


    Mog Liang
    • Marked as answer by Mog Liang Tuesday, August 10, 2010 2:46 AM
    Wednesday, August 04, 2010 2:00 AM