Using Caché Objects - InterSystems Documentation
Using Caché Objects - InterSystems Documentation
Using Caché Objects - InterSystems Documentation
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
About Updates<br />
• If two changes require reconciliation. This requires determining if the two changes were<br />
to a common property or to non-intersecting sets of properties.<br />
17.1.3 The SyncSet and SyncTime <strong>Objects</strong><br />
When two databases are to be synchronized, each has transactions in it that the other lacks.<br />
This is illustrated in the following diagram:<br />
Two Unsynchronized Databases<br />
Here, database A and database B have been synchronized at transaction 536 for database A<br />
and transaction 112 for database B. The subsequent transactions for each database need to<br />
be updated from each to the other. To do this, <strong>Caché</strong> uses what is called a SyncSet object.<br />
This object contains a list of transactions that are used to update a database. For example,<br />
when synchronizing database B to database A, the default contents of the SyncSet object are<br />
transactions 547, 555, 562, and 569. Analogously, when synchronizing database B to database<br />
A, the default contents of the SyncSet object are transactions 117, 124, 130, and 136. (The<br />
transactions do not use a continuous set of numbers, because each transaction encapsulates<br />
multiple inserts, updates, and deletes — which themselves use the intermediate numbers.)<br />
Each database holds a record of its synchronization history with the other. This record is<br />
called a SyncTime table. For database, its contents are of the form:<br />
Database Namespace Last Transaction Sent Last Transaction Received<br />
------------------------------------------------------------------------------<br />
B User 536 112<br />
<strong>Using</strong> <strong>Caché</strong> <strong>Objects</strong> 147