English 中文(简体)
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!





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签