"It depends." - Ted Roche
Why reinvent the wheel? https://mariadb.com/kb/en/mariadb/setting-up-replication/
What is an acceptable delay in the replication process? And what is the size of the data and how much data is changing daily? Hourly?
-Kevin
-----Original Message----- From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of mbsoftwaresolutions@mbsoftwaresolutions.com Sent: Wednesday, July 12, 2017 1:52 PM To: ProFox Subject: Syncing data locally from a remote database
VFP9SP2 app, MySQL(MariaDB) secure database on web
Scenario: customer uses my software but has an extremely slow connection to the remote database and as such, queries involving large, sometimes-changing lookup data is slow. Solution: pull data locally for quick lookup. This works if I can do some sort of Sync operation to make sure the local copy matches the remote copy.
The Primary Keys are varchar-40 GUID, and there's a timestamp field as well. My thought was to use those 2 fields for the sync. If it exists in both and the remote timestamp is newer, update the local record. If it exists in the remote but not locally, add it local. If it exists in the local but not in the remote, delete it from local. Any new adds or updates to existing records will then be done to the remote database and then echoed locally.
I was thinking I'd setup MariaDB locally for this local database.
Comments on that plan of attack?
tia, --Mike
[excessive quoting removed by server]