开发者

Looking to build a web based chat. Any suggestions?

I was looking to build a web based chat application. My primary idea was in the direction of using AJAX and transferring XML messages to-and-fro a centralized server (used for synchronization)

However, i recently came across XMPP and would like to know how feasible it is to use it as a web based chat client and server, and how easy it is to implement it in PHP.

I would really like some inputs from the gurus here about any other technical approaches that i can take. The chat has to be completely web based, but might be ported to an iPhone applic开发者_开发百科ation sometime later in the future.


Checkout this browser based chat examples of Jaxl library . JAXL (Jabber XMPP Library) is written in PHP and you can extend the packaged sample examples for your use case.

Checkout this blog post on how to setup the sample browser chat application on your local system.


If you really want to build something simple and fast, use memcache as a queue. When user A sends a message, put it in a queue for user B who periodically polls using AJAX.

You could also experiment with node.js which is great for chat applications.

I've implemented XMPP as well and I found it to be too much work to have it work properly and stable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜