none
Call back/Asynch or Polling design. RRS feed

  • Question

  • Guys,

    We have a client where we send some data for processing. They have exposed a WCF method which accepts this data and process it. So far so good. Now, We are also expecting this data back from them after the processing is complete and looking for ways to implement it our end. Client suggested that they could expose another method which would return true/false (depending on whether the data is ready to be picked up). Basically the idea is to keep pinging/polling every now and then and once we know it's ready, call another method of the same service which would return the data to us and we further process it and load into our database.

    I need to design a solution using C#/.Net at our end. Is there a best approach to cater the above given scenario ? I am debating on several different approaches and looking for inputs from experts. Highly appreciate any input on this.

     

    Friday, January 8, 2016 4:44 PM

Answers

  • Hi msdnlover,

    According to this case, as for WCF async operation execution, generally the async we mentioned is the client-side async operation invoke which is done through the ASYNC client proxy class. You can generate the async operation interface when you create the WCF client proxy(via svcutil.exe or visual studio Add Service reference):

    Synchronous and Asynchronous Operations

    How to: Call WCF Service Operations Asynchronously

    If you want to make your service design like an async service, one common design is using the one-way and duplex channel(support callback) to achieve such async execution result. And in such cases, since the binding, channel you used has changed, the WSDL document of the service will reflect such kind of changes:

    Event-based callback contracts on WCF duplex clients

    Best Regards,

    Wanjun Dong


    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.

    Monday, January 11, 2016 8:16 AM
    Moderator

All replies

  • Hi msdnlover,

    According to this case, as for WCF async operation execution, generally the async we mentioned is the client-side async operation invoke which is done through the ASYNC client proxy class. You can generate the async operation interface when you create the WCF client proxy(via svcutil.exe or visual studio Add Service reference):

    Synchronous and Asynchronous Operations

    How to: Call WCF Service Operations Asynchronously

    If you want to make your service design like an async service, one common design is using the one-way and duplex channel(support callback) to achieve such async execution result. And in such cases, since the binding, channel you used has changed, the WSDL document of the service will reflect such kind of changes:

    Event-based callback contracts on WCF duplex clients

    Best Regards,

    Wanjun Dong


    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.

    Monday, January 11, 2016 8:16 AM
    Moderator
  • Thanks Wanjun ! I'll look into it and see how well it serves my purpose.
    Monday, January 11, 2016 10:13 PM
  • Hi msdnlover,

    Have you resolved this issue? If not, please let me know.

    Best Regards,

    Wanjun Dong


    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.

    Monday, January 18, 2016 7:49 AM
    Moderator