Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Tracking user exits

by puck (Scribe)
on Sep 06, 2000 at 09:10 UTC ( [id://31211]=note: print w/replies, xml ) Need Help??


in reply to Tracking user exits

How about everytime a user loads a page it updates that users "active" file. If a users "active" file hasn't been updated for x minutes expire it. The expiration can either be a cronjob which runs every 5 or so minutes or part of the code which generates the list of "active users".

That's how I'd do it... However, there may be better ways to do it. This is something which I might consider adding to a system I'm going to start working on RSN.

Replies are listed 'Best First'.
RE: Re: Tracking user exits
by puck (Scribe) on Sep 07, 2000 at 03:11 UTC
    I was thinking about this a bit more last night and another method which would be faster than using a DB is shared memory.

    This would probably only work if you're using mod_perl or you have a script that is always running which prunes out the expired connections. I think this method might be a bit nicer than using the file system as well.

    I haven't tested it to see what the performance is like, but it could be good.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://31211]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-03-28 17:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found