WCF 中大型数据集的直写式缓存?

发布于 2024-08-11 06:58:43 字数 458 浏览 5 评论 0原文

我们有一个智能客户端,它通过 WCF 与 SQL Server 数据库通信,显示数据库中的实体,并允许用户编辑这些实体。

某些 WCF 调用返回大型数据集。由于此数据集不会经常更改,因此我正在考虑在客户端上使用某种直写式缓存,并且仅从 WCF 服务获取增量。

即:客户端既从服务读取数据又向服务写入数据。

我不是在寻找断开连接/离线操作,但由于大多数数据不会经常更改,因此我可能会使用本地数据存储来实现此操作。

我不希望本地存储变得太陈旧,并且我认为我不太关心冲突解决,因为更新将始终直接进入 WCF 服务 - 将其视为直写式缓存。

微软的同步框架对此有好处吗?我可以使用本地 SQL-CE 缓存并通过 WCF 执行更新吗?服务端有一个SQL Server 2005/2008后端,但我不想直接与它对话。 Sync Framework 与 WCF 集成良好吗?

还有其他解决方案吗?我应该自己卷一些东西吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤城病女 2024-08-18 06:58:43

我认为您根本不必将其与 WCF 耦合。 FeedSync 允许您直接发布到 RSS 提要。

我唯一不太确定的是它是否适合“大型数据集”。由于您不需要双向复制,因此如果您的数据集非常大,您可能需要编写自己的 WCF 实现来优化它;特别是对于初始人群。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文