Basic Problems to be Solved during synchronization:
The source record changes, detects and processes the change transfer destination (destination), and the destination (destination), and applies the change to the local (apply.
How to record changes and check and handle conflicts is the core issue to be addressed by the synchronization framework.
To solve these problems reasonably and efficiently, you need to do a lot of meticulous work. The Microsoft synchronization framework abstracts these general problems, and the sync framework uses metadata (metadata) to track changes and check for conflicts.
Metadata includes the following basic concepts:
The record changes must first identify who the changes are made. Therefore, the concepts of replica, unit, and item are proposed;
How to mark these changes puts forward the concepts of flexible identifier and global identifier;
The version concept is used to record changes. In MSF, the version is represented by the key and tick count.
MSF uses the knowledge concept to efficiently record changes, and strives to minimize the operations to track changes and the data to be transmitted over the network.
Batch and other concepts are used to improve synchronization efficiency.
The following is a simple explanation of these basic concepts. The series below will introduce important concepts in detail.
Batch (batching)
A batch of changes can be sent as a whole, rather than one by one, to improve performance.
Change Unit)
Minimum unit used to track storage changes. The change unit is included in the item, for example, the name and address in the address book entry are automatically. Only the change unit must be sent during the change propagation process. During the conflict detection process, only modifications to the same change unit are considered as conflicting.
Client)
Services, applications, or devices that want to be integrated with the sync framework architecture are called clients.
Clock Vector)
Composed of key/tick count pairs, representing all updates (updates) to the replica (replica). changes between 0 and tick count are included in the clock vector.
Conflict Resolution Method)
Used to determine which change will be written to the storage when a conflict occurs. Typical methods to resolve conflicts include: Last writer wins, source wins, destination wins, and custom ), deferred ).
Consistency unity)
The minimum unit to be sent together, and the unit should be used as a transaction (either all succeeded or all failed). The inconsistency cannot be caused by Interruption During the sending process.
Flexible identifier)
A token of this type can be assigned to a variety of synchronization entities, such as replica, which can be fixed or extended.
Global identifier)
The global identifier is also a flexible identifier, but must be unique across all clients.
Item)
Represents a synchronization unit, which can be a data unit or a metadata unit.
Knowledge)
A participant describes the metadata of a change.
Participant)
Provider and its related copy (replica ).
Range)
The continuous entry identifier, through the starting point, ending point, and a clock vector (clock vector) that applies to all IDs in the range ).
Replica)
The unique identifier of the replica ID,
Scope)
The dataset being synchronized.
Synchronization Application)
A software component used by the host to synchronize sessions and call the synchronization framework provider to synchronize different data storage.
Synchronization provider)
A software component that represents a synchronous copy. Used as the source to enumerate the changes on the replica. Apply changes on replica as the target. If the data format does not match, perform the necessary mode conversion.
Synchronization session)
One-way synchronization, source enumeration and sending data changes, the target accepts and applies these changes.
Tick count (tick count)
A monotonically increasing value (a monotonically increasing number) and a version with the replica key.
Tombstone)
Used to mark deleted entries.
Version)
Indicates the version metadata of an entry. Contains the duplicate key value (replica key) and the duplicate tick Count value (tick count ).
Flyabroad labels: Microsoft synchronization framework, MSF, syncframework