I was looking into lipsync on a Dropbox clone. I was looking at the diagram on how it works here.It shows that a cronjob is used to keep files in sync between client and server. Does that mean that every sec/min/hour, a cronjob runs and checks to see if there is a difference between client and server? Is that how Dropbox does it?If it does use a cronjob, what happens when you are in the middle of syncing and another cronjob runs? Does rsync (or additional libs) know how to handle this?
Does Dropbox use a cronjob to sync up?
synchronization
No, Dropbox and any decent synchronization tool relies on file system events. All operating systems offer such events and programs like Dropbox are just simply listening for changes on files they are watching. When a change happens, or file is added / deleted, Dropbox decides what it has to do.If several events happen while others are in progress, they a queued and executed sequentially, or parallel where possible.EDIT: for Linux see the inofity file system event system. 