Replication of data

Print Top page

The purpose of a task - to synchronize changes of objects on various maps of one region, using log of transactions, i.e. the updatings of objects made on one document, can be selectively propagated to the same objects on other maps.     As the first step of an execution of a replication is initiation. It is used for setting up the "Initiation of replication" bookmark of dialogue with an opportunity of a choice of a filename of input both output map and the list of the operations which have been written down into log of transactions of an input map.

The file of settings considers at will of the user as all operations from log of transactions, and selectively by marking of interesting records.  

 

_bm3477

 

If the existing file of settings is chosen, on the screen there will be a message:

 

_bm3478

 

The answer "Yes" - a file will be updated, having included all operations from log of transactions;

The answer "No" - the operations selected in a window or transaction which date of record surpasses the date specified in a file of settings in a field will be written downinto a file .TO.

On pressing "Cancelling" the file will not change.

 

As a result of an execution of the settings program the control text file with .rep extension (file of settings) is formed. The file contains the list of unique keys of objects and an attribute of their updating (creation, deleting, editing), belonging one sheet.

Structure of .rep file:

.REP

.FRM  a date of transactions starting

.TO     a date of finish

.MAP  a filename of the passport of map containing objects of a replication

.NOM a sheet nomenclature

.DEL    an unique key a mask of processing  

.NEW  an unique key a mask of processing  

.UPD   an unique key a mask of processing  

… …..

.NOM a nomenclature

.DEL   an unique key a mask of processing  

.NEW an unique key a mask of processing  

.UPD  an unique key a mask of processing  

… …..

.END

 

The abbreviation “.DEL”, “.NEW”, “.UPD” is used for a designation of type of operation-

deleting of object, creation or updating.

The output map is a source of a replication, onto it the objects edited on an input map chosen from the list of transactions by type of operations and a time attribute are copied. This map represents “the common resources” for various maps and objects are delegated to a map-receiver of a replication.

 

The unloading of objects of a replication is realized at activation of a Replication dialog's bookmark:  

 

_bm3479

 

- to set a file name of the output map requiring synchronization;

- to set a filename of settings created at the previous stage.

 

The choice of a priority of updating of objects characteristics depends on the user and matters in case objects of a map-receiver of a replication (an input map), having same keys, as objects of a derivative file (an output file of the previous stage of a replication execution), were updated, and these updatings should be kept.  

Installation of a priority of an execution has the purpose as much as possible to secure the spent changes on maps.  

At processing the type of operation “Creation of object” the such situation can arise:

on a map - a source of a replication and a map-receiver the various new objects with identical unique numbers have created. Depending on the priority specified in dialogue the keys of objects (unique numbers) will change - the object of a replication on a map with a smaller priority gets a key onto one greater of maximal for the given sheet.

At processing the type of operation “Deleting of object” it is necessary to consider editing of object of a replication on a map - receiver. If this map possesses the greater priority, the updated object does not be deleted.

At processing the type of operation “Updating of object” in case when the object of a replication on a map - receiver is deleted and a priority belongs to a map - source of a replication, the object is restored and updated according to the task.

 

The remark: if the map-receiver of replications is created with the classifier differing the classifier of a replicating map, objects of this map will be recoded according to data of the classifier of a input map.   After an execution of a replication into log of transactions of a map-receiver the record with code TAC_MED_REPLIC will be made.

Into a text file the information on an execution of process of a replication by objects Replic.log is placed.

Result of an execution of the program is the updated input map.