Is there any way to tell from within Zope whether there are any users connected at any time? -- John
HTTP connections open - send a request - get a response - and close. users are only really "connected" during that brief period of time. If you want to create some other definition of "connected", you could check for time since the last request and decide that any user who has made a request in the last X minutes is still "connected". If you want to get really tricky, you could have your Zope pages return a document with frames, and have one of those frames contain an HTTP reload command which keeps hitting the sever ever X seconds to let you know that the browser is still open to your page. (The return to this request can even be used to generate pop up messages for "connected" users) But even this doesn't guarantee that your user is still there. He or she may have walked away from the computer, taken a cab to the airport, and gotten on a flight to Tonga. :-) --Sean
-----Original Message----- From: zope-bounces@zope.org [mailto:zope-bounces@zope.org]On Behalf Of John Poltorak Sent: Thursday, November 04, 2004 4:16 PM To: zope@zope.org Subject: [Zope] Connected users
Is there any way to tell from within Zope whether there are any users connected at any time?
-- John
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Sean Hastings wrote:
HTTP connections open - send a request - get a response - and close. users are only really "connected" during that brief period of time.
If you want to create some other definition of "connected", you could check for time since the last request and decide that any user who has made a request in the last X minutes is still "connected".
If you want to get really tricky, you could have your Zope pages return a document with frames, and have one of those frames contain an HTTP reload command which keeps hitting the sever ever X seconds to let you know that the browser is still open to your page. (The return to this request can even be used to generate pop up messages for "connected" users) But even this doesn't guarantee that your user is still there. He or she may have walked away from the computer, taken a cab to the airport, and gotten on a flight to Tonga. :-)
If you can tolerate the cost, you can also force your users to create sessions, and then track how many of those are active; they eventually time out, giving you a rough idea how many users are online. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com
If you happened to be using exUserFolder, the acl_users folder has a Cache Data tab that lists Logged in users. I use that if I am itching to do a Restart and want to know if there are other users who may be affected. Cliff John Poltorak wrote:
Is there any way to tell from within Zope whether there are any users connected at any time?
participants (4)
-
Cliff Ford -
John Poltorak -
Sean Hastings -
Tres Seaver