彗星VS阿贾克斯聊天 [英] Comet vs Ajax for chatting

查看:108
本文介绍了彗星VS阿贾克斯聊天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站需要一个聊天室,我也期待实现facebookesque人对人的聊天系统。

My site needs a chat room, and I'm also looking to implement a facebookesque person to person chat system.

什么是最具成本效益/高性能(纯粹的体重和服务器而言),对我来说。定期1秒调查的ajax聊天,或彗星的解决方案。

What is most cost-efficient/performant (purely in terms of bw and server) for me. A regular 1 second poll ajax chat, or a comet solution.

感谢。

推荐答案

彗星将通常导致较低的带宽使用(假定每聊天平均秒小于1聊天消息),由于这样的事实,它只会查询服务器一次每个消息发送。它通常会导致到你的服务器,虽然更多的并发活动连接。

Comet would typically result in lower bandwidth usage (assuming less than 1 chat message per second per chat on average), owing to the fact that it will only query the server once per message sent. It would typically result in more concurrent active connections to your server though.

博客文章可以帮助您更好地进行查看。

This blog article may help you visualise it better.

这篇关于彗星VS阿贾克斯聊天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆