[Building Sakai] LikeService

Steve Swinsburg steve.swinsburg at gmail.com
Tue Nov 23 17:16:48 PST 2010


On 24/11/2010, at 1:48 AM, Adrian Fish wrote:

>> 
>> On a more serious note, can we like entities other than people?
> I thought that would potentially be a huge db hit potentially generating 
> millions of records, so I ducked it ..

A cache would work well here, key is the entity ref, value is the count. Update the value when something is liked. This is how the ActivityService works, which keeps track of all online users and their online status. Each event they publish updates their record in the cache so we can calculate if someone is active or away (or offline if they aren't in the list)

The potentially huge of records for all of the entities are ok, so long as they are indexed. In any case it would only really = the number of users + number of sites + maybe the number of resources (+ anything else you want to add in to be liked).

cheers.
Steve




More information about the sakai-dev mailing list