如何在多客户端应用程序之间同步数据
我需要同步“一个客户端”更新的数据,并且需要在同一应用程序的“其他客户端”(在另一个房间)上刷新。
1 - 哪种方法是执行此操作的最佳方法? 我正在考虑 SqlDependency 但应用程序也可以在其他数据库引擎上运行(我不予考虑) 我还想到了一个计时器轮询更新,但我真的不想定期检查更改。
有人有这个问题吗?你是怎么解决的?
2 - 另外。什么时候必须在 UI 中更新数据而不妨碍另一台电脑上的人员工作?
设想: 3 台 PC 使用相同的数据。创建/更新需要同步的记录(以获取每台电脑所做的最后更改)。
我希望我清楚自己的情况。
提前致谢。
I need to synchronize the data that "one client" updated and need to be refreshed on "other client" (on another room) of the same application.
1 - Which is the best approach to doing this?
I was thinking on SqlDependency but the application can also run on other database engines (I dismiss it)
I also think of a timer polling for updates, but I really don´t want to check for a change periodically.
Does anybody has this problem? How did you solve it?.
2 - Additionally. When the data must be updated in the UI without obstruct the work ofo the people in the other pc?
Scenario:
3 PC working with the same data. Creating / updating records that need to be synchronized (to get the last changes that every PC made).
I hope I was clear about my situation.
Thank in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您知道您只有 2 个应用程序实例,那么您可以使用 WCF 来完成。当每个客户端想要发送更新时,它们都充当另一个客户端的服务器。
您希望如何处理两个客户端正在编辑的数据的更新……这可能很棘手。 GUI 是否是为了处理更新等而开发的,这取决于您的数据类型。
If you know that you are only gonna have 2 instances of the application, then you could do it with WCF. Each of the clients acts as a server for the other one when they want to send an update.
How you want to handle updates to data being edited by both clients... that can be tricky. It depends on your type of data, if the GUI is developed to handle updates and such things.