rsync for PDAs?
burley at tabq.com.au
Tue Aug 6 18:45:01 EST 2002
Martin Pool <mbp at samba.org> writes:
> On 6 Aug 2002, Donovan Baarda <abo at minkirri.apana.org.au> wrote:
> > On Mon, Aug 05, 2002 at 12:13:49PM -0700, Cliff L. Biffle wrote:
> > > I've been working for the past few months with open-source solutions for
> > > syncing Palm PDAs (Coldsync, mostly). I've been becoming increasingly
> > > annoyed with Palm's Desktop Link Protocol and the sync mechanism, and am
> > > considering replacing it with a third-party application for the Palm. Since
> > > I've had good luck with rsync in the past, its seemed an obvious choice.
> > >
> > > I've read over the technical documentation and the algorithm looks like it
> > > could be implemented on a 'small' system. (In this case small is roughly
> > > 20mhz+, with very little RAM available on top of that used for storing
> > > files.) However, theory rarely reflects reality. My question is for anyone
> > > who has experience implementing rsync: how processor/RAM intensive is it
> > > really? Is this a pipe dream for resource reasons?
> > >
> > > (Now, I'd probably be using a slightly modified rsync, because files in PalmOS
> > > aren't flat files, but rather record databases. However, that'd just mean
> > > the software should be record-aware, but probably won't require a lot of
> > > modification.)
> I too would strongly recommend that you use librsync rather than
yes, as well.
> It's not the resource problems that will get you but e.g. the
> hardcoding of a fork() model into rsync, and just the knottiness of
> the code. I'm not saying it would be impossible, but librsync would
> be easier.
Good point Palm applications are expected to be single threaded. The
multi-tasking api is not released, certainly not up to version 4.x. It
may be different for version 5.0, I am not sure. There are many other
system calls that are also not directly available on PalmOs. It would
be a nightmare. Besides that the other end might have to be Palm file
aware as well so you have another version of rsync running under a
different OS reading and writing Palm database and program files.
> Presumably you could make some headway by just sending checksums of
> records that are possibly changed but may not be.
One approach is to add a librsync layer to the the pilot-link set of
programs http://www.pilot-link.org/ (The developers would probably be
keen to here from you). On the palm It might be possible to add a
virtual device driver that implements the librsync
functionality/protocol between the palm and the pilot-link host. The
standard hotsync program would just work which already checks for "file"
changes and only syncs out-of-date files. This way the host program can
handle the networking and the rsync functionality is kept as protocol
layer that only sends the blocks that are different underneath the
hostsync protocol. This is very doable.
More information about the rsync