Individual Smart Client Sync

I am working on the application at that moment, which initially will simply be installed on the client machine with a lightweight database (maybe SqlLite).

After some time, I want to add a web version of the same software, and with this, a smart client will be able to synchronize with the online version.

Has anyone done something like this, I want to know:

  • What is the best way to sync, are there patterns around it?
  • Are there any frameworks for handling synchronization?
  • Is there any information I should know from the very beginning (possibly concurrency security)?
  • What would be the best way for an architect?

Thansk in advance ...

+4
source share
1 answer

So, Microsoft Sync Framework will help with this. Introduction

A couple of problems are right at the beginning.

If you first want to receive data on the client, and then synchronize with the server at some point later, you need to think about what happens when several clients synchronize with the server, especially. around conflict resolution.

There are events that occur on the server side to identify when a conflict occurs, but you need to decide who wins. (one on the server, one from the incoming client). Depending on what you decide to do here, the second synchronization is likely to change the client data.

Think about what you need to sync. If it's a contacvts database, is it enough to have a customer name and phone number, or do you need a complete contact history?

Think about how to synchronize a table using rows where the key has the same value. Even if it is a built table with triggers, etc. This makes the framework synchronize a much simpler process and is less error prone (tables must be synchronized in different orders).

If his billing program might need to download only the order table, all information about bills, history, reports, etc. It is updated on the server, but not updated on the client and synchronizes several tables ....

+1
source

Source: https://habr.com/ru/post/1302630/


All Articles