Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I would like to make sure that we are on the same page.
- 1. It should be a desktop application that is constantly running in the background on different OS (Windows, Linux, MacOS) and starts automatically when the computer restarts.
- 2. The application analyzes a configuration file in runtime.
- 3. The configuration file should look like:
- [remoteDB]
- db_host = 52.32.152.34
- db_port = 8080
- db_user = root
- db_password = root
- db_name = mydatabase
- db_table = mytable
- db_type = oracle
- [localDB]
- db_host = 127.0.0.1
- db_port = 80
- db_user = root
- db_password = root
- db_name = mylocaldatabase
- db_table = mylocaltable
- db_type = mysql
- db_table_columns = column1, column2, column3 //column names, that should be synchronized with remote database
- 4. Check every 1 minute for new records in the local database, if there are new records it will synchronized to the remote database.
- Database structures:
- remote database:
- [mytable]
- -id [1,2,3]
- -column1 = [1,2,3]
- -column2 = [4,5,6]
- -column3 = [7,8,9]
- -column4 = [10,11,12]
- local database:
- [mylocaltable]
- -id [1,2,3]
- -column1 = [1,2,3, 99]
- -column2 = [4,5,6, 98, 97]
- -column3 = [7,8,9, 96]
- -column4 = [10,11,12, 95, 94]
- -column5 = [13,14,15]
- -column6 = [16,17,18]
- According the configuration file we should get this result:
- [mytable]
- -id [1,2,3]
- -column1 = [1,2,3, 99]
- -column2 = [4,5,6, 98, 97]
- -column3 = [7,8,9, 96]
- -column4 = [10,11,12]
- local database:
- [mylocaltable]
- -id [1,2,3]
- -column1 = [1,2,3, 99]
- -column2 = [4,5,6, 98, 97]
- -column3 = [7,8,9, 96]
- -column4 = [10,11,12, 95, 94]
- -column5 = [13,14,15]
- -column6 = [16,17,18]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement