从服务器发送通知到客户端 [英] Sending notification from server to client

查看:301
本文介绍了从服务器发送通知到客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在Web服务器上的某些特定事件上,需要通知客户端.是否有任何类型的现成事件引擎可以与C#4.0一起使用.

Preeti

Hi,

On certain specific events on web server, the clients need to be notified. Is there any kind of readily available event engine to be used with C# 4.0.

Preeti

推荐答案

在Internet上进行搜索时会遇到一些问题,但是由于我不知道其中任何一个,因此在此不予评论.

通常,要构建通知引擎,您可以使用多个选项之一
1)套接字(对于Intranet应用而言简单易维护)
2)邮件排队
3)Web服务(有或没有轮询机制)

还有其他选择.您需要根据自己的需求选择一个.
There are a few that come up when you do a search on the internet, but since I have no idea about any of them I will not comment here.

In general, to build a notification engine, you could use one of a number of options
1) Sockets (simple and easy to maintain for intranet applications)
2) Message queueing
3) Web services (with or without polling mechanism)

There are other options as well. You need to choose one based on the your requirements.


我记得微软提供了一些通知引擎,但是我现在还不记得确切的库.有什么想法吗?
I remember that there is some notification engine readily available with microsoft...but i do not remember the exact library as of now... any idea?


严格来说,从服务器向客户端发送通知会偏离客户端-服务器模式,这非常好.在我看来,客户端-服务器范例非常有限.

您需要的与控制反转有关,请参阅 http://en.wikipedia.org/wiki /Inversion_of_control [^ ].

服务器通知的范例之一是 publisher-subscriber ,请参见 http://en.wikipedia. org/wiki/Publish/subscribe [ ^ ].

您可以在我过去的解决方案中找到最容易实现的想法之一:来自相同端口号的多个客户端 [ ^ ].

—SA
Strictly speaking, sending notification from server to client goes away from the client-server paradigm, which is very good. To me the client-server paradigm looks very limiting.

What you need is related to inversion of control, please see http://en.wikipedia.org/wiki/Inversion_of_control[^].

One of the paradigms with server notification is publisher-subscriber, see http://en.wikipedia.org/wiki/Publish/subscribe[^].

You can find one of the ideas its most simple implementation in my past solution: Multple clients from same port Number[^].

—SA


这篇关于从服务器发送通知到客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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