On Thu, Jul 31, 2008 at 5:27 AM, jhonny thio <[EMAIL PROTECTED]> wrote:
> I want to make a chat application...
> My scenario is the client every 1s will request to server (with AJAX).
> So the client will always read the database, if there is a new message in
> [message table], the client will write in textarea. what do you think ?
>
The HTTP protocol allows up to two concurrent XMLHttp requests to be
active. One option to consider if you're using a server that can retain
conections is to issue an async request to the server with a long timeout.
When the server has something available for your application, it can use the
pending request to send its response. Upon receipt of that response, your
application would take action based on the response and issue a new
long-lived "poll" request to the server.
This still leaves the second XMLHttp request available for quick requests
such as sending a message typed in your application's message area, or even
"Server, are you still alive" requests.
Food for thought.
Derrell
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel