反向阿贾克斯(彗星)与ASP.NET [英] Reverse Ajax(Comet) with ASP.NET

查看:159
本文介绍了反向阿贾克斯(彗星)与ASP.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找如何实现反向阿贾克斯(彗星)与ASP.NET一个基本的例子。我已经看了下面的人,我不想使用它们,现在(因为他们支付)

I am looking for a basic example of how to implement the Reverse Ajax (Comet) with ASP.NET. I have already looked the below ones and I don't want to use them right now (because they are paid)

http://www.frozenmountain.com/websync/ http://www.lightstreamer.com/demos.htm

我已经走了上SO提到的各个环节。但他们大多是指向外部API。我在寻找如何实现一个明确的例子。

I have already gone on various links mentioned on SO . But most of them are pointing towards external API. I am looking for a clear cut example of how to implement that .

推荐答案

不幸的是,你不会找到一个。反向Ajax是一项复杂的任务,需要包括服务器端和客户端的神奇,以便跨浏览器兼容,具有正确的状态和线程管理和可扩展性。从本质上讲彗星服务器是每个客户端(或长轮询)+巧妙的线程管理流连接。另外一个适当的彗星的服务器,你就必须全面贯彻落实贝叶协议

Unfortunately you will not find one. Reverse Ajax is a complex task that requires both server side and client side "magic" in order to be cross-browser compatible, have proper state and thread management and be scalable. Essentially a comet server is a streaming connection per client (or long polling) + clever thread management. In addition for a proper comet server you would have to fully implement the Bayeux protocol.

目前在<一的一篇文章href="http://www.google.com/search?hl=en&safe=off&&sa=X&ei=eB80TcDEHYiKvQORoenVCw&ved=0CBYQvwUoAQ&q=comet+server+$c$cproject&spell=1"相对=nofollow> $ C $的CProject 你如何能实现这样的事情在IIS中,但即使是非常复杂的。

There is an article on CodeProject on how you can implement something like that in IIS, but even that is immensely complex.

我们已经考虑实施一些我们自己的,但很快就决定不说,因为这将花费我们几个月的工作,所以这些产品的问世确实便宜。

We've considered implementing something of our own but quickly decided against that, since that would cost us months of work, so those products come out really cheap.

另外,如果你是如何实施类似的东西最好的地方开始将挖掘到WebSync源$ C ​​$ C,因为它不是混淆真正的兴趣。小心抄袭,虽然他们有不少独特的知识怎么样了在那里。

Also, if you are really interested on how to implement something like that the best place to start would be to dig into WebSync source code, since it's not obfuscated. Be careful with plagiarism though as they have quite a few unique know-hows in there.

另一种选择是考虑其他平台(其他语言的开源彗星的服务器)。您可能会发现他们有很多更适合比C#的任务。举例来说,你会发现写作在二郎彗星服务器是死的简单。

Another option is to consider other platforms (open source comet servers in other languages). You may find them to be a lot more suitable for the task than C#. For instance, you will find writing a comet server in erlang to be dead easy.

编辑:其实有已经有两个上,这样可以帮助你很大的类似的问题: ?彗星实现ASP.NET 和的简单的长轮询的例子code?

There are actually already two great similar questions on SO that might help you: Comet implementation for ASP.NET? and Simple "Long Polling" example code?

这篇关于反向阿贾克斯(彗星)与ASP.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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