这个演示使用了什么彗星技术?

发布于 2024-08-16 20:26:30 字数 364 浏览 3 评论 0 原文

他们在这个演示中所做的正是我想做的。

http://www.lightstreamer.com/demo/RoundTripDemo/

我想知道什么彗星技术他们正在使用。

它不能是 iframe,因为在 Firefox 上我可以打开两个具有相同链接的选项卡。使用 iframe 你不能这样做。而且它不能用ajax进行长时间轮询,因为我没有看到它用firebug轮询任何东西。

有人知道答案吗? (如果有一些好的教程的链接就太好了,这些教程用相同的技术做完全相同的事情)。

what they do on this demo is exactly what i wanna do.

http://www.lightstreamer.com/demo/RoundTripDemo/

i wonder what comet technique they are using.

it cant be iframe cause on Firefox i can open two tabs with same link. with iframe u cant do that. and it cant be long polling with ajax cause i didnt see it polled anything with firebug.

someone knows the answer? (would be great with some link to good tutorials that do exactly the same thing with same technique).

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

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

发布评论

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

评论(3

浊酒尽余欢 2024-08-23 20:26:30

虽然我现在不喜欢挖掘混淆的脚本,但从页面 DOM 的内容来看,它正在从隐藏的

这是一种相当重量级且引人注目的技术。在 XMLHttpRequest 存在之前,这是进行页内服务器通信的唯一方法;我今天通常不会使用它。

(我希望 WebSocket 能尽快实现,消除所有长轮询的麻烦。)

Whilst digging through the obfuscated scripts is not something I fancy right now, judging by the contents of the page DOM it is posting data from a <form> inside a hidden <iframe> to send data to the server, and having the server send back <script> tags with code to pass data back to the caller.

This is a rather heavyweight and obtrusive technique. It was the only way of doing in-page server communication in the days before XMLHttpRequest existed; I typically wouldn't use it today.

(I wish WebSocket would hurry up and get implemented, doing away with all the long-polling nastiness.)

莫言歌 2024-08-23 20:26:30

看起来像是 Lightstream 开发的几种技术,其中包括“香草”彗星。 Lightstreamer 白皮书 的简短摘录:

每个 Lightstreamer 客户端通常都会打开一个永久的联系
使用 Lightstreamer Server,在该服务器上推送与
任意数量的物品、框架和窗户通过
多路复用技术。

白皮书和演示非常有趣......

Looks like several techniques developed by Lightstream which include "vanilla" comet. A brief excerpt from the Lightstreamer white paper:

Each Lightstreamer client typically opens a single permanent connection
with Lightstreamer Server, on which the push updates relating to an
arbitrary number of items, frames and windows travel by means of
multiplexing techniques.

The white paper and demos are very interesting...

2024-08-23 20:26:30

有一次我为 Lighttpd Web 服务器开发了一个模块。该模块实现了全双工 Ajax 技术,与 Comet 非常相似。在我的博客文章中,您将找到有关 FDAjax / Comet 的所有信息, JavaScript 示例、防火墙和防病毒程序问题等。Lighttpd

项目似乎已经死了。据我所知,流行的 nginx 有一个类似的 模块 。但将来我们将使用网络套接字。

顺便说一句,我使用了几个 HTTP 地址(www1.example.com、www2.example.com...)来解决浏览器对同一 Web 服务器最多两个 IP 并发连接的限制。 www[n] 实际上被解析为相同的 IP 地址。如果可能发生锁定,浏览器会自动重定向到下一个 www[n] 地址。

Once I developed a module for the Lighttpd web server. The module implemented a Full Duplex Ajax technique, very similar to Comet. In my blog posts you'll find everything you need about FDAjax / Comet, JavaScript examples, problems with firewalls and anti-virus programs, etc.

Lighttpd project seems to be dead. As far I know there is a similar module for the popular nginx. However in future we'll use web sockets.

BTW I used few HTTP addresses (www1.example.com, www2.example.com, ...) to work around the browsers limit of max two IP concurrent connections to the same web server. www[n] were in fact resolved to the same IP address. In case of possible lockup, a browser was automatically redirected to the next www[n] address.

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