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

Jean-Francois Leveque jean-francois.leveque at upmc.fr
Tue May 18 01:40:10 PDT 2010


Would the x duration in minutes be set by the user in the preferences, 
by the admin in the configuration or elsewhere? How will it work with 
other related settings?

How about having the activity status detection available in 
EventTrackingService or another shared API?

I wonder how it will work from a performance point of view and could use 
cache or admin settings to protect us from heavy load.

+1 on the idea

"group by SAKAI_SESSION.SESSION_USER" is not needed in 
getLastEventTimeForUserSql with MySQL. I think it might also not be 
needed with Oracle, can someone else confirm this?

thanks,
Jean-Francois

Steve Swinsburg a écrit :
> Hi all,
> 
> I would like your feedback on two new methods I propose to add to the 
> EventTrackingService in order to retrieve the last event time for a 
> user/set of users. This is an addition that will be used by the Profile2 
> connections entity provider. Used in conjunction with KNL-497 (see if a 
> user has an active session, already committed) you will be able to see 
> if your connections are online and if they are active/idle (ie no event 
> in the last x minutes = idle). 
> 
> This entity provider will also be used by the floating chat widget we 
> are prototyping.
> 
> http://jira.sakaiproject.org/browse/KNL-498
> 
> A patch is attached to the JIRA ticket for your perusal, and the methods 
> are below:
> 
> /** 
> * Get last event time for the given user 
> * 
> * @param userId userId to check 
> * @return time of event as Long, null if no event. 
> */ 
> Long getLastEventTimeForUser(String userId); 
> 
> /** 
> * Get last event time for the given list of users 
> * 
> * @param userIds List of userId's to check 
> * @return map of userId and time of last event. If no event, there will 
> be no entry in the map for that user. 
> */ 
> Map<String, Long> getLastEventTimeForUsers(List<String> userIds);
> 
> 
> thanks,
> Steve


More information about the sakai-dev mailing list