The biggest problem in folder synchronization is solving file conflicts. Imagine that you are in fully synchronized state. Now, at the same moment, two users start to modify “data.txt” file – one on the computer 1, second on the computer 2. Both users save their changes. Now, automated synchronization process detects changes of “data.txt” file and tries to synchronize it – unfortunately, it cannot resolve the conflict automatically, so it has to leave it for user interaction or it can take some defined actions e.g. transfer “data.txt” file from computer 1 to computer 2 and name it “data.txt.sync.computer1”.
This is general problem, but if you cannot encounter this, folder synchronization should be “easy” task.
You need to keep track of all files, so you can determine which ones were changed, deleted or created since last synchronization. Which means you need to have some kind of database.
You can use SFTP protocol as transport layer. Rebex File Server implements server side and Rebex SFTP implements client side. With planned virtual file system (available in beta version of Rebex File Server yet) you will be able to store data on server in any format (file system, database, online storage provider, etc.). Moreover, you have both client and server completely under your control, so you can implement any custom command e.g. give me list of changed/deleted/created files, etc.
However, this will still take a lot of coding, so maybe you can look around for some existing solution or consider using some cloud solution.