Questions storing replica metadata in a custom metadata store. RRS feed

  • Question

  • Greetings,

    I'm using MSF v1.0 and implementing a custom KnowledgeSyncProvider and a custom metadata store.

    For the most part, it's fairly straightforward, but there are some obscure bits, and there appears to be astonishingly sparse documentation about these.

    1) Is scope meaningful for a KnowledgeSyncProvider, or is it useful only with Sync for ADO.Net?
    2) SyncKnowledge.Serialize() has an overload which accepts a Boolean called includeReplicaKeyMap. Why would this be used?
    3) When creating SyncVersion instances, assuming that two replicas had been in perfect sync at one point, does the ReplicaKey really matter when looking at unchanged items?

    Thanks for any insight into these questions!

    • Moved by Max Wang_1983 Thursday, April 21, 2011 1:11 AM forum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
    Sunday, July 19, 2009 9:05 PM


  • Answer:
    1) Scope is meaningful for a KnowledgeSyncProvider. It means things that replica understands(by replica's knowledge). For example, if replica is a file directory, scope will be everything(files, subdir) inside the folder.

    2) Serialize() has an option to serialize a knowledge instance with or without a replica key map. When serializing without a replicaKeyMap, you have to provider an replica key map instance when knowledge buffer is deserialized. 

    3) ReplicaKey does matter. Each replica will have its own replicaKeyMap that maps replicaId. Local replicaId is always mapped to 0. For example, we have two replicas A and B that are in perfect sync. On A, it has an item with current version {0-10} which translates into {A-10}. On the other hand, that item on B has a same current version of {1-10} that also means {A-10} because A is mapped to 1 on B's replicaKeyMap.
    Microsoft Sync Framework
    Tuesday, August 11, 2009 10:17 PM