RSS 和 ATOM 如何通知客户端有关更新的信息?长轮询还是轮询还是其他什么?

发布于 2024-09-28 00:25:15 字数 128 浏览 0 评论 0原文

我读到 RSS 和 ATOM 是基于 HTTP 的,使用 XML 格式。那么,如果 HTTP 不支持连接,RSS 或 Atom 阅读器如何获知内容更新呢?他们需要定期轮询服务器吗?我有兴趣在实时网络应用程序中使用它,但我听说“轮询无法扩展”。

I read that RSS and ATOM are HTTP-based using XML format. So how an RSS or Atom reader get informed about content updates if HTTP doesn't support connections? Do they need to poll the server periodically? I'm interested in using it in a real time web application but I heard that "polling doesn't scale".

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

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

发布评论

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

评论(3

帥小哥 2024-10-05 00:25:15

这与这个问题非常相似。请在那里阅读我的答案。

目前没有针对 RSS 源的长轮询。您需要的技术是 PubSubHubbub :它允许 Feed 发布商向您推送内容可用时。

This is pretty similar to this question. Please read my answer there.

There is no currently long polling for RSS feeds. The technology you're looking for is PubSubHubbub : it will allow the feed publisher to push you the content when it's available.

活雷疯 2024-10-05 00:25:15

有两个答案。

  1. 如今,大多数读者和聚合商都会对大多数提要进行投票。

  2. 有几种用于实时更新通知的方法正在开发中。

RSS 2.0 规范中有一项关于实时通知的规定,称为 元素。 (我想包含一个指向规范文本的链接,但 Stack Overflow 只允许我在每个帖子中包含一个链接。)

我们最近完成了提供一个实现的演练的工作,该实现在我的一台服务器上启动并运行。

Google 正在赞助一个名为 PubSubHubbub 的项目,该项目可以实时通知更新。

我在 scripting.com 社区中有一个名为“FeedHose”的项目,用于对 RSS 和 Atom 提要的更新进行长轮询通知 - 您可以在以下位置找到指针: http://feedho.se/

There are two answers.

  1. Today most readers and aggregators poll for most feeds.

  2. There are several approaches under development for realtime notification of updates.

There is a provision for realtime notification in the RSS 2.0 spec, called the <cloud> element. (I wanted to include a link to the spec text, but Stack Overflow will only let me include one link per post.)

We've recently done work to provide a walkthrough of an implementation, that's up and running on one of my servers.

Google is sponsoring a project called PubSubHubbub that does realtime notification of updates.

I have a project going in the scripting.com community for long-polling notification of updates for RSS and Atom feeds called "FeedHose" -- you can find pointers at: http://feedho.se/.

不交电费瞎发啥光 2024-10-05 00:25:15

那么如果 HTTP 不支持连接,RSS 或 Atom 阅读器如何获知内容更新呢?

客户端经常检查 RSS 源是否有新项目。这是到达这里的唯一方法,我知道该地区没有“长轮询”方法。这就是为什么缓存在传送 RSS 时如此重要。

So how RSS or atom reader are informed about content updates if HTTP doesn't support connections?

The client checks the RSS feed frequently for new items. That's the only way to go here, I know of no "long polling" method in the area. It's why caching is so important when delivering RSS.

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