So I can't run SQL on structures or arrays then? Yes hitting the DB every time would be a bit slow as I would have to update the timestamp whenever a page is loaded. I am worried that looping over a structure may be slow every time a page is loaded. The structure may get quite big.
While I'm here can I just confirm that the CFID is unique for each user and the CFTOKEN is unique for each user and visit? Giles Roadnight http://giles.roadnight.name -----Original Message----- From: Russ Michaels [mailto:snake@;snakepit.net] Sent: 07 November 2002 11:05 To: [EMAIL PROTECTED] Subject: RE: [ cf-dev ] Online Users Imagine that every single page for every single person hits the DB? Pretty heavy don't you think. You just create a application structure and add a key for each user with a timestamp whenever they do something, this updates their online status. You also have some cod ethat loops ove rthe structure and deletes all keys where the timestamp is les sthan 20 minutes or so, so u remove offline users. > -----Original Message----- > From: Giles Roadnight > [mailto:giles.roadnight@;goldcockerelbooks.co.uk] > Sent: 07 November 2002 10:49 > To: [EMAIL PROTECTED] > Subject: RE: [ cf-dev ] Online Users > > > I am wanting to do something similar I think. I just want a > little thing on the home page saying x Users logged on. > > Have we come to any decision - is it better to do this in the > application scope or in a DB. How would I do this in the > application scope? Have an array of time stamps, when I want > a number delete and time stamps older than 30 mins then get > the length? Seems to me this would be easier to manage in a > DB then I would just have to run two simple queries - one to > delete all timestamps too old then another count one. Can I > do similar things on structures in the application scope? I > am sure I can as you can do queries on queries so I suppose > you can do queries on structures but what about delete queries? > > Sorry I'm rambling a bit but I think you know what I mean? > > > Giles Roadnight > http://giles.roadnight.name > > > -----Original Message----- > From: Steve Martin [mailto:steve.martin@;sequence.co.uk] > Sent: 07 November 2002 10:37 > To: [EMAIL PROTECTED] > Subject: RE: [ cf-dev ] Online Users > > I haven't empirically tested the performance differences > between calling an SP and writing to memory so I'll retract > my comments until such time as I can be arsed testing it > ;-), though I still doubt that writing to the app scope is as > evil as you make out <g> My cat's breath smells of cat food. > > Steve > > > -----Original Message----- > > From: Robertson-Ravo, Neil (REC) > > [mailto:Neil.Robertson-Ravo@;csd.reedexpo.com] > > Sent: 07 November 2002 10:21 > > To: '[EMAIL PROTECTED]' > > Subject: RE: [ cf-dev ] Online Users > > > > > > I disagree I would say reading and writing to a DB would be > > faster than > > consantly reading and writing to the Application scope (its > > using an SP > > btw). You certainly cannot say that its "massively slower > > than writing to > > memory", cause thats not the case. > > > > I have never liked using the application scope for such > > intensive requests > > as I have always seen degredation in performance especially > > when the scope > > starts to grow and become more complex. > > > > As for another way Russ, I told you, I am using a > > table...(possible temp, I > > have not decided yet.). > > > > Neil > > > > > > > > -----Original Message----- > > From: Steve Martin [mailto:steve.martin@;sequence.co.uk] > > Sent: 07 November 2002 10:15 > > To: [EMAIL PROTECTED] > > Subject: RE: [ cf-dev ] Online Users > > > > > > I'd still be interested to hear your rationale on why updating an > > application structure would be v.bad wheras you are happy > to dump this > > info in a db which is massively slower than writing to memory. > > > > > -----Original Message----- > > > From: Robertson-Ravo, Neil (REC) > > > [mailto:Neil.Robertson-Ravo@;csd.reedexpo.com] > > > Sent: 07 November 2002 10:09 > > > To: '[EMAIL PROTECTED]' > > > Subject: RE: [ cf-dev ] Online Users > > > > > > > > > erm..... like I said, yes I know that can be done but with > > > the possibility > > > of 600K users online at one time and the Application > > > structure being written > > > and read many times its not ideal........ in fact it would be > > > extremely > > > unwise to do so....... > > > > > > > > > -----Original Message----- > > > From: Paul Fennell [mailto:paul@;satachi.com] > > > Sent: 07 November 2002 10:07 > > > To: [EMAIL PROTECTED] > > > Subject: RE: [ cf-dev ] Online Users > > > > > > > > > bung that info in to an application strc then > > > wrap it and lock it > > > > > > > > > > > > -----Original Message----- > > > From: Robertson-Ravo, Neil (REC) > > > [mailto:Neil.Robertson-Ravo@;csd.reedexpo.com] > > > Sent: 07 November 2002 09:56 > > > To: '[EMAIL PROTECTED]' > > > Subject: RE: [ cf-dev ] Online Users > > > > > > > > > :-) > > > > > > I need to have a list of ALL users logged into the system at > > > one time... I > > > log their UserID, time of login etc... > > > > > > N > > > > > > -----Original Message----- > > > From: Steve Martin [mailto:steve.martin@;sequence.co.uk] > > > Sent: 07 November 2002 09:53 > > > To: [EMAIL PROTECTED] > > > Subject: RE: [ cf-dev ] Online Users > > > > > > > > > OK, let's look at this again, from the top. What specific user > > > information do you require and for what purpose? > > > > > > > -----Original Message----- > > > > From: Robertson-Ravo, Neil (REC) > > > > [mailto:Neil.Robertson-Ravo@;csd.reedexpo.com] > > > > Sent: 07 November 2002 09:19 > > > > To: '[EMAIL PROTECTED]' > > > > Subject: RE: [ cf-dev ] Online Users > > > > > > > > > > > > LOL :-) > > > > > > > > OK Steve, What I can't see from your suggestion is this : > > > > how do I get > > > > *all* of the users into the session scope? of course I > > > > understand fully how > > > > to get them into the application scope (to be shared) but I > > > > am unsure on how > > > > you get all of the users into a session scope which can then > > > > be queried. > > > > Surely each users session is independent? > > > > > > > > Neil > > > > > > > > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > From: Steve Martin [mailto:steve.martin@;sequence.co.uk] > > > > Sent: 06 November 2002 17:47 > > > > To: [EMAIL PROTECTED] > > > > Subject: RE: [ cf-dev ] Online Users > > > > > > > > > > > > By who's criteria? > > > > The session scope is there for storing login information of > > > > this nature. > > > > Slam in some RAM if you feel that your server can't cope. 600 > > > > users is a > > > > pretty teeny weeny small number by any server's standards. > > > > > > > > My usual advice is to avoid trying to come up with > > esoteric software > > > > engineering solutions to workaround physical > constraints when such > > > > constraints can be overcome by spending 50p on some more memory. > > > > > > > > > -----Original Message----- > > > > > From: Robertson-Ravo, Neil (REC) > > > > > [mailto:Neil.Robertson-Ravo@;csd.reedexpo.com] > > > > > Sent: 06 November 2002 17:12 > > > > > To: '[EMAIL PROTECTED]' > > > > > Subject: RE: [ cf-dev ] Online Users > > > > > > > > > > > > > > > well,, after a quick check, the amount of users within the > > > > > system could be > > > > > 600+ at anyone time..... > > > > > > > > > > bit big for the session scope?! > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Steve Martin [mailto:steve.martin@;sequence.co.uk] > > > > > Sent: 06 November 2002 16:44 > > > > > To: [EMAIL PROTECTED] > > > > > Subject: RE: [ cf-dev ] Online Users > > > > > > > > > > > > > > > I just store login information in the session scope which > > > > > takes care of > > > > > flushing itself when the timeout is reached. Why > > > > specifically are you > > > > > storing such information in a db? > > > > > > > > > > > -----Original Message----- > > > > > > From: Robertson-Ravo, Neil (REC) > > > > > > [mailto:Neil.Robertson-Ravo@;csd.reedexpo.com] > > > > > > Sent: 06 November 2002 16:31 > > > > > > To: '[EMAIL PROTECTED]' > > > > > > Subject: [ cf-dev ] Online Users > > > > > > > > > > > > > > > > > > This is a no brainer and I must be having a brain fart.... > > > > > > > > > > > > We have an online table which holds records for each user > > > > > > logged onto the > > > > > > system after login. > > > > > > These rows have a date logged on etc, and indeed this works > > > > > > well when the > > > > > > user signs off as expected (as this removes the rows in > > > question) > > > > > > > > > > > > however, what process do you guys have in place when a user > > > > > > does NOT sign > > > > > > off and simply closes the browser and does not return for > > > > a few days > > > > > > later...? > > > > > > > > > > > > It means that they remain 'online' in the DB...... > > > > > > > > > > > > What do you guys have in place... any ideas? > > > > > > > > > > > > Neil > > > > > > > > > > > > -- > > > > > > ** Archive: > > > > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > > > > > > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > > > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > For human help, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > -- > > > > ** Archive: > > > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > For human help, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > > > > ** Archive: > > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > For human help, e-mail: [EMAIL PROTECTED] > > > > > > > > > -- > > > ** Archive: > > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > For human help, e-mail: [EMAIL PROTECTED] > > > > > > -- > > > ** Archive: > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] For > > human help, e-mail: [EMAIL PROTECTED] > > > > > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] For human help, e-mail: > [EMAIL PROTECTED] > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] For human help, e-mail: > [EMAIL PROTECTED] > > > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] For human help, e-mail: > [EMAIL PROTECTED] > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] For human help, e-mail: > [EMAIL PROTECTED] > > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] For human help, e-mail: > [EMAIL PROTECTED] > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] For human help, e-mail: > [EMAIL PROTECTED] > > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] For human help, e-mail: > [EMAIL PROTECTED] > > > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] For human help, e-mail: > [EMAIL PROTECTED] > > -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
