Is there some way to PUSH data from web server to

2019-01-01 03:24发布

Of course I am aware of Ajax, but the problem with Ajax is that the browser should poll the server frequently to find whether there is new data. This increases server load.

Is there any better method (even using Ajax) other than polling the server frequently?

18条回答
残风、尘缘若梦
2楼-- · 2019-01-01 03:44

Comet is definitely what you want. Depending on your language/framework requirements, there are different server libraries available. For example, WebSync is an IIS-integrated comet server for ASP.NET/C#/IIS developers, and there are a bunch of other standalone servers as well if you need tighter integration with other languages.

查看更多
墨雨无痕
3楼-- · 2019-01-01 03:44

An interesting alternative to Comet is to use sockets in Flash.

查看更多
像晚风撩人
4楼-- · 2019-01-01 03:47

Yes, what you're looking for is COMET http://en.wikipedia.org/wiki/Comet_(programming). Other good Google terms to search for are AJAX-push and reverse-ajax.

查看更多
梦该遗忘
5楼-- · 2019-01-01 03:47

Comet was actually coined by Alex Russell from Dojo Toolkit ( http://www.dojotoolkit.org ). Here is a link to more infomration http://cometdproject.dojotoolkit.org/

查看更多
时光乱了年华
6楼-- · 2019-01-01 03:48

Look into Comet (a spoof on the fact that Ajax is a cleaning agent and so is Comet) which is basically "reverse Ajax." Be aware that this requires a long-lived server connection for each user to receive notifications so be aware of the performance implications when writing your app.

http://en.wikipedia.org/wiki/Comet_(programming)

查看更多
君临天下
7楼-- · 2019-01-01 03:51

Might be worth checking out Meteor Server which is a web server designed for COMET. Nice demo and it also is used by twitterfall.

查看更多
登录 后发表回答