Skip to Content
SAP Advantage Database Server

Dual Mode Synchronized Application

One solution might be to use Advantage replication.  This, however, would require that you run ADS on the laptops rather than ALS (local server does not support replication).  The idea would be to replicate from the main (central) database to each of the laptop databases.  Advantage maintains a queue of replication updates and sends the updates when the connection can be made.  If the target cannot be reached, then updates are stored in the queue.

And, likewise, replicate from each laptop back to the central database. And the same situation applies.  The updates would be stored in the queue while it is offline.  And then when it can connect, the updates would be sent to the main database.

One potential issue in this scenario is how to "nudge" the replication to start when the connection is available.  There is a separate thread in Advantage that manages that process and periodically attempts to connect and replicate if there is data in the queue.  However, the wait time grows over time (continued failures).  I think that it can end up getting to be 1 hour between attempts at the high end.  You wouldn't want to have to sit and wait for the next attempt.  But this can be resolved with the system procedure sp_ProcessReplicationQueues.

There is, of course, the possibility of conflicts with replication.  If two users on different laptops change the same record, then there will be a conflict when they replicate back to the main database.  These can be handled with ON CONFLICT triggers.  If, though, the users on the laptops are dealing with independent portions of the data, you may not have issues with that.

No comments