RSS 和 ATOM 如何通知客户端有关更新的信息?长轮询还是轮询还是其他什么?
我读到 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这与这个问题非常相似。请在那里阅读我的答案。
目前没有针对 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.
有两个答案。
如今,大多数读者和聚合商都会对大多数提要进行投票。
有几种用于实时更新通知的方法正在开发中。
RSS 2.0 规范中有一项关于实时通知的规定,称为
元素。 (我想包含一个指向规范文本的链接,但 Stack Overflow 只允许我在每个帖子中包含一个链接。)我们最近完成了提供一个实现的演练的工作,该实现在我的一台服务器上启动并运行。
Google 正在赞助一个名为 PubSubHubbub 的项目,该项目可以实时通知更新。
我在 scripting.com 社区中有一个名为“FeedHose”的项目,用于对 RSS 和 Atom 提要的更新进行长轮询通知 - 您可以在以下位置找到指针: http://feedho.se/。
There are two answers.
Today most readers and aggregators poll for most feeds.
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/.
客户端经常检查 RSS 源是否有新项目。这是到达这里的唯一方法,我知道该地区没有“长轮询”方法。这就是为什么缓存在传送 RSS 时如此重要。
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.