How RSS and ATOM inform client about updates? long polling or polling or something else?

佐手、 提交于 2020-01-01 03:50:11

问题


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".


回答1:


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.




回答2:


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/.




回答3:


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.



来源:https://stackoverflow.com/questions/3952882/how-rss-and-atom-inform-client-about-updates-long-polling-or-polling-or-somethi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!