4D based mirror component – take two
4D based mirror component – take two
My first attempt to mirror data from 4D to another database didn’t work. So, I’m taking another crack at it with lessons learned from my previous attempt.
My aim now is to make a component that will be transaction safe, and model itself after the 4D KB article published about Synchronization and Replication in v12 (4D partner login required). Since I am still using v11 and a v12 upgrade is not on the horizon, I am taking my own approach.
Component
Allow definition of multiple ‘mirror preferences’. Each of these linkages would define:
tables and fields to mirror
-> table pk field name
-> table last updated date/time field names
-> boolean field name to escape mirroring (so you can accept changes to the mirrored database and write them back without mirroring them out again)
interval to execute at
service to utilize (soap, file, sql, plugin)
last run date/time
@todo build synchronization of table/field names via alter table
Process
On the defined interval, or manually, the server process would spawn processes to look at target tables for updated/new records (making it transaction safe) and then of the records that were updated send over the target data.
Feel free to take it and run with it. Feedback and your thoughts welcome.
Say is there a market for companies that want to have their data available in a SQL database of repute?
More post to follow.
Author’s Note
Initial md
Generated using https://github.com/jsr6720/wordpress-html-scraper-to-md
Original Wordpress categories: [‘4D’]
Original Wordpress tags: “4D”, “4d component”, “mirroring”, “v11”
Original Wordpress comments: None
Significant revisions
tags: 2011, wordpress, txcowboycoder, 4D, 4D-component, mirroring, 4Dv11, change-data-capture
- May 6th, 2024 Converted to jekyll markdown format and copied to personal site
- Jan 28th, 2011 Originally published on txcowboycoder wordpress site