[Csync2] periodic check of hints table

Michael Milkovich michael.milkovich at warecorp.com
Tue Nov 1 20:46:30 CET 2005



I'm developing an inotify-based  "watcher" daemon (iwatchd?) that 
populates the csync2 hints table.

The plan is to run iwatchd constantly on each of the writable machines 
in the cluster, updating each local hints table.  We will use csync2 to 
do the actual resynchronization across the cluster.

The iwatchd code is working reasonably well. (it's still **ugly** code, 
but it's **functional** ugly code).

In my particular application, I can assume that file changes on a local 
filesystem will be small but constant -- e.g. a few changes per second 
over a collection of several hundred thousand files.  I can also assume 
that file changes made on one host should be available to the other 
hosts within a few-second window.

I am looking for suggestions on how to run the csync2 side of this.  My 
current thought is to have on each machine an inetd-based csync2 
listener, and then periodically run csync2 -c followed csync2 -u.  One 
possibility is to just put these two lines into a cron job and run it 
once a minute or so.  Another possibility is to add a "delayed repeat" 
function to csync2 -- process all hints, sleep for x seconds, then 
process all hints again.  A third possibility is to rig up some kind of 
signal to a daemonized csync2 that says "there are new hints, wake up 
and do something about them".

Suggestions?

-- 
    Mike Milkovich
    www.warecorp.com



More information about the Csync2 mailing list