Answered by:
Bidirecrional Sync functional end to end?

Question
-
Hi,
Few questions i am struggling with:
1. Just wanted to know if any one of you were able to TWEAK bidirectional sync successfully for hub-n-spoke scenario?
2. what is loopback issue in bidirectional sync? what is the work around for this?
3. Is it possible to gracefully cancel the synchronization in case of any communication error?- Moved by Max Wang_1983 Thursday, April 21, 2011 11:39 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
Monday, August 31, 2009 7:18 PM
Answers
-
Mandy,
Answers to your questions are as follows:
1. We have a couple links that might interest you. The following describes how to convert the Visual Studio Local Database Cache generated code to support bi-di: http://msdn.microsoft.com/en-us/library/cc761546.aspx. The following is a slightly more involved how-to that digs into various complexities associated with bi-di sync including conflict handling and loopbacks: http://msdn.microsoft.com/en-us/library/bb726007.aspx
2. Loopback is receiving a change that you previously sent to another node. Consider the default behavior for bi-di sync. First, changes are enumerated on the client. The changes from the client are then applied to the server. Next, changes are enumerated on the server which is going to include the changes I just applied unless I filter them out. Finally, changes from the server are applied on the client. Trick is to leverage clientid to filter out changes I just applied (i.e. give me all changes where clientid <> ME). The second link above includes the necessary logic to handle loopbacks.
3. The general guidance would be to intitate sync on a worker thread and then leverage the primary UI thread to kill the worker thread if the cancel button is pushed. The runtime will rollback any sync groups currently being applied (if neccesary).Sean Kelley
Program Manager
Microsoft- Proposed as answer by Sean_KelleyModerator Tuesday, September 1, 2009 11:45 PM
- Marked as answer by mandy.work Wednesday, September 2, 2009 2:56 PM
Tuesday, September 1, 2009 11:45 PMModerator
All replies
-
Mandy,
Answers to your questions are as follows:
1. We have a couple links that might interest you. The following describes how to convert the Visual Studio Local Database Cache generated code to support bi-di: http://msdn.microsoft.com/en-us/library/cc761546.aspx. The following is a slightly more involved how-to that digs into various complexities associated with bi-di sync including conflict handling and loopbacks: http://msdn.microsoft.com/en-us/library/bb726007.aspx
2. Loopback is receiving a change that you previously sent to another node. Consider the default behavior for bi-di sync. First, changes are enumerated on the client. The changes from the client are then applied to the server. Next, changes are enumerated on the server which is going to include the changes I just applied unless I filter them out. Finally, changes from the server are applied on the client. Trick is to leverage clientid to filter out changes I just applied (i.e. give me all changes where clientid <> ME). The second link above includes the necessary logic to handle loopbacks.
3. The general guidance would be to intitate sync on a worker thread and then leverage the primary UI thread to kill the worker thread if the cancel button is pushed. The runtime will rollback any sync groups currently being applied (if neccesary).Sean Kelley
Program Manager
Microsoft- Proposed as answer by Sean_KelleyModerator Tuesday, September 1, 2009 11:45 PM
- Marked as answer by mandy.work Wednesday, September 2, 2009 2:56 PM
Tuesday, September 1, 2009 11:45 PMModerator -
Thanks Sean for the answers !Wednesday, September 2, 2009 3:06 PM