Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Stellar Sakai Integration


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Stellar Sakai Integration

  1. 1. Using Sakai in Stellar at MIT Mark J. Norton, Nolaria Consulting Craig Counterman, MIT Mark Brown, MIT
  2. 2. <ul><li>The MIT Course Management System is called Stellar designed and built by Craig Counterman. </li></ul><ul><li>The project was started in 2001 to provide on-line support for existing MIT classes. </li></ul><ul><li>Quickly grew to support basic support needs: homework, schedule, forums, etc. </li></ul>
  3. 3. Background and History <ul><li>2001 : Stellar project started to provide on-line support for MIT classes. </li></ul><ul><li>2002 : OKI objects added. </li></ul><ul><li>2004 : MIT is a founding partner of the Sakai project. </li></ul><ul><li>2005 : Explored adding Sakai tools. </li></ul><ul><li>2006 : Stellar and Sakai integrated. </li></ul>
  4. 4. Statistics <ul><li>There are 509 classes on Stellar for Spring 2006 (so far). </li></ul><ul><li>2729 Stellar class websites have been created since 2001. </li></ul><ul><li>Of all Stellar class websites 49.7 % are graduate courses and 50.3 % are undergraduate courses. </li></ul><ul><li> </li></ul>
  5. 5. Original Stellar Architecture <ul><li>Plug-in tool capability: </li></ul><ul><ul><li>Stand alone tools </li></ul></ul><ul><ul><li>Integrated tools </li></ul></ul><ul><li>Core objects were based on the emerging OKI OSID specifications. </li></ul><ul><li>Several presentation technologies are supported. </li></ul>A diagram shows it better….
  6. 6. Stellar 1 Architecture
  7. 7. Stellar Tools <ul><li>Materials </li></ul><ul><li>Homework and drop box </li></ul><ul><li>Schedule and Announcements </li></ul><ul><li>Sign up for Sections </li></ul><ul><li>Discussion forum based on Jive </li></ul><ul><li>Syllabus </li></ul><ul><li>Etc. </li></ul>
  8. 8. New Tool Development <ul><li>New tools are easy to build in Stellar. </li></ul><ul><li>The new ImageTool, for example. </li></ul><ul><li>However, MIT wants to take advantage of the large number of tools being developed for Sakai. </li></ul><ul><li>A replacement for Jive was needed. </li></ul>
  9. 9. Stellar Home Page
  10. 10. Some Problems <ul><li>Sakai has it’s own portal – Charon. </li></ul><ul><li>Maintains it’s own user sessions. </li></ul><ul><li>Runtime includes </li></ul><ul><ul><li>Component management. </li></ul></ul><ul><ul><li>Tool state and placements. </li></ul></ul><ul><ul><li>Preferences, etc. </li></ul></ul><ul><li>Tools use Sakai’s authorization system. </li></ul>
  11. 11. Solution! <ul><li>Create a null portal that: </li></ul><ul><ul><li>Accepts requests for Sakai tools </li></ul></ul><ul><ul><li>Maintains the Sakai user session </li></ul></ul><ul><ul><li>Creates or finds tool placement as needed </li></ul></ul><ul><ul><li>Manage other environment concerns </li></ul></ul><ul><li>This is called LaunchPortal in Stellar. </li></ul>Leads to a new architecture….
  12. 12. Stellar 2 Architecture
  13. 13. Request Processing <ul><li>In stellar, a URL is of the form: nexus/nexus/nexus/tool/tool-arguments </li></ul><ul><li>Each request is processed to find a tool.  </li></ul><ul><li>Proxy tools are added to forward a request to the LaunchPortal. </li></ul><ul><li>The LaunchPortal then forwards it to the appropriate Sakai tool along with a context. Tools return HTML. </li></ul>
  14. 14. Request and Response Flow Stellar Tool Proxy Launch Sakai Tool Aggregator Request Response HTML Content Aggregated Content
  15. 15. Preserving the Sakai Session <ul><li>Stellar uses a regular java.servlet  session and a servlet session cookie for state.  </li></ul><ul><li>This is the JSESSIONID cookie. </li></ul><ul><li>Stellar was already using this, so code had to be added to preserve Sakai session information and forward it to the request handler </li></ul><ul><li>This is done via a HttpServletRequestWrapper in the proxy tool which eliminates the non-Sakai cookie from the request. </li></ul>
  16. 16. The Launch Portal <ul><li>LaunchPortal is a null portal built by stripping down Mercury to it’s essentials. </li></ul><ul><li>It still has a very limited UI, but is intended to run without a UI by forwarding requests to appropriate Sakai tools based on incoming tool id. </li></ul>
  17. 17. LaunchPortal public class LaunchPortal extends HttpServlet { public String getServletInfo() public void init(ServletConfig config) throws ServletException protected void doGet(HttpServletRequest req, HttpServletResponse res) protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException protected void doError(HttpServletRequest req, HttpServletResponse res, Session session) throws IOException protected void doHome(HttpServletRequest req, HttpServletResponse res, Session session) protected void doTool(HttpServletRequest req, HttpServletResponse res, Session session, String toolId, String context, String toolContextPath, String toolPathInfo) throws IOException protected void forwardTool(ActiveTool tool, HttpServletRequest req, HttpServletResponse res, Placement p, String toolContextPath, String toolPathInfo) protected void showSession(PrintWriter out, boolean html) private void initSession (HttpServletRequest req, HttpServletResponse res, Session session, String context) }
  18. 18. Request Processing <ul><li>The doGet() method is the usual entry point to the LaunchPortal since most are HTTP GET requests. </li></ul><ul><li>doPost() replicates most of doGet() just in case a POST request is needed. </li></ul>
  19. 19. 1. Logic in doGet() <ul><li>User name is passed in on an attribute. </li></ul><ul><li>Largely manages paths and URLs. </li></ul><ul><li>If there is no session, one is created for this user. This happens in initSession(). </li></ul><ul><li>Checks for development UI case or, </li></ul><ul><li>Calls doTool(). Context also passed via an attribute. </li></ul>
  20. 20. 2. Logic in doTool() <ul><li>Gets the Sakai tool associated with the tool id passed. </li></ul><ul><li>Uses the context to find or create a tool placement, a combination of a tool and a context (usually a site or section). </li></ul><ul><li>Calls forwardTool(). </li></ul>
  21. 21. 3. Logic in forwardTool() <ul><li>Makes sure that attributes are set for the HTML head and style sheet references. </li></ul><ul><li>Uses the forward() method in the Sakai tool to forward the request to the tool being invoked. </li></ul>
  22. 22. Error Handling <ul><li>Since LaunchPortal is a real servlet, any errors encountered while preparing to launch or transfer to a Sakai tool can be wrapped into an HTML error page. </li></ul><ul><li>Exception information is logged in catalina.out </li></ul>
  23. 23. Content Aggregation <ul><li>Sakai tools are generally written to appear in an iFrame. </li></ul><ul><li>Stellar avoids the use of iFrames for accessibility and graphic design reasons. </li></ul><ul><li>HTML content from Sakai tools will be aggregated via an XML transform. TBD </li></ul>
  24. 24. JForum in Stellar
  25. 25. Sakai Tool Integration <ul><li>In order for Sakai tools to work fully in the Stellar environment, they must be integrated with user and group data. </li></ul><ul><li>Sakai includes three providers for integration to enterprise data services: </li></ul><ul><ul><li>UserDirectoryProvider Implemented </li></ul></ul><ul><ul><li>GroupProvider Extended </li></ul></ul><ul><ul><li>CourseManagementProvider Unused </li></ul></ul>
  26. 26. User Integration <ul><li>StellarUserProvider fully implements the UserDirectoryProvider against Stellar user data using a OkapiUser object. </li></ul><ul><li>User data is currently limited to: </li></ul><ul><ul><li>First and Last Name </li></ul></ul><ul><ul><li>Email address </li></ul></ul><ul><ul><li>(but more data could be added) </li></ul></ul>
  27. 27. Authorization <ul><li>Sakai provides limited support for authorization integration using the GroupProvider API. </li></ul><ul><li>This provider gives access to group names, membership, and group roles. </li></ul><ul><li>It does NOT allow authorization grants to be resolved externally. </li></ul>
  28. 28. Extensions to GroupProvider <ul><li>Since Stellar sites are not defined as groups in Sakai, access can’t be determined locally by the Security Service. </li></ul><ul><li>In order to properly determine authorization requests by Sakai tools against Stellar users and groups, the Group Provider was extended with three methods: </li></ul><ul><ul><li>isAllowed() </li></ul></ul><ul><ul><li>isGroup() </li></ul></ul><ul><ul><li>getAllowedFunctions() </li></ul></ul>
  29. 29. Three New Methods <ul><li>Boolean isAllowed (userId, ftn, realm); </li></ul><ul><li>Boolean isGroup (groupId); </li></ul><ul><li>Set getAllowedFunctions(role, groups); </li></ul>More methods than these may be needed to fully support external authorization. These were the minimal ones needed to make Message Center and Jforum work.
  30. 30. GroupProvider Implementation <ul><li>The StellarGroupProvider is implemented against Stellar Nexus data that contains sites, roster lists, and user roles. </li></ul><ul><li>This is done directly against Nexus objects, thus avoiding database interaction. </li></ul>
  31. 31. Tool Lessons Learned <ul><li>Sakai tools can be made to work in non-Sakai UI environments using an intermediary to maintain a Sakai session. </li></ul><ul><li>Some hand-off support is needed to ensure tool ids, context, and arguments. </li></ul><ul><li>The environment is more flexible than some might think! </li></ul>
  32. 32. Integration Lessons Learned <ul><li>Authorization is at the heart of integration. </li></ul><ul><li>User and Group info is easy, but authorization can be hard. </li></ul><ul><li>The Sakai providers are good, but can be improved for greater flexibility. </li></ul>
  33. 33. Future Work <ul><li>External authorization may be better done by re-implementing AuthZGroups rather than via the GroupProvider. </li></ul><ul><li>Course Management and Sectioning providers will be needed to allow any Sakai tool to run in Stellar. </li></ul>