This works excellent and if you need just a part of your data to be synchronized you may split your
data into smaller pieces using Global mapping
Or if you need bi-directional synchronization on Class/Table level you can use the Object Synchronization Feature
The limit of all these excellent features:
They just work from Caché/IRIS to Caché/IRIS.
If you need to synchronize your data to some external DB you require some other solution.
The solution is available in Caché/IRIS since quite some time and works excellent.
^OBJ.DSTIME does the magic.
It was built to allow data synchronization with Deep See.
It keeps a very simple journal on Object / Table changes by signaling Modified,New,Deleted
This could be useful not only for DeepSee but for any other type of Data Synchronization.
The Global ^OBJ.DSTIME has 2 additional features
- It is wrapped in a persistent class %SYSTEM.DSTIME
so you can use it also as normal SQL Table to select your changes
- It maintains a version ID (named DSTIME) that allows control of synchronized junks:
- you fetch the last version
- increase the version
- and then you upload your changes wherever you require them based on the fetched version
And as you do the synchronization by pure SQL your target can be just any DB understanding SQL.
I extended the class %SYSTEM.DSTIME and placed an example in Open Exchange to try it in SAMPLES