admin管理员组文章数量:1022670
I'm curious as how to monitor a website for it's updates in realtime, preferably in node.js.
Let's take Wikipedia for example. Someone decides to update an article with some relevant information. How would I go about subscribing to the page and instantly getting the event in my node.js server without having to poll the website every X seconds?
I'm curious as how to monitor a website for it's updates in realtime, preferably in node.js.
Let's take Wikipedia for example. Someone decides to update an article with some relevant information. How would I go about subscribing to the page and instantly getting the event in my node.js server without having to poll the website every X seconds?
Share Improve this question asked Jul 16, 2012 at 20:18 Ruben HomsRuben Homs 5911 gold badge7 silver badges21 bronze badges 4- I don't know enough about Node.js to do this, but someone who does could see how Hummingbird works and apply the same concepts. I think you'd need sockets. – Some Guy Commented Jul 16, 2012 at 20:21
- 1 Make a deal with the Wikipedia people to post something to a web-based API you create whenever a page update is posted. – Pointy Commented Jul 16, 2012 at 20:21
- 1 Think of it like stalking your ex. Either she tells you her news (highly unlikely) or you have to FETCH them. – Adi Commented Jul 16, 2012 at 20:22
- I think you should have a look at pubsubhubbub – Alfred Commented Jul 17, 2012 at 5:06
2 Answers
Reset to default 2In general, you will need to poll the website if there are no other possibilities like a news feed. You can't force them to provide such a service.
For Wikipedia in detail, there are live update IRC streams, one for each project. Wikistream is such an app that reads the feed, you can view it's open source node.js code at github.
In case you have option to "instruct" the website to notify you, you can create webservice that website will call when it content is updated. But of course, that website should have such option.
I'm curious as how to monitor a website for it's updates in realtime, preferably in node.js.
Let's take Wikipedia for example. Someone decides to update an article with some relevant information. How would I go about subscribing to the page and instantly getting the event in my node.js server without having to poll the website every X seconds?
I'm curious as how to monitor a website for it's updates in realtime, preferably in node.js.
Let's take Wikipedia for example. Someone decides to update an article with some relevant information. How would I go about subscribing to the page and instantly getting the event in my node.js server without having to poll the website every X seconds?
Share Improve this question asked Jul 16, 2012 at 20:18 Ruben HomsRuben Homs 5911 gold badge7 silver badges21 bronze badges 4- I don't know enough about Node.js to do this, but someone who does could see how Hummingbird works and apply the same concepts. I think you'd need sockets. – Some Guy Commented Jul 16, 2012 at 20:21
- 1 Make a deal with the Wikipedia people to post something to a web-based API you create whenever a page update is posted. – Pointy Commented Jul 16, 2012 at 20:21
- 1 Think of it like stalking your ex. Either she tells you her news (highly unlikely) or you have to FETCH them. – Adi Commented Jul 16, 2012 at 20:22
- I think you should have a look at pubsubhubbub – Alfred Commented Jul 17, 2012 at 5:06
2 Answers
Reset to default 2In general, you will need to poll the website if there are no other possibilities like a news feed. You can't force them to provide such a service.
For Wikipedia in detail, there are live update IRC streams, one for each project. Wikistream is such an app that reads the feed, you can view it's open source node.js code at github.
In case you have option to "instruct" the website to notify you, you can create webservice that website will call when it content is updated. But of course, that website should have such option.
本文标签: javascriptMonitoring website updates in realtimeStack Overflow
版权声明:本文标题:javascript - Monitoring website updates in realtime - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745543062a2155272.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论