There is a Client who works with WCF service.

WCF service in turn provides information from MS SQL database.

The client can change data through WCF service in SQL server.

Actually the question is how to properly maintain data on the client up to date?

How correct will it be every 5 minutes for the timer to request data from the WCF service? Maybe there is a more competent approach?

  • depends on business requirements. the safest way is to retrieve data from the database with each request. - AdamSkywalker 10:39 pm
  • instead of the announcement of the award, it would be better to clarify the question so that it can be answered - AdamSkywalker
  • see about duplex channels here , here and also here , here , here , etc. - Oleg

2 answers 2

SQL Server can notify the WCF service of changes to tables of interest. And the service, in turn, notify customer subscribers .

    In youth there was such a mistake, at the start of the program I downloaded a lot of data from the database, then I wrote wrappers to the collections that these sets synchronized. At the start, the program was loaded for a long time and there were a lot more shoals. I agree with @AdamSkywalker it all depends on the business requirements.

    There is an alternative approach. Download data for a specific operation, for example, you need to find a contract, you do not need to download all 100,500 contracts. And then scroll and search for the desired contract. This is wrong from the UX point of view. The user anyway at one point in time does not see 100,500 contracts. Download the 10 latest contracts and show them to the user. He did not find, entered the search criteria (filter + sorting) and under this filter the number of contracts the user sees is required, after he chooses the contract, the whole list is not needed, it is ejected from memory.

    • What does the "scrolling" and the general GUI? - Igor
    • @Igor has nothing to do with synchronization. Described the situation as possible to avoid synchronization. - Marat Batalandabad