Is there a difference between long-polling and using Comet

后端 未结 4 531
[愿得一人]
[愿得一人] 2020-12-24 08:13

I am implementing a system where I need real-time updates. I have been looking at certain scenarios and among all was Comet. Implementing this I do not see any way this is d

4条回答
  •  渐次进展
    2020-12-24 09:05

    As mentioned by Marcelo, Comet is usually used to describe any techniques for "HTTP streaming", including long-polling. In some cases, Comet might also refer more specifically to the Bayeux Protocol. For instance, the jQuery Comet plugin is of this protocol. From the Bayeux website:

    Delivery of asynchronous messages from the server to a web client is often described as server-push. The combination of server push techniques with an Ajax web application has been called Comet. CometD is a project by the Dojo Foundation to provide multiple implementation of the Bayeux protocol in several programming languages.

    Bayeux is an attempt to standardize a publish/subscribe protocol using Comet techniques, allowing for vendors of client and server side libraries to create interoperable components.

提交回复
热议问题