COMET 相对于长请求轮询的优势?
我一直想知道使用 COMET / 推送技术是否比使用长请求进行更简单的轮询是否有真正的优势,在长请求中,服务器将等待一定的最长时间以等待新事件发生,然后再告诉客户端没有发生任何事情。
两种技术都有相似的客户端延迟,虽然普遍认为长请求会更糟糕,因为它们需要建立新的连接,但事实上还有 HTTP keep-alive - 所以最终,两者似乎产生了非常相似的结果流量/负载量。
那么使用 COMET 有什么明显的优势吗?
I've been wondering if there is a real advantage to using COMET / push-technologies over the much simpler polling with long requests where the server will wait a certain maximum time for new events to happen before telling the clients that nothing happened.
Both technologies have similar client latencies and while common wisdom is that long requests are worse because they need to establish a new connection, there's also the fact that there is HTTP keep-alive -- so in the end, both seem to produce a very similar amount of traffic / load.
So is there some clear advantage to using COMET?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,长请求的民意调查几乎是彗星。 短请求轮询则不然。
AFAIK polling with long requests pretty much IS comet. Polling with short requests is not.
我能想到的一些优点:
Some advantages I can think of: