[JDEV] jabberwebclient

Bart van Bragt jabber at vanbragt.com
Fri Jan 10 03:38:20 CST 2003

Adrian Rapa wrote:
> 2. JabberWebClient
>     I was thinking of writing it using only HTML/DHTNL and
> javascript/ECMAScript. it should be very simple, as it will be an
> webpage that reloads every 2 minutes, let say.
Eeeh, IMO an IM client that updates every 2 minutes is not very 
workable. Even e-mail is faster.
IMO there are two options:
- You let the page reload every 1 minute until a chat starts, then you 
speed up the reloads while the user is chatting and return to 1 minute 
intervals when the user is idle again.

You keep the connection open to the HTTP server and use things like 
flush() in PHP to push data to the browser. This works pretty well, main 
drawback it that this requires one decidated (pretty heavy) Apache per 
connection which can cost you quite a bit of memory.

Just take a look at some PHP chat room scripts, most of them use this 
method. If they don't they are terribly slow (mostly for the user but 
they are also not really kind for your server) :D

Just my $0.02 :D

Bart van Bragt
"Take my advice, I don't use it anyway."

More information about the JDev mailing list