wcf - What is the best way to keep cached data to be shared across diff WPF applications across same machine? -


I'm thinking of keeping data in WCF hosted service in datasets and other apps (on one box) Data can be accessed through named pipes (exposed via WCF service) app then put a copy of the dataset in it so that the data will not be brought from WCF until it is changed.

The data is derived from the server as a detro archive, so I am writing it as DataTables and it is a dataset As I am storing.

The data will rarely change but when I need to notify all the client applications, the data has been retrieved.

I do something with an app that I wrote.

When data changes using callback, you can easily let customers update service. When a customer joins the service, you will need to store your callback information and when the data is updated, you will close the message to each subscribed client.

Here is the contract for callback:

Public Interface Isismesses Callback {[OperationContract (Ionew = true)) Recovered service message (service messaging message); }

This service implements this interface. This private sector service is:

  /// & lt; Summary & gt; /// Callback captures recipients /// & lt; / Summary & gt; Private listing & lt; IServiceMessage Callback & gt; CallbackMessages = New list & lt; IServiceMessageClallback & gt; ();  

When the customer does something like this:

  IServiceMessage callback callback = OperationContacts. Present. GETCallbackChannel & lt; IServiceMessageClallback & gt; (); CallbackMessages.Add (callback);  

And in the end, whatever method you have, it should also be done in updating the data of that service:

  action & lt; IServiceMessageClallback & gt; Fire = delegate (IServiceMessage callback callback) {callback.OnReceivedServiceMessage (service message); }; Messages to // loop and callback callbacks through callback channels. ForEach (fire);  

I have explained this code together with a huge service ... I hope the pieces are out of context.


Comments