I am developing a C # Winform application, it is a client and connects to a web service to receive data. The data returned by the webservice is a DataTable. The client will display it in the DataGridView.
My problem is that: the client will get more time to get all the data from the server (the web service is not local with the client). So I have to use a stream to get data. This is my model:
The client creates a stream to receive data -> the stream completes and passes events to the client -> client mapping data on a datagridview in the form.
However, when the user closes the form, the user can open this form at a different time, and the client must receive the data again. This solution will lead to a slow client.
So, I am thinking about cached data:
Client <--- get / add / edit / delete ---> Cached Data - get / add / change / delete ---> Server (web service)
Please give me some advice. Example: should cached data be developed in another application that is the same host with the client? Or cached data runs in the client. Please give me some methods to implement this solution.
If you have any examples, please give me.
Thank.
UPDATE: Hello everyone, maybe you are thinking about my problem so far. I just want to cache data in the life of the client. I think cache data should be kept in memory. And when the client wants to receive data, he will check the cache.
source
share