聊天应用程序AJAX轮询 [英] Chat application AJAX polling

查看:91
本文介绍了聊天应用程序AJAX轮询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我目前正在从事的项目中,我们需要开发一个Web聊天应用程序,而不是一个非常复杂的聊天,仅是一种将两个人联系起来谈论一个非常具体的话题的方式,我们不需要任何东西对两个用户之一进行身份验证,我们不必支持表情符号,头像或类似的东西.

In the project I am currently working on, we have the need to develop a web chat application, not a very complex chat, just a way to connect two people to talk about a very specific topic, we don't need any kind of authentication for one of the two users, we don't have to support emoticons, avatars, or stuff like that.

一些项目成员建议我们可以通过BOSH使用XMPP,我说这就像试图用船网抓鱼,并提出了一种更简单的方法,例如简单的Ajax/MySQL网络聊天,但我们担心有关由于同时打开多个聊天室的持续轮询而导致服务器性能下降的原因.

Some project members suggested that we could use XMPP through BOSH, I said that is like trying to catch a fish with a boat's net, and proposed a simpler method, like a simple Ajax/MySQL web chat, but we're worried about the performance hit in the server because of the constant polling of many chats open at the same time.

以前有人做过这样的事情吗?你会推荐什么?

Has anyone done something like this before? What would you recommend?

推荐答案

您可能还想研究 GTalk,Meebo和许多其他聊天应用程序已使用它.几年前,当我尝试使用它时,并没有太多关于服务器架构的库或实现它的细节,但是现在看来还有更多的东西.

It's used by GTalk, Meebo, and many other chat applications. A few years ago when I was experimenting with it, there weren't very many libraries or details about server architecture to implement it, but it looks like there is a lot more stuff out now.

有关更多技术信息,请参见 cometd 项目.

Have a look at the cometd project for more technical information.

这篇关于聊天应用程序AJAX轮询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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