Detached Smart Client Syncing

I am working on an application at the minute that will originally be just installed on a client machine with a lightweight database (may SqlLite).

After a while I want to add a web version of the same piece of software and with this the smart client will then be able to sync with the online version.

Has anyone done anything similar, I am looking to know:

  1. What is the best way of syncing, are there patterns around it?
  2. Are there any frameworks out there to handle syncing?
  3. Is there any gotcha's I should be aware of from the start (maybe security concurrency)?
  4. What would be the best way to architect this?

Thansk in advance...

Answers


So, Microsofts Sync Framework will help with this. Introduction

Couple of issues stand right out at the beginning.

If you are going to have the data exisit on the client first, then sync to a server at some point later, you need to think about what happens when a number of clients all sync to the server, esp. around conflict resolution.

There are events that get raised on the server side to idetify when a conflict occurs, but you need to decide who wins. (one on server, one from incoming client). Depending on wht you choose to do here, the second sync is likely to modify the client data.

Think carefully about what to sync. If its a contacvts database, is it good enough to have just the client name and telephone number sync, or do you need to whole contact history as well?

Think in terms of syncing a table, using rows where the key is all the same value. Even if this is a constructed table with triggers etc. This makes the framework sync a much simpler process and less prone to errors (tables needed to be synched in different orders).

If its an invoicing program, maybe an upload only table of orders is needed, with all the assoiciated invoice, history, reporting tables etc being updated on the server, rather than updating them on the client and syncing multiple tables....


Need Your Help

Java Database AutoIncrement Primary Key Algorithm

java sql

I have a sqlite database with an autoincrement primary key which is interfaced through java.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.