My scenario:
SQL Express 2008, VS2010, WPF / .NET 4.0, ADO.NET, Sync Services 2.0.
We currently have 13 tables. My small test data set is very small. There is no table with > 30 rows. As you can see, VERY SMALL tables right now. Eventually, 2 of the tables will contain 3M rows each. So my panic is already setting in...
With my small dataset (my SDF file is 348k), it takes about 3 - 5 seconds to load & save the database. So a user pushes the "Save" button and has to wait for 5 seconds before the UI comes back. Kind of defeats the whole purpose of using the SyncFramework
IMHO.
As a frame of reference, BEFORE switching to the SyncFramework, a save was "instant" (but one way).
We are not using any stored procs. Everything is ADO.NET tables / record sets. A save happens like this:
// tblMarkup delete
SharedPrivateData.taMarkup.Update(SharedPrivateData.ds.tblMarkup.Select(null, null, DataViewRowState.Deleted));
// tblBaseline delete
SharedPrivateData.taBaseline.Update(SharedPrivateData.ds.tblBaseline.Select(null, null, DataViewRowState.Deleted));
// tblTemplateSets delete
SharedPrivateData.taTemplateSets.Update(SharedPrivateData.ds.tblTemplateSets.Select(null, null, DataViewRowState.Deleted));
// tblTemplateSet insert, update, delete
SharedPrivateData.taTemplateSet.Update(SharedPrivateData.ds.tblTemplateSet.Select(null, null, DataViewRowState.Deleted));
SharedPrivateData.taTemplateSet.Update(SharedPrivateData.ds.tblTemplateSet.Select(null, null, DataViewRowState.ModifiedCurrent));
SharedPrivateData.taTemplateSet.Update(SharedPrivateData.ds.tblTemplateSet.Select(null, null, DataViewRowState.Added));
.
.
.
SharedPrivateData.ds.AcceptChanges();
// syncronize with the server
xxxCacheSyncAgent syncAgent = new xxxCacheSyncAgent();
syncAgent.SessionProgress += new EventHandler<SessionProgressEventArgs>(syncAgent_SessionProgress);
syncAgent.Synchronize();
My sync agent has all the tables bidirectional:
public partial class xxxCacheSyncAgent
{
partial void OnInitialized()
{
tblBaseline.SyncDirection = SyncDirection.Bidirectional;
tblField.SyncDirection = SyncDirection.Bidirectional;
tblFieldCategories.SyncDirection = SyncDirection.Bidirectional;
tblFieldFieldReferences.SyncDirection = SyncDirection.Bidirectional;
tblMarkup.SyncDirection = SyncDirection.Bidirectional;
tblScript.SyncDirection = SyncDirection.Bidirectional;
tblScriptCategories.SyncDirection = SyncDirection.Bidirectional;
tblTemplate.SyncDirection = SyncDirection.Bidirectional;
tblTemplateCategories.SyncDirection = SyncDirection.Bidirectional;
tblTemplateFieldReferences.SyncDirection = SyncDirection.Bidirectional;
tblTemplateSet.SyncDirection = SyncDirection.Bidirectional;
tblTemplateSets.SyncDirection = SyncDirection.Bidirectional;
tblTokenSubst.SyncDirection = SyncDirection.Bidirectional;
((RubiSoftCacheClientSyncProvider)LocalProvider).AddHandlers();
}
}
It seems like its doing the full tables both ways. Is that right??