Hi Christian,
Christian Binder schrieb:
Hi devs,
some eGW apps need a solid info about users online/offline states, e.g.
notififications, a chat application or simply an admin info(the latter
would be nice). PHP sessions are often not reliable enough for that
(think of a user not pressing the “logout” button … what a shame they
often forget!)
So the idea is to introduce some kind of “hearbeat”. A simple database
entry (a timestamp) driven by an AJAX call every … minute(s). I know
this could be a performance thing in large installations.
It would be possible to simply put that into the already existing
notification request done every minute, we could save ressources with
that but I fear that this is really not the right place.
We should definitely not add new periodic ajax calls. They are a real
pain for big installations.
The problem with notifications once per minute ajax call is, it does not
say anything about the user is still in front of the screen. For that
reason, we dont update the session_dla (in the session), because
otherwise sessions never timeout, if the browser stays open.
Every ajax call (included the one from notification) and every regular
request, already calls egw_session::verify(), which in turn calls
egw_session::update_dla(), if
$GLOBALS[‘egw_info’][‘flags’][‘no_dla_update’] is NOT set. The later is
the case for every ajax call from the notification app (see xajax, line
106).
So to get a better session list, we could add session_dla and
session_action to egw_access_log and update them in
egw_session::update_dla().
This still leaves the question open, if it should be updated when the
notifications ajax call is made. I think no, as it does NOT say anything
about the user is still in front of the browser, it only says the user
has not closed the browser.
Ralf
Ralf Becker
Director Software Development
Stylite GmbH
[open style of IT]
Morschheimer Strasse 15
67292 Kirchheimbolanden
fon +49 (0) 6352 70629-0
fax +49 (0) 6352 70629-30
mailto: rb@stylite.de
www.stylite.de
www.egroupware.org
Geschäftsführer Andre Keller, Gudrun Müller,
Nigel Vickers und Ralf Becker
Registergericht Kaiserslautern HRB 30575
Umsatzsteuer-Id / VAT-Id: DE214280951
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers