构建基于 Web 的即时消息的最佳方式? [英] Best Way to Build a Web Based Instant Messaging?

查看:21
本文介绍了构建基于 Web 的即时消息的最佳方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

想要建立一个类似于 www.chatzy.com 的基于 Web 的即时消息系统问题是最好的方法是什么?

Want to build an web based Instant Messaging system similar to www.chatzy.com The question is what is the best way to go about it?

单独使用 Ajax 方式,在那里我编写一个脚本,该脚本为您的对话不断 ping 和更新数据库?

Go soley the Ajax way, where i write a script that continually pings and updates a database for u conversation?

或者玩转 XMPP?

如果答案是 XMPP?我很感激任何指向任何在线资源的指针,这些资源详细说明了如何使用 XMPP 来构建此类服务......(通过谷歌进行了一些搜索,但结果很流行)

If the answer is XMPP? i would appreciate any pointer to any online resource that details how XMPP can be used in building such services...(Done some couple of searches via google but results came in vogue)

我会使用 PHP,但也可以使用 Python,如果它提供更好的解决方案来完成这项工作.

I would be using PHP, but can use Python too, if it offers a better solution to getting this done.

谢谢

推荐答案

XMPP/BOSH

  • 现在我会使用 XMPP/BOSH 来编写基于 Web 的 IM.我发现 Prosody 是支持 BOSH.那么您根本不需要编写任何服务器端代码.
  • 然后对于 javascript,我将使用 strophe.js
  • XMPP/BOSH

    • Right now I would use XMPP/BOSH to write web-based IM. I found Prosody the easiest server that supports BOSH. Then you don't need to write any server-side code at all.
    • Then for the javascript I would use strophe.js
      • 就像 Pablo 指出的那样,你可以看看 websockets.但是 Pablo 对 gmail 有误解.它不使用 websockets.websockets 的主要缺点是浏览器支持.这是未来,但还不是.
      • 轮询无法扩展.我不会推荐它.

      这篇关于构建基于 Web 的即时消息的最佳方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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