views:

209

answers:

1

We've got a smart client that talks to a SQL Server database via WCF, displaying the entities in the database, and allowing the user to edit those entities.

Some of the WCF calls return a large data set. Since this data set doesn't change very often, I'm considering some sort of write-through cache on the client, and only getting the deltas from the WCF service.

That is: the client both reads from the service and writes to the service.

I'm not looking for disconnected/offline operation, but since the majority of the data doesn't change very often, I'd probably implement this with a local data store.

I don't want the local store to get too stale, and I don't think I'm too concerned about conflict resolution, because updates will always go straight to the WCF service -- think of it as a write-through cache.

Would Microsoft's Sync Framework be good for this? Could I use a local SQL-CE cache and perform the updates over WCF? The service end has a SQL Server 2005/2008 backend, but I don't want to talk to it directly. Does Sync Framework integrate well with WCF?

Are there other solutions out there? Should I roll something myself?

A: 

I don't think you have to couple it to WCF at all. FeedSync allows you to publish directly to an RSS feed.

The only that I'm not too sure about is if it would be suitable for a "large dataset" though. Since you don't need two way replication, if your dataset is extremely large, you might want to write your own WCF implementation to optimize it; especially for the initial population.

Derek G
The client also makes changes to the data. It could be two-way replication, except that -- because I can assume that it's always connected -- it seemed easier to do some kind of write-through caching. We're kinda already committed to WCF, as well.
Roger Lipscombe
Well you could look at Sync objects over WCF, but I think it would be easier and better for you to write a variable of the full transfer that you cache that provides the datetime or version of the client cache and gives you the changes from that version. If you are maintaining a change log anyway, it would be very efficient.
Derek G