moodle/mod/chat/gui_header_js
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
..
chatinput.php mod/chat: make http-chat more database friendly and change msg insertion to use POST 2006-04-17 21:03:44 +00:00
chatmsg.php fixed deleting of old users when using chatd, other minor fixes, reverting of changes in chatmsg - found some weird problems in FF 2005-02-10 19:14:53 +00:00
index.php mod/chat: Normal method - introducing "Stream" updates. 2006-04-19 02:20:48 +00:00
insert.php mod/chat: make http-chat more database friendly and change msg insertion to use POST 2006-04-17 21:03:44 +00:00
jsupdate.php mod/chat: Normal method -- collate 2 SELECTs into one 2006-04-17 21:06:28 +00:00
jsupdated.php mod/chat: Normal method - introducing "Stream" updates. 2006-04-19 02:20:48 +00:00
users.php mod/chat: Normal method -- faster, lighter DB updates 2006-04-17 21:05:51 +00:00