如何使用.NET进行全双工编程?

发布于 2024-07-22 07:48:01 字数 189 浏览 3 评论 0原文

看完 Google Wave 演示后,我想到将“实时”功能合并到我的 Web 应用程序中,其中一个用户将能够看到另一个用户正在输入的文本……

除了内置的软实时功能之外根据框架处理线程的方式进入.NET...

还有什么我需要的吗? 是否有实时 Web 应用程序的模式或架构参考? 我应该读点什么?

谢谢!

After seeing the Google Wave demos, I thought of incorporating "real-time" capabilities into my web application, where one user will be able to see text another user is typing in as it happens...

Besides the soft real-time capabilities built into .NET based on how the framework handles threads...

Is there anything else I would need?
Is there any pattern or architectural reference for real-time web apps out there? Something I should read?

Thanks!

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

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

发布评论

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

评论(7

初见你 2024-07-29 07:48:01

查看 WebSync。 它是一个 .NET comet 服务器,应该完全满足您的需要。

Check out WebSync. It's a .NET comet server that should do exactly what you need.

在你怀里撒娇 2024-07-29 07:48:01

您可以尝试在 Silverlight 中使用全双工通道。 与 Java applet 的思想类似,但在 .Net 中除外。

WCF + Silverlight

You could try to use a full duplex channel with Silverlight. Similar to the Java applet idea except in .Net.

WCF + Silverlight

初吻给了烟 2024-07-29 07:48:01

如果不使用 Java 小程序或类似程序,您的 HTML/JavaScript 前端将需要轮询服务器以获取相关事件和更改。

在后端,有多种方法可以实现分布式事件队列或类似的服务请求的各个进程之间的共享。

Short of using a Java applet or similar, your HTML/JavaScript front-end will need to poll the server for relevant events and changes.

On the backend, there are a multitude of ways to implement a distributed event queue or similar to share between individual processes serving requests.

記憶穿過時間隧道 2024-07-29 07:48:01

Ajax、SUPXMPP 将在这方面为您提供帮助。 还可以研究 Twitter 搜索和 Friendfeed 的工作原理。

Ajax,SUP and XMPP will help you in this regard. Also study how Twitter Search and Friendfeed works.

挖鼻大婶 2024-07-29 07:48:01

Comet,虽然并不总是合适,但在某种意义上它是“轮询”,尽管它只在可能较长的工作开始时轮询一次; 然后,服务器保持 HTTP 连接打开,直到准备好响应。

根据维基百科的定义:
“在 Web 开发中,Comet 是一个新词,用于描述 Web 应用程序模型,在该模型中,长期持有的 HTTP 请求允许 Web 服务器将数据推送到浏览器,而无需浏览器明确请求。”

发现这对于服务器可能需要五分钟才能完成的工作很有用,而不是每 x 秒轮询一次,客户端发出请求,服务器基本上会说“挂起...”并完成工作并返回完成时的数据。

有多个库支持这种类型的 Ajax 实现,包括 Dojo (dojo.com) 和 ExtJS 3.0 (extjs.com)。

Comet, although not always appropriate, in a sense it is "polling", although it only polls once at the beginning of a potentially long'ish job; the server then keeps the HTTP connection open until it is ready to respond.

As defined by Wikipedia:
"In web development, Comet is a neologism to describe a web application model in which a long-held HTTP request allows a web server to push data to a browser, without the browser explicitly requesting it."

Found this to be useful for a job that may take the server five minutes to finish, instead of polling every x seconds, the client makes the request and the server essentially says "hang on..." and does it the work and returns the data when completed.

There are several libraries that support this type of Ajax implementation including Dojo (dojo.com) and ExtJS 3.0 (extjs.com).

[浮城] 2024-07-29 07:48:01

我们开发了一个操作转换引擎,即为 Google Wave 提供支持的技术后端,并使用 Silverlight 上的 DuplexChannel 进行了同步绘图和文本编辑演示。 您可以从 http://www.corvalius.com/blog/index.php/technology/announcing-the-availability-of-the-beweevee-sdk-september-ctp/

我们计划完全免费发布 SDK(目前处于预览版),用于非商业/学术目的; 所以您可能有兴趣看一下。 至少您将能够找到一个非常简单的示例,说明如何在源代码(包括小型 WCF 服务器)中为协作应用程序执行全双工。

We have developed a operational transformation engine, the technology backend that powers Google Wave, and did simultaneous drawing and text editing demos available using DuplexChannel on Silverlight. You can download it from http://www.corvalius.com/blog/index.php/technology/announcing-the-availability-of-the-beweevee-sdk-september-ctp/ .

We plan to release the SDK (that it is in preview right now) completely free for non-commercial/academic purposes; so it may be of your interest to take a look. At least you will be able to find a very simple example of how to do full duplex for collaborative apps in source (small WCF server included).

演多会厌 2024-07-29 07:48:01

由于它是一个网络应用程序,我建议您尝试 etherpad

有一个 HTTP API 上的 .NET 客户端示例其他示例页面

Since its a Web app, I'd suggest you to try etherpad!

There is a .NET Client example on HTTP API and a page on other examples

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