[Building Sakai] request for review: KNL-498, get last event time for a user

Matthew Buckett matthew.buckett at oucs.ox.ac.uk
Tue May 18 01:37:39 PDT 2010


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