Client-server synchronization pattern / algorithm?

Posted by tm_lv on Stack Overflow See other posts from Stack Overflow or by tm_lv
Published on 2009-01-05T13:26:03Z Indexed on 2010/05/28 17:21 UTC
Read the original article Hit count: 220

I have a feeling that there must be client-server synchronization patterns out there. But i totally failed to google up one.

Situation is quite simple - server is the central node, that multiple clients connect to and manipulate same data. Data can be split in atoms, in case of conflict, whatever is on server, has priority (to avoid getting user into conflict solving). Partial synchronization is preferred due to potentially large amounts of data.

Are there any patterns / good practices for such situation, or if you don't know of any - what would be your approach?

Below is how i now think to solve it: Parallel to data, a modification journal will be held, having all transactions timestamped. When client connects, it receives all changes since last check, in consolidated form (server goes through lists and removes additions that are followed by deletions, merges updates for each atom, etc.). Et voila, we are up to date.

Alternative would be keeping modification date for each record, and instead of performing data deletes, just mark them as deleted.

Any thoughts?

© Stack Overflow or respective owner

Related posts about synchronization

Related posts about client-server