none
Intelligent workflow to update in-memory collection based on changes part of a Sync. RRS feed

  • Question

  • Hi there,

    Here is my quandary:

    Problem:
    Currently we are implementing Sync to an existing application which has been developed using the WebServices and has been performance optimized over a period of time (4-5 yrs). The nuances of the sync implementation is as follows:

    Sync Framework: 2.0;
    Client: SQL CE;
    Server: SQL 2008;
    Developing using VS '08.


    During our initial implementation we found that querying the SDF through linq was not practical in our context (as the performance was degraded as compared to the existing implementation) and hence we decided to cache the necessary items we are working with in the collection (ranging from 20 to 10K records). Hence now, with sync in picture, there arises a need to have an intelligent CRUD mechanism instead of fetching and repopulating the entire collection by querying SDF.

    Plausible solution:
    I believe implementing the CustomSyncProvider will help us attain control over the items (INotifyingChangeApplierTarget's SaveItemChange methods) being modified during sync and hence could be used to insert/update the corresponding object in the collection.


    Before I delve into implementation, it would be great to know whether my above assumption is correct and (if so) whether anyone here noticed significant performance improvements when compared to re-populating the entire collections (understand the gain wont be significant for smaller collection).

    Thanks in advance to everyone for their feedback.

    Regards.
    Monday, August 30, 2010 3:20 PM

Answers

  • if you're already using Sync Fx, can you not just subscribe to the ChangesApplied event and just loop thru to the changes applied to update the cache?

    • Marked as answer by ronair Thursday, September 2, 2010 4:45 PM
    Tuesday, August 31, 2010 7:23 AM
    Moderator

All replies

  • if you're already using Sync Fx, can you not just subscribe to the ChangesApplied event and just loop thru to the changes applied to update the cache?

    • Marked as answer by ronair Thursday, September 2, 2010 4:45 PM
    Tuesday, August 31, 2010 7:23 AM
    Moderator
  • Thanks, June for directing me to a better approach. Have you noticed performance gains by updating the delta to the collection? I suppose I would need to benchmark to find the threshold for optimal performance as a function of # of records in the change set.
    Thursday, September 2, 2010 4:43 PM