low overhead script

Associate
Joined
22 Jun 2009
Posts
813
Location
Norwich
hi any suggestions appreciated :)

I run an intranet system (web app based on apache/mysql/php) which is getting busier steadily. there are about 650 active users (150 of which use the system 5-10 times or more per day)

I would like to develop a script to log and monitor who is currently online.

I reckon I can do this with ajax + regular entries in a mysql table (or just a text file) but is there a more efficient way to do this?
eg if I poll every 10 sec that could mean thousands of entries eg opening / closing sql connections etc, per day.

As I said I'm used to the system being much less busy than this - and the system is running on a virtual win XP (wamp setup) system - is this going to go T/U??
 
The normal technique is is to log the last access time for each user, then if it falls within, say, the last 3 minutes, regard them as active.

I wouldn't poll the server just to say that the window is still open. It's meaningless.
 
I wouldn't poll the server just to say that the window is still open. It's meaningless.

i think that's sensible - however, users swap between desk tasks and shop floor activity, and the system has an automatic log-out after 15 min, so being inactive for > 3 min doesn't mean they have finished with their session.

i will look into your suggestion tho - i use a basic model-view-controller concept so the implementation should be easy

cheers ;)
 
Back
Top Bottom