On Thu, 2008-10-16 at 13:38 +0200, Axel Kittenberger wrote:
> For simplicity we just exec()ed the systems installed rsync binary to
> invoke rsync for a directory when a change happened in it. Now some
> users complained that this strategy involves a lot of forking on a
> vivid directory structure.


> Now do you think it is feasible to go for another strategy than
> working at hands distance by forking?


> The other alternative would be to directly link with the rsync files
> (the possibilities of the GNU world), and call /use its according
> functions just like the rysnc main() function would do.


The rsync codebase is really designed for a single run. It would
probably be possible to modify rsync to the point where you can call
functions to process individual directories that need processing, but
making everything work correctly and maintaining this derivative of
rsync may be more effort than you would want to spend. Forking may be
the most practical solution.

Another option would be to develop your own protocol for indicating
changes at the file level and use librsync to delta-transfer individual
files (similar to Unison's approach). This might let you integrate the
file manipulation more tightly with the change notifications you get
from inotify.

Matt

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html