none
Sync 'Never Connected' Applications RRS feed

  • Question

  • Hi everyone, 

    I have been using SyncFx for about a year now and it works, but there is a hack that I would like to get rid of eventually. Hopefully there is a solution as I cannot find one yet.

    I have an application that is sometimes used in parts of the world that have absolutely no internet connection available. Some installations will always be connected, but since some won't, I consider this to be a 'Never Connected' application.

    My 'Never connected' app must be synchronized with my main database using the Sync framework. To support this rule, the application has an offline cache of the DB that it writes to. Lets call this CeDb1. Every once in a while the user will mail a hard drive to me that contains some stuff along with the offline cache of the DB (CeDb1). I then have a service that synchronizes my main database with the offline cache (CeDb1). Once that is complete I create a new cache of the updated DB that contains all of the changes that were made locally. Lets call this CeDb2. I then send them that new DB cache (CeDb2) through the mail.

    This is where I had to hack some stuff:
    Once they receive the offline cache (CeDb2), the application executes some code that I wrote that tries to synchronize CeDb1 with CeDb2. 

    What I would like to do, is to be able to synchronize CeDb1 and CeDb2 using the sync framework (Ce to Ce sync). I have read that there are samples but can't find them. Also, I would like to know if the samples would work for my situation.

    P.S. I am using version 1.0 SP1 for both the SDK and the Runtime.

    Thanks for any help,

    SonnyZ


    Monday, March 8, 2010 8:11 PM

Answers

  • you can find a sample SharingAppDemo-CEProviderEndToEnd (or  WebSharingAppDemo-CEProviderEndToEnd for n-tier) that gets installed with the SDK (C:\Program Files (x86)\Microsoft SDKs\Microsoft Sync Framework\2.0\Samples)

    the sample is just like the scenario am describing, you provision the sdf from a server first, then you provision subsequent sdfs based on the first sdf, then sync sdf to sdf.

    • Marked as answer by SonnyZ Monday, April 12, 2010 10:30 PM
    Monday, April 12, 2010 9:13 PM
    Moderator

All replies

  • i think that's possible with V2. You can define a scope on your server, provision a SQL Compact DB (CeDb1) that goes to your offsite. When the remote site need to mail their local cache (CeDb1), you can create a snapshot CeDb2 using CeDb1 via SqlCeSyncStoreSnapshotInitialization's GenerateSnapshot call. They then mail you CeDb2, you sync CeDb2 to your server. You then send back CeDb2 offsite, and they can then synchronize CeDb1 with CeDb2.
    Tuesday, March 9, 2010 1:35 PM
    Moderator
  • ... and they can then synchronize CeDb1 with CeDb2.

    This is the part that I'm stuck at. How do I synchronize CeDb1 with CeDb2.

    I was able to find an article that covers the first part of your solution: http://msdn.microsoft.com/en-us/library/dd918709(SQL.105).aspx

    This is fine but doesn't seem to add anything to my currently working synchronization process. Unless I'm mistaken, it only synchronizes Ce databases to the SqlServer database. It's that Ce to Ce synchronization that i'm currently trying to find a solution to.


    -SonnyZ
    Monday, April 12, 2010 7:11 PM
  • you can find a sample SharingAppDemo-CEProviderEndToEnd (or  WebSharingAppDemo-CEProviderEndToEnd for n-tier) that gets installed with the SDK (C:\Program Files (x86)\Microsoft SDKs\Microsoft Sync Framework\2.0\Samples)

    the sample is just like the scenario am describing, you provision the sdf from a server first, then you provision subsequent sdfs based on the first sdf, then sync sdf to sdf.

    • Marked as answer by SonnyZ Monday, April 12, 2010 10:30 PM
    Monday, April 12, 2010 9:13 PM
    Moderator
  • Thanks I'll look into it.
    -SonnyZ
    Monday, April 12, 2010 10:30 PM