推服务器和客户端应用程序之间的通知机制 [英] Push Notification mechanism between a server and a client app

查看:212
本文介绍了推服务器和客户端应用程序之间的通知机制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的深化发展使用C#,其中有超过一个WCF Web服务的服务器进行通信的桌面应用程序。它应该是一种同步的应用。这意味着,当我在做客户端应用程序的一些变化,我应该也立即更新服务器(这是很容易使用服务调用),也该机制应提供反之亦然,在服务器上的改变必须立即在多个客户端应用。我知道我可以投票给我的服务器,但是这并不显得利落给我,我也听说过双工服务,但我不知道如果我可以用它来实现这种机制。

I am developping a desktop application using C#, which communicates with a server over a WCF Web Service. It is supposed to be a kind of synchronization application. Meaning that when I make some changes on client app I should immediately update the server too(this is easy using service calls), but also this mechanism should be provided vice versa, a change on server must immediately be applied on several clients. I know I can make polling to my server but this doesn't look neat to me, and also I've heard of duplex services, but I'm not sure if I can use it to implement this mechanism.

我要求在这个问题上提出了一些建议。先谢谢了。

I am asking for some suggestions over this issue. Thanks in advance.

推荐答案

您需要实现发布和订阅设计。在WCF,你可以用net-TCP协议在双工客户端和服务器连接

You need to implement a publish and subscribe design. In WCF you could use net-tcp protocol to connect in duplex clients and server.

您可以下载一个相当不错的实现上的 http://www.idesign.net/Downloads/GetDownload/2032

You could download a quite good implementation on http://www.idesign.net/Downloads/GetDownload/2032

和你会发现一篇好文章这里。

And you will find a good article here.

问候

这篇关于推服务器和客户端应用程序之间的通知机制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆