I've got a server app that offers data to a number of clients over network. You can imagine the data as a huge list of strings. The data on the server may change and need to be synchronized on all clients.
I'm currently using this approach: On initial connection, a client app requests all current data (which may be a lot of bytes). Then, it subscribes to updates (addition,s changes and deletions) of any data.
This works fine unless the data are changed on the server inbetween sending the initial data list and the app subscribing to changes - in that case, the client misses a few updates and works on outdated data without knowing it.
I believe this is a very common scenario, so there should be a pattern that solves the issue. I'm using C# 4 and WCF, but the pattern should be language agnostic I believe.
Have you had a look at Microsoft's Synchronization Framework for .Net. It gives you finer control over what gets synchronized and how. WCF is fully supported. It supports incremental updates and synchronizing changes back to the server.
The API is pretty big and covers more than just Database Synchronization but there are plenty of articles out there. This should get you started:
Introduction to Sync Framework Database Synchronization
Synchronizing Databases
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With