Is SyncFx is valid in my case? RRS feed

  • Question

  • I am using syncfx 2.1 for a while and its working pretty good and recently came across many road blocks and Evaluating Syncfx again.

    I am using Syncfx for Silverlight App where server is SQL 2008 and Local is SQLCE and this App is used by Agents kind of Desktop App.


    1. When a record is created by Agent A and Agent B in offline mode with ID = 10 and try to sync wih server. Only one record will be     available. It is dificult to set range for each agent Since there are around 20,000 Agents.

    2. I am creating table schema using SyncFx and at the time of sync it disables the identity and copies data from server and when i create a record it starts from 0 and increment by 1. this causes a lot problem since when i create new record it say's duplication because with Primary key Id with Identiy 1 already exists. The primary key Identiy must be Max(Id)+1 in Views of Ce but it starts with 0.

    3. When there are schema changes there is no better option other that deprovision server and clients and repovision All? this is a big problem beacuse not much control of Clients.

    4. When confilcts occurs at the time of Sycnhronization I wwanted to give preference based on Last updated by.

    1,2 can be over come Using GUID? Is this best option to do so?

    We are planing to Use WCF services to Synchronization with out Syncfx to have more control on many things Is this the best option?

    Any Suggestions are welcome

    Tuesday, December 21, 2010 3:49 PM


All replies

  • for 1 & 2, you can take a look at the recommendation at http://msdn.microsoft.com/en-us/library/bb726011.aspx Currently the database sync doesn't have good support to help to solve the identity problem so you will need to find some alternatives to implement that.

    For 3, you are right. better Schema change support are something in the plan so the currently support is through deprovision and provision again.

    For 4, in the changeFailedEvent, you could check the conflicting rows, if you have time related information in the rows, you can choose the last update to be the winner.

    If you want to use WCF to sync, you could take a look at the n-tier samples listed at http://code.msdn.microsoft.com/sync. WCF is just a network technology, it doesn't solve the sync problem. You'll need a sync engine to sync over WCF.

    • Marked as answer by Madi_R Tuesday, December 21, 2010 9:20 PM
    • Unmarked as answer by Madi_R Tuesday, December 21, 2010 9:21 PM
    Tuesday, December 21, 2010 6:17 PM
  • Thanks for Reply,

    Here the problem is not only with Sync Framework but also with SqlCe and its support.

    If i use GUId's as Primary key is this going to effect my Outer Apply Queries?

    Rowguidcol = true on Server and in Sqlce it is set to False at the time of schema generation is there any way to turn it on on Sqlce?

    Thanks Again

    Tuesday, December 21, 2010 7:31 PM
  • From this link: http://technet.microsoft.com/en-us/library/ms173393.aspx on SQL Ce you can create a table with a column marked as Rowguidcol.

    So if you do want the tables to have RowGuidcol, you can create the tables by yourself and when do SQLCe side provisioning, you can set "CreateTable" to Skip then Sync will use your own table schema as your have created.

    Wednesday, December 22, 2010 1:04 AM