Files
moodle/mod/chat
martinlanghoff 930413b133 mod/chat: Normal method - introducing "Stream" updates.
This is an alternative version of jsupdate.php that acts
as a long-running daemon. It will feed/stall/feed JS updates
to the client. From the module configuration select "Stream"
updates.

The client connection is not forever though. Once we reach
CHAT_MAX_CLIENT_UPDATES (currently 1000), it will force
the client to re-fetch it.

This buys us all the benefits that chatd has, minus the setup,
as we are using apache to do the daemon handling.

Chat still defaults to the normal update method, which is now
optimised to take advantage of keepalives -- so this change is
safe. The instructions in the config page also indicate that this
mode may not be well supported everywhere. It hasn't been
tested on IIS for starters.

In terms of relative cost -- if each hit on jsupdate.php incurs
on ~20 db queries and delivers one update to the client, each hit
on jsupdate takes ~20 queries, and then roughly 2~3 queries to
serve each of the next 1000 updates. On busy sites, the difference
is huge.

There is still room for enhancements in both keepalive and stream
update methods. I am pretty sure we can trim DB queries more.
2006-04-19 02:20:48 +00:00
..
2006-01-13 03:45:31 +00:00
2003-07-09 12:37:17 +00:00
2005-07-08 03:51:38 +00:00
2004-07-30 16:16:12 +00:00
2006-04-11 16:09:52 +00:00
2005-04-27 03:44:52 +00:00

Official Chat Module for Moodle
------------------------------

The chat module now supports a backend daemon for 
more efficiency.

It's still buggy and being worked on, but if you 
want to test it and help out here are some quick
instructions:

1) Admin -> Config -> Modules -> Chat -> Settings

2) Set the method to "sockets" and set up the ports etc 

3) Start the server like this (from the Unix command line):

   cd moodle/mod/chat
   php chatd.php --start &

4) Go to a chat room in Moodle and open it as normal.

------

KNOWN PROBLEMS

 - User list is not always working
 - Some browsers (eg Safari) cause lines to be repeated
   by 10 - 20 times
 - Occasionally "Document was empty" messages

Help solving these very welcome!


Martin, 31 July 2004