The waiting time in OTOS can be optimized to shorten the synchronization
cycle.
Determining the Optimum Waiting Time
After a few synchronization cycles, you can get a first estimate of an
optimum waiting time.
Review the log for the time it takes the slave to finish its part. Ignore
the first duration, from the remaining times take the longest and add 300
seconds just in case. The result is most likely very close to the optimum
waiting time for your case.
Example:
First synchronization: 1h 20min
Second synchronization: 21 min
Third synchronization: 15 min
Fourth synchronization: 27 min
The longest time (ignoring the first synchronization) is 27 minutes,
which makes 1620 seconds, plus a margin of 300 seconds = 1920 seconds.
 |
As the database grows in size, so will the
synchronization cycles take longer. Make sure that the waiting time
does not become too short. You will recognize this be "No export messages
on server" errors. In that case, increase the waiting time. |
Synchronization with Several Locations
When synchronizing several locations it is recommended to complete the
synchronization cycle with one location and then proceed to the next. If
multiple synchronization cycles were started simultaneously, and just as
many instances would be listening in the main office, this may seriously
affect server performance. Inserting data into the database is relatively
resource-heavy, as records need to be created, referential integrity
checked, and indexes updated.
Assuming a 15-minute cycle, an example schedule would be:
Branch 1 |
Branch 2 |
Branch 3 |
Main Office |
|
|
|
@00:00 OTOS 001 /E |
@00:15 OTOS 001 |
|
|
|
|
|
|
@00:45 OTOS 001 /I |
|
|
|
@01:00 OTOS 002 /E |
|
@01:15 OTOS 002 |
|
|
|
|
|
@01:45 OTOS 002 /I |
|
|
|
@02:00 OTOS 003 /E |
|
|
@02:15 OTOS 003 |
|
|
|
|
@02:45 OTOS 003 /I |
An alternative would be to do the imports one after another, potentially
saving some time.
Branch 1 |
Branch 2 |
Branch 3 |
Main Office |
|
|
|
@00:00 OTOS 001 /E |
@00:15 OTOS 001 |
|
|
@00:15 OTOS 002 /E |
|
@01:15 OTOS 002 |
|
@00:30 OTOS 003 /E |
|
|
@02:15 OTOS 003 |
|
|
|
|
@00:45 OTOS 001 /I |
|
|
|
@01:00 OTOS 002 /I |
|
|
|
@02:45 OTOS 003 /I |
 |
Do not run more than one instance of OTOS on the
same server and/or database. |