[Zope-CMF] How I can list the users connected in a given moment at my CMF web?

Tres Seaver tseaver@zope.com
03 Jul 2002 18:27:55 -0400


On Wed, 2002-07-03 at 12:44, ferpema@iti.upv.es wrote:
>=20
> I need know how to list only the users that are connected at this moment.
> I don=B4t know if there is any CMF product for this feature.
> I need help !!!
>=20
> Sorry for my poor english.

HTTP is stateless, so any attempt at this is going to be an
approximation: there is no way to know whether someone who has
sent no requests for a while is "logged off" or just "thinking
deep thoughts".

One way to approximate it would be to use sessions;  you could store
the user ID in the session, and then write a script to iterate over
the active session data, retrieving the user IDs.  The granularity
of error on your answers will be related to the timeout on your
sessions.  Note that this solution imposes a non-trivial performance
penalty on your application, as each request must write to the session;
you will also be unable to run more than one ZEO client, unless you
work out a way to share the session storage across ZEO as well.

Tres.
--=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com