[Building Sakai] request for review: KNL-498, get last event time for a user
Steve Swinsburg
steve.swinsburg at gmail.com
Tue May 18 03:12:14 PDT 2010
On reflection, and after some discussions, I think I'll look into having this cached, and a listener that updates the cache for events and removes the entry on logout.
For the cases where a user doesn't actually logout, ie just closes their browser, I believe the process that cleans old sessions also fires a logout event as well so that should be fine.
Thanks for the input all.
cheers,
Steve
On 18/05/2010, at 6:37 PM, Matthew Buckett wrote:
> On 18 May 2010 09:16, Nuno Fernandes <nuno at ufp.edu.pt> wrote:
>> +1 patch looks good!
>> You should check the query on a Sakai db with millions of entries in
>> SAKAI_EVENT and SAKAI_SESSION (typical on production environments) as it may
>> have some performance impact !
>
> As an alternative implementation you could have an event listener
> which keeps a cache (map) in memory of userId to date. When a new
> event is seen you update the date in the cache for the user.
>
> This should work as events propagate across the cluster and you don't
> need to use the DB at startup as nobody is logged in. The only issue
> is when adding a node to the cluster, as you need to populate the
> initial cache for that node. If we had a shared cache (aka MemCache)
> this wouldn't be a problem.
>
>> Great feature!
>
> Indeed.
>
> --
> Matthew Buckett
> VLE Developer, LTG, Oxford University Computing Services
More information about the sakai-dev
mailing list