locked
How to implement Preview mode wtih SimpleProviders? RRS feed

  • Question

  • Do I just skip changes? I wonder if knowledge database is updated if I skipped changes?

    Monday, April 5, 2010 3:12 AM

Answers

  • If you skip changes, knowledge won't be updated.  Unfortunately, with the simple providers there's no good way to do preview, so your solution should probably be fine.  With the regular providers, you could only do a little better by calling GetChangeBatch and doing it yourself, but you would have issues with batching (which you should be prepared to handle using your approach as well).

     

    Aaron


    SDE, Microsoft Sync Framework
    Monday, April 5, 2010 8:36 PM
    Answerer

All replies

  • Would you mind describe your scenario in more details?

    In general, Preview mode should not sync real changes.  Therefore you need to rollback transaction as well on the database provider.

     

    Thanks.


    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Monday, April 5, 2010 7:00 PM
    Answerer
  • My scenario is this: I'm syncing a local file store with a remote online store and I'd like to multiple upload threads to upload multiple files at the same time when bandwidth allows. I used a custom simple provider to access remote online store and a default file provider to access local folder. The problem is that during the sync session, sync framework decides when a file is transmitted in a sequential fashion. How do I parallelize file transmission in this case? My current thinking is to run in "preview" mode, collect all the files that are to be transmitted, and use my custom logic to transmit files. Then later on during the real sync, my online store will check if the file is already transmitted, if so it will skip sending the file. I hope I explained the scenario clearly. Thank you.

    Monday, April 5, 2010 7:18 PM
  • If you skip changes, knowledge won't be updated.  Unfortunately, with the simple providers there's no good way to do preview, so your solution should probably be fine.  With the regular providers, you could only do a little better by calling GetChangeBatch and doing it yourself, but you would have issues with batching (which you should be prepared to handle using your approach as well).

     

    Aaron


    SDE, Microsoft Sync Framework
    Monday, April 5, 2010 8:36 PM
    Answerer
  • Okey. I'll try with the solution. my intention is to migrated to KnowledgeSyncProvider in futrue releases so I'll keep what you said in mind.
    Monday, April 5, 2010 10:04 PM