[sakai2-tcc] More Indie Thinking on Profile2 / Profile

Steve Swinsburg steve.swinsburg at gmail.com
Wed Sep 1 21:22:55 PDT 2010


>> 
> 
> Imagine that in 2.9, I wanted to add a little display to every portal page that indicated how many of your "profile2 friends" were on line and if you clicked on it a little window would slide up and let you chat with them (uh, like Facebook perhaps).
> 
> That means that portal needs to compute the "number of online friends" for the logged in user for every portal view.   It would not be satisfactory if the portal had to do a REST call to /direct to get that information.   Whatever call that the portal will do millions of times per day needs to be highly tunable with sweet caching, and maximally efficient all the way down to and through the DAO to the most efficient query possible.
> 

Sounds like a familiar idea:
http://sakai-project-mail-list-archives.1343168.n2.nabble.com/Building-Sakai-chat-in-presence-tt5114576.html#a5119946

My team already has this mapped as a project and we've got a POC in the works :) But happy to collaborate once my staff are back on deck.

Also, the Kernel ActivityService is essentially just a cache, and works with an Observer on EventTrackingService. When a user logs in they go into the cache, when they post an event they are refreshed in the cache. Then when the list of your connections is pulled from the database, it's compared to the cached list of online people. Eventually the Profile2 connections list itself will be cached as well.

I would imagine that an AJAX based call from Javascript to the direct servlet that pulls data from the cache would be much faster than pulling it out of the database. If its not, then Sakai 3 is going to be pretty slow. However, I can understand that a piece of server side code that needs to create a HTTP request to /direct/ is not as useful as using the API directly, which I think is that you are talking about.

We've taken a detour a bit. Pulling the API out of Profile2 and into common should still be debated in this group as to it's merits and usefulness over having a manageable indie release. But there is already an API people can bind to that gives you everything you need:
profile2-api-1.4-SNAPSHOT-javadoc.jar


cheers,
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai2-tcc/attachments/20100902/ad457327/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3689 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai2-tcc/attachments/20100902/ad457327/attachment.bin 


More information about the sakai2-tcc mailing list