use inoitfywait and rsync to keep sync directory of two hosts/directory
when event occurs, call rsync to rsync the change.
A proccess inotifywait on the resource which be monited, and write event to event file : EFILE
B proccess inotifywait on the EFILE , when event come on , it read the EFILE and produce synchronous.
DELETE EVENT : delete file or directory, use rsync --delete to delete the pair side.
not DELETE EVENT : the others , use rsync to synchorize the change.
each event trigger an rsync synchronous. Delete, create, write file will trigger sevral event, so trigger too many rsync proccess at a time. this maybe not suite to sence that file or directory change frequently.
change to the same file may at the same time in each side maybe casue file incorrect.