[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coldsync-hackers] Hotsync proxy to coldsync ...
Andrew Arensburger wrote:
>
> One way to do this would be to have the two hosts exchange md5
> signatures for their respective PDBs. If the signatures match, no
> further syncing is required.
> If they don't match, the obvious thing to do would be to
> exchange md5 signatures for the records themselves. However, I've seen
> PDBs with over a thousand records. Usually only a handful of these
> will have changed at any one time. So perhaps a better approach would
> be to split the PDB up into eight sections, and calculate the md5
> checksum for each such section. That way, the two hosts can quickly
> verify that large chunks of the PDB match and need not be synced. Once
> a differing eighth is found, it can be split up into eight more pieces
> recursively, and so forth.
> Or maybe you can look at cvsup and similar protocols to see
> what they do. I suspect this is a solved problem; it's just a matter
> of finding the solution.
I've always fancied (in ~/.palm/backup):
% rsync -e ssh --progress -Cuavz othermachine:.palm/backup/ .
% coldsync -F
% rsync -e ssh --progress -Cuavz . othermachine:.palm/backup/
I use this to avoid having the fast/slow sync issue when I sync on my
laptop. That way, I can always use the "-F" option. Rsync is probably
pretty close in terms of network usage as a record-based system you
describe is, though it is somewhat more computationally intensive, since
it has no notion of the granularity of the data. For small data sets
like Palm dumps though, these syncs really fly (e.g. faster than
fast-syncing the Palm when used over a 28Kb modem).
For a nice whitepaper describing the algorithm, see
http://rsync.samba.org/rsync/tech_report/
JD
This message was sent through the coldsync-hackers mailing list. To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body. For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.