locked
Sync Framework ScopeName Question RRS feed

  • Question

  • Hi,

       I am developing an asset management application using MS Sync Framework 2.1. There is a WinForms application on a PC which uses an SQL Server Compact 3.5 database for the assets. The application also has a version running on any number of Windows Mobile 5 devices also using SQL Server Compact 3.5. All databases throughout the application have exactly the same tables etc. From the desktop application I create synced databases which are downloaded to the devices. Data is changed on the devices and then copied back to the desktop where it is synced back to the desktop database. This seems to work ok. My question is should I be using the same 'scope name' throughout the synchronizations of the various device databases or should they be unique for each devices database. The scope is always the same tables but I don't know if the desktop database needs to differentiate between the different device databases?

    Any help appreciated.

    Thanks

    Pau.     


    Paul Wainwright

    Wednesday, October 29, 2014 7:23 PM

Answers

  • not really, i just stated the issue above on what happens when you have only one scope on the server.

    ideally, you should have 1-to-1 correspondence with the scopes.

    e.g. 

    client1 - client1scope

    server - client1scope

    client2 - client2scope

    server - client2scope

    • Marked as answer by pr_wainwright Thursday, October 30, 2014 9:35 AM
    Thursday, October 30, 2014 8:12 AM

All replies

  • if this is a hub-spoke configuration where all clients sync with the same server, your server scope's sync knowledge will become bloated.

    the sync knowledge stores what has been synched with which replica. if you have 100 clients, the server scope will need to track 100 replicas in the sync knowledge. depending on how fragmented the sync knowledge becomes, this will grow. if you remove/deprovision a client, the sync knowledge stored in the server for that client would still be there. 

    likewise, because you have a single row in the server to store all the sync knowledge, if you have concurrent syncs from the client, there will be contention on that row.

    if you go for a 1-to-1 client scope to server scope, then if you need to remove a client, you can deprovision its scope and get rid of the sync knowledge on the server. you wont have row contention for the scope as well.



    • Edited by JuneT Thursday, October 30, 2014 8:13 AM
    Thursday, October 30, 2014 2:46 AM
  • JuneT,

             Thanks for the reply. I gather your answer means I should use one scope name across all of the database synchronizations?

    Thanks

    Paul.


    Paul Wainwright

    Thursday, October 30, 2014 7:36 AM
  • not really, i just stated the issue above on what happens when you have only one scope on the server.

    ideally, you should have 1-to-1 correspondence with the scopes.

    e.g. 

    client1 - client1scope

    server - client1scope

    client2 - client2scope

    server - client2scope

    • Marked as answer by pr_wainwright Thursday, October 30, 2014 9:35 AM
    Thursday, October 30, 2014 8:12 AM
  • Ok thanks JuneT.

    Paul Wainwright

    Thursday, October 30, 2014 9:35 AM