How to use parameter-based filters to sync updates from server RRS feed

  • Question

  • Here's our problem: We are using MSF 2.1 with SqlServer 2012 and SqlServer Express in a hub-spoke configuration.  It is working fine without any filters but for the next phase of our project, filtering of updates on the server to clients (by region) will be required. I have been testing functionality of parameter-based filters, and have encountered this well-documented limitation (from MSDN article about filters in MSF 2.1):

    "Be aware that parameter-based filters are appropriate only when items will not move into or out of the filter scope, such as when the value of a field changes so that an item that was previously passed by the filter is no longer passed by the filter. Changes of this kind will not be correctly propagated throughout the synchronization community."

    Has anyone been able to resolve this limitation? Perhaps by making use of the more detailed level of control that was required in MSF 2.0, using features such as SqlSyncAdapterBuilder to create custom SyncAdapter classes, etc?

    My impression is that parameter-based filters are a high-level convenience that may not deliver all the functionality of the more customized solutions that were necessary in MSF 2.0. So I am wondering if I should be learning more about those MSF 2.0 features, or if there is some other way of resolving this limitation of MSF 2.1 filtering. Can the 2.0 and 2.1 features for filtering be used together? I haven't found any hint that they can work together, but I hope this is doable.

    Thanks for any suggestions,


    Thursday, March 20, 2014 9:06 PM

All replies

  • not sure what 2.0 filtering are you referring to. the 2.0 and 2.1 filtering doesnt change the partition realignment or rows going in and out of scope.
    Thursday, May 8, 2014 2:08 PM
  • Thank you for your response. I'm looking for a solution to this problem: "Sync Framework does not automatically handle the deletion of rows that no longer satisfy a filter condition. For example, if a user or application updates a value in a column that is used for filtering, a row moves from one scope to another. The row is sent to the new scope that the row now belongs to, but the row is not deleted from the old scope. Your application must handle this situation."  (from msdn.microsoft.com/en-us/library/hh882039.aspx)

    So I thought that maybe the earlier (pre-2.1) MSF features (like SqlSyncAdapterBuilder) could be used to handle this situation. It certainly looks like a much more extensive and lower-level set of features in 2.0, that require a lot more code than using the high-level 2.1 features like parameter-based filters. I'm looking for a solution within sync framework but maybe there's no such solution, and I have to code around that somehow.

    btw, is there some kind of connection I'm missing between the 2.1 and pre-2.1 MSF features? It almost looks as if the 2.1 features were added as a separate layer that you can use just fine without knowing much of anything about pre-2.1 MSF. Is this true?

    Tuesday, May 13, 2014 3:29 PM
  • you're referring to the older sync providers (SyncAgent/DBServerSyncProvider/SQLCeClientSyncProvider) vs the newer collaboration providers (SyncOrchestrator/SqlSyncProvider/SqlCeSyncProvider). The latter is not an upgrade, they're completely different and they're both present on 2.0 and 2.1. You can use the older sync providers even with 2.1 

    the older sync providers will not handle your scenario either of rows going in and out of filter scope.

    Wednesday, May 21, 2014 11:42 AM
  • Does newer sync providers handle  the scenario of rows going in and out of filter scope? Can we use custom filters to accomplish this?If yes, do you have a sample that you can share on how you can use that for SQLSyncProvider?
    Thursday, June 18, 2015 12:34 AM