Goal: to create a decent Online IM Chat

Online chat is deceptively difficult due to the stateless nature of http and the web in general, causing such hurdles as session timeouts, users opening multiple windows and different accounts being signed in on one browser window. There is also the problem of users closing the browser window and logging out and such things, which make dealing with undelivered messages quite tricky.

Are there any good articles that describe how others have solved these problems elegantly?

Please feel free to write your own thoughts on how an IM like facebook or gmail's can be achieved with maximum robustness.

Is there any decent code base / writeup for integrating with a locally hosted jabber server to achieve this?

Edit: The site will be one on one chat between any member of the site - as in bob can talk to carol and bob can talk to jim at the same time in a separate chat popup. This does make it a good candidate for jabber/xmpp.

I will gladly accept the answer that is most helpful within the next 4 days.


I'm curious what sort of system you're planning on using this for. Is it for a small-scale chat system between users on a tiny project, or are you envisioning a BIG system? The biggest problem with online IM systems is reliability — take facebook, for example. Their chat system is notoriously buggy, and it's maintained by a large fleet of professional developers with tons of resources at their disposal.

You might want to start by looking at the XMPP organization's list of XMPP clients; there's a section for web clients. If there are any which are open-source, you could probably work with that some. Again, it's hard to say without knowing exactly what the system is intended to do. One possibility could be using Google Apps for your Domain if it's an internal sort of thing. If worse comes to worse, and you have a LOT of time on your hands, maybe you could write your own implementation of the LibPurple library for web use (google it; I don't have enough reputation points yet to post a second hyperlink).

Hope that gives some ideas of where to start. I've never done this before, just giving some hopefully helpful tips. Good luck!

链接地址: http://www.djcxy.com/p/94104.html

上一篇: 需要开发一个PHP

下一篇: 目标:创建一个体面的在线即时通讯聊天