locked
Is is possible to do a synchronization with no metadata (always full) RRS feed

  • Question

  • Hi,

    I would like to know how I can handle such a scenario :
    - Only Remote should be updated
    - Local versions always wins (always more recent)
    - No metadata store (always with full change batch)


    For the moment, I tried to do an Upload only synchronization with the in-memory provider found in  Tutorial_SyncFramework101 but I faced with an issue.

    ProviderA is remote, ProviderB is local.
    ProviderA contains 111111-1111-111111-111 = 1 and 222222-2222-222222-22222 = 2
    ProviderB contains 333333-3333-333333-333 = 3, 4444-44444-4444-4444 = 4 and 1111-1111-1111-111-111 = 1B

    After synchronization, I would like ProviderA to be
    1111-1111-1111-111-111 = 1B
    333333-3333-333333-333 = 3
    4444-44444-4444-4444 = 4
    But 2222-2222-2222-2222 is not deleted.

    In ProcessFullEnumerationChangeBatch, I create a localchange batch marking item in the source change batch that doesn't exists as ChangeKind.UnknownItem, then adding any other localchange from the metadatastore as is and pass it to the NotifyingChangeApplier This is the same things that is done in the GenericProvider found in the ContactSyncSampleV1CTP2.


    My final objective would be to not use knowledge and version as we know for sure local versions are always the more recent and I would not mind if a remote Item is updated even if it hasn't changed. So I think, i would need to write my own orchestror, base sync provider and notifyingchangeapplier.
    Is there any source code for all of this as the logic is written in native code.

    Thanks,
    Wednesday, September 2, 2009 2:27 PM

Answers

  • The best way may just be to do this outside of the sync session - enumerate all items on source and then delete what doesn't match on the destination.

    Thursday, September 10, 2009 4:39 AM
    Moderator

All replies

  • Hi - you can simply do an Upload only sync, and specify SourceWins policy. That should take care of your needs - any reason why this doesn't work for you?
    Wednesday, September 2, 2009 6:13 PM
    Moderator
  • It works for the id 11111, it gets replaced by 1B from B. But the item unknown to B are not deleted in A. I think that because those items are not in the source change batch, they are not adressed by the notifier even if i put them in the local version.
    This would need to flag item in A that are in each full enumeration change batch of B and at the end of the last batch, throw a delete action for those that are not flagged.

    Is this done automatically ?

    Thursday, September 3, 2009 6:45 AM
  • What do you mean by "item unknown to B" - is this because B deleted 2 or 2 was created on Remote and the Local never downloaded changes from Remote?

    It seems to me like you want to enumerate an item that replica B never saw - is this correct? why do you want to do that - what is the scenario?
    Thursday, September 3, 2009 9:55 PM
    Moderator
  • My scenario is that I want to import a list of item from an excel (Local) file (or whatever file format) with a Moss List (Remote). Each import (upload) would replace data that conflict with a source wins policy, create item that doesn't exist remotely, AND for any item that exist remotely but doesn't exist localy, delete it.
    At the end, Remote is equivalent to Local.

    I know this could be easily done without MSF, I would like use it because it has all the infrastructure I need like session statistic, read/write error handling, ...

    Friday, September 4, 2009 8:20 AM
  • The best way may just be to do this outside of the sync session - enumerate all items on source and then delete what doesn't match on the destination.

    Thursday, September 10, 2009 4:39 AM
    Moderator