Synchronizes folder across two systems (master and slave). There is no distinction between master and slave, just that master creates ServerSocket and client connects to it.
There are few caveats in the current implementation:
- Once the connection is disconnected, the system does not establish the connection again and server in both the systems will have to restart. This is because of time constraint and can be taken care of in the next version.
- The content of the file is not checked while comparing and only the latest version is kept.
Requirements: maven, Java 1.8 or later
To build the Jar file: mvn clean package
java -classpath "Path to jar file" com.socialcops.main.Main
Configuration can be set by placing the file "config.properties" in the directory from where jar file is executed.
*The program must have write permission to the folder from where it is executing as it will stote log files in the location.
Sample config file:
master=slave or master=master
server.ip=127.0.0.1
server.port=5003
sync.folder=data
schedule.delay.in.millis=2000
data.delivery.delay=120000