locked
Sync Progress RRS feed

  • Question

  • How do you track progress in MS Sync Framework 2.1?  I need to be able to monitor sync progress in bytes, as in the total number of bytes to download vs. how many have been downloaded so far.  The databases I'm syncing are hundreds of megabytes large and the clients have very slow connections, sometimes dial-up speed or even less.

    SqlSyncProvider.MemoryDataCacheSize allows me to batch the downloads, which is nice for slow connections, but when synchronization is in progress I have no idea what's going on.

    SqlSyncProvider.BatchSpooled will tell me when a batch has been downloaded, but only AFTER it has been download.  I need progress updates before and during streaming.  I also need to know the total number of batches and the sizes for each beforehand.

    SyncOrchestrator.SessionProgress gives me some progress notifications, but not enough.  It gives me one notice at 50% of a scope and one at 100%.  It can take 20+ minutes before I even get to the 50% marker, so this is worthless.

    Solutions please?
    Sunday, September 19, 2010 5:07 PM

Answers

  • For the sake of closing this out just wanted to let everybody know how this ended up.  An N-tier implementation was in fact the way to solve this problem.  2-Tier simply doesn't support it.  If you need this level of progress reporting you must use an N-tier implementation and control the communication channel between the client and the server.  This will allow you to monitor the transmission progress byte-by-byte.  After that's done you catch Sync Framework events to monitor the progress of applying the updates.

    This means that in addition to the database server you also need some server-side software somewhere.  In my case I used a WCF service.    Bottom line: Instead of just a dozen lines of code with a 2-tier prepare yourself for a couple thousand with an N-tier.  It's a whole different level, but the control you gain through an N-tier is very much worth it.

    • Marked as answer by AJ8829 Monday, October 4, 2010 4:03 AM
    Monday, October 4, 2010 4:03 AM

All replies

  • assuming you used WCF and followed the docs, you might be able to extract some more information to display from the RelationalProviderProxy's GetChangeBatch and ProcessChangeBatch or in the RelationalWebSyncService's UploadBatchFile and DownloadBatchFile.

    Monday, September 20, 2010 1:07 AM
  • WCF?  I'm not following you.  Sync Framework communicates with the SQL Server directly through System.Data.SqlClient.SqlConnection.  Right now I'm using a 2-Tier implementation of Sync Framework.  Are you suggesting an N-Tier solution?  Separate the sync providers and then use the proxy to monitor batch transmission?  I had thought about looking into an N-tier implementation and going this route, but am hoping I can accomplish what I need with a 2-Tier.  ??
    Monday, September 20, 2010 4:35 AM
  • For the sake of closing this out just wanted to let everybody know how this ended up.  An N-tier implementation was in fact the way to solve this problem.  2-Tier simply doesn't support it.  If you need this level of progress reporting you must use an N-tier implementation and control the communication channel between the client and the server.  This will allow you to monitor the transmission progress byte-by-byte.  After that's done you catch Sync Framework events to monitor the progress of applying the updates.

    This means that in addition to the database server you also need some server-side software somewhere.  In my case I used a WCF service.    Bottom line: Instead of just a dozen lines of code with a 2-tier prepare yourself for a couple thousand with an N-tier.  It's a whole different level, but the control you gain through an N-tier is very much worth it.

    • Marked as answer by AJ8829 Monday, October 4, 2010 4:03 AM
    Monday, October 4, 2010 4:03 AM