List Info

Thread: Logout events




Logout events
user name
2006-10-27 21:20:03
> (The thing I still don't quite get is where such a
listener class  
> would/could reside.  It would obviously have to be
persistent -  
> would it be the engine, or a brand new class? )

It would be launched by the engine, probably in its own
thread. The  
beautify thing about "listener" objects is that
they don't need  
access to to many things -- all they need to do is sit
around and  
wait for events.

> PS: I also wonder would you tie the events together (to
produce the  
> stats) with the login name?  Or would you (as I
commented earlier)  
> really need to somehow get the events to become aware
of the  
> session id?

I didn't mention this because it's easy. SessionMonitor is
the thing  
that would fire expiration events; Authentication manager
fires  
logout events. Security events have four fields: source (who
fired  
the event?),  type (what sort of event is it?), principal
(which user  
who caused this event?) and target (what did the event act
on?).  
These event fields (notably the target, which would contain
the  
WikiSession) contain the information we'd need to tie
everything  
together.

Andrew


> Andrew Jaquith wrote:
>> Terry and all --
>>
>> Session expiration events are an excellent idea!
There's very  
>> little we would need to do here, because we already
have a session  
>> monitor thread (SessionMonitor) that actually
detects the  
>> expirations. It would be a very simple thing to
have that chunk of  
>> code fire off this new event type (expiration) when
it detects  
>> that a session has expired.
>>
>> As for session statistics, I've been tossing around
a few ideas in  
>> my head for a while about this. Basically, I've
been thinking that  
>> it would be great if we had a listener class that
subscribes to  
>> login/logout/expiration events and page events and
records a bunch  
>> of stats. Things that might be interesting for
session statistics:
>> - Time of login, logout, and authentication change
(anonymous ->  
>> asserted -> authenticated)
>> - User name
>> - Length of session
>> - # pages read
>> - # pages edited
>>
>> We'd need the new event type (for expirations), a
listener class  
>> ("SessionStatsListener") and a class that
would contain stats for  
>> each session ("SessionStats"). There's
also the log file, which  
>> could be done through log4j but might be better
executed through  
>> standard file operations.
>>
>> I don't have any plans to do this soon (not in the
next 30 days,  
>> anyhow) but it would be an extremely
straightforward thing to do.
>>
>> Andrew
>>
>>
>> On Oct 27, 2006, at 12:06 PM, Terry Steichen wrote:
>>
>>> Sure.  Allows you to better set the timeout
period to minimize  
>>> overhead.  Also, if you subtract the timeout
period from the  
>>> duration of a session, you'll get a very good
idea of just how  
>>> long your users are actually active.
>>>
>>> Erik Bunn wrote:
>>>>
>>>> On Oct 27, 2006, at 17:09 , Terry Steichen
wrote:
>>>>
>>>>> I suspect that most users don't use an
explicit logout, instead  
>>>>> allowing the session to expire via
inactivity timeout.  Would  
>>>>> it be useful to also generate an event
(in SessionMonitor) when  
>>>>> a session has expired?
>>>>
>>>> You're probably right, and I wouldn't mind
knowing the  
>>>> difference between session timeouts and
logouts, either. Makes a  
>>>> difference if you have a thousand users
idling away. ;)
>>>>
>>>> //ebu
>>>>
>>>>
>>>>
_______________________________________________
>>>> Jspwiki-users mailing list
>>>> Jspwiki-usersecyrd.com
>>>> http://ecyrd.com/cgi-bin/mailman/listinfo/jspwiki-users
>>>>
>>> _______________________________________________
>>> Jspwiki-users mailing list
>>> Jspwiki-usersecyrd.com
>>> http://ecyrd.com/cgi-bin/mailman/listinfo/jspwiki-users
>>
>> _______________________________________________
>> Jspwiki-users mailing list
>> Jspwiki-usersecyrd.com
>> http://ecyrd.com/cgi-bin/mailman/listinfo/jspwiki-users
>>
> _______________________________________________
> Jspwiki-users mailing list
> Jspwiki-usersecyrd.com
> http://ecyrd.com/cgi-bin/mailman/listinfo/jspwiki-users

_______________________________________________
Jspwiki-users mailing list
Jspwiki-usersecyrd.com
http://ecyrd.com/cgi-bin/mailman/listinfo/jspwiki-users
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )