none
Get informed about a database table change RRS feed

  • Question

  • Dear all,

    I get a WPF application which store every minutes in a local database different status that needs to be send to the web at  a second stage.

    The reason why it is first store locally is simply for security reason in case of internet connection failure, so all is store local first.

    Then the idea I get is to have a Windows NT service which pool that particular database table for data. Then if there are data to read, I will have a method which then dispatch this information outside.

    The windows NT service will then pool the table every 30 seconds for instance

    Does this approach would work efficiently or do you see a better way to handle it ?

    regards

    regards

    Monday, October 27, 2014 11:07 AM

All replies

  • Hi,

     In WCF, callback is used to implement PUSH mechanism, so that delayed or long running operation results can be automatically pushed back to the client application. WCF actively supports callback to its client, over the instance context established.

    Many a times, the requirement demands that the WCF Service pushes data to the application that is consuming it, over the session established between client application and the WCF service. This mechanism can be termed as Callback. WCF actively supports callback to its client, over the instance context established. To understand this scenario, think of it like the WCF service becomes the client and the client becomes the service.

    For detailed information, you could refer to the links below:

    http://www.dotnetcurry.com/showarticle.aspx?ID=721

    http://wcftutorial.net/how-to-create-callback-service-in-wcf.aspx

    Regards

    Tuesday, October 28, 2014 6:17 AM
    Moderator
  • Except that in my scenario the client application is in charge to store data to DB

    So how the NT service, potentially hosting a WCF service knows that new data gets inserted and he can get them ?

    Should I implement a WCF service endpoint method like NewData( int Record Id) that the client application will call, then the WCF service process the db method with the given record ID to collect from DB ?

    It is not a kind of callback mechanism but instead, a kind do that job now

    any comment ?

    regards

    Tuesday, October 28, 2014 12:40 PM