1 Using Sakai in Stellar at MIT Mark J. Norton, Nolaria Consulting Craig Counterman, MIT Mark Brown, MIT.

Slides:



Advertisements
Similar presentations
 2002 Prentice Hall. All rights reserved. Chapter 9: Servlets Outline 9.1 Introduction 9.2 Servlet Overview and Architecture Interface Servlet and.
Advertisements

Linking External Tools with Sakai David Ross Educational Technology, Albany Medical College.
Objectives Ch. D - 1 At the end of this chapter students will: Know the general architecture and purpose of servlets Understand how to create a basic servlet.
An introduction to Java Servlet Programming
J2EE Servlets and JSP Advanced topics Presented by Bartosz Sakowicz.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 34 Servlets.
June 1, 2000 Object Oriented Programming in Java (95-707) Advanced Topics 1 Lecture 10 Object Oriented Programming in Java Advanced Topics Servlets.
Integrating Servlets and JavaServer Pages Vijayan Sugumaran School of Business Administration Oakland University Parts of this presentation provided by.
Servlet details Russell Beale. Servlet lifecycle The servlet container creates only one instance of each servlet Each use request handled with a separate.
Chapter 4 Servlets Concept of Servlets (What, Why, and How) Servlet API Third-party tools to run servlets Examples of Using Servlets HTML tag with GET.
Definition Servlet: Servlet is a java class which extends the functionality of web server by dynamically generating web pages. Web server: It is a server.
Servlets Compiled by Dr. Billy B. L. Lim. Servlets Servlets are Java programs which are invoked to service client requests on a Web server. Servlets extend.
Servlets Life Cycle. The Servlet Life Cycle A servlet life cycle can be defined as the entire process from its creation till the destruction. The following.
SE-2840 Dr. Mark L. Hornick1 Java Servlet-based web apps Servlet Architecture.
Java Servlets. What Are Servlets? Basically, a java program that runs on the server Basically, a java program that runs on the server Creates dynamic.
Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
Java Server Pages B.Ramamurthy. Topics for Discussion 8/20/20152 Inheritance and Polymorphism Develop an example for inheritance and polymorphism JSP.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Servlets Pranav Maydeo. What is a Servlet ? Servlets are modules of Java code that run in a server application to answer client requests. Servlets are.
Servlets. - Java technology for Common Gateway Interface (CGI) programming. - It is a Java class that dynamically extends the function of a web server.
Java support for WWW Babak Esfandiari (sources: Qusay Mahmoud, Roger Impey, textbook)
RECALL THE MAIN COMPONENTS OF KIM Functional User Interfaces We just looked at these Reference Implementation We will talk about these later Service Interface.
Chapter 5 Java Servlets. Objectives Explain the nature of a servlet and its operation Use the appropriate servlet methods in a web application Code the.
Chapter 7 Java Server Pages. Objectives Explain how the separation of concerns principle applies to JSP Describe the operation and life-cycle of a JSP.
Web Server Programming 1. Nuts and Bolts. Premises of Course Provides general introduction, no in-depth training Assumes some HTML knowledge Assumes some.
CHEF II / Sakai Architecture. CHEF II Changes uPortal replaces Jetspeed –jsr 168 portlet, servlet compliant Spring replaces Turbine component framework.
Chapter 3 Servlet Basics. 1.Recall the Servlet Role 2.Basic Servlet Structure 3.A simple servlet that generates plain text 4.A servlet that generates.
Java Servlets. Servlets When we run small Java programs within a browser these are referred to as Applets... And when we run small Java programs within.
Java Servlets & Java Server Pages Lecture July 2013.
1 CS122B: Projects in Databases and Web Applications Spring 2015 Notes 03: Web-App Architectures Professor Chen Li Department of Computer Science CS122B.
Enterprise Integration in Sakai 2.4 An overview of what’s new and (hopefully) improved.
S ERVLETS Hits Counter 21-Nov-15. S ERVLETS - H ITS C OUNTER Many times you would be interested in knowing total number of hits on a particular page of.
8th Sakai Conference4-7 December 2007 Newport Beach Integration: Users and Groups Mark J. Norton Nolaria Consulting.
Server-side Programming The combination of –HTML –JavaScript –DOM is sometimes referred to as Dynamic HTML (DHTML) Web pages that include scripting are.
Introduction to Server-Side Web Development Introduction to Server-Side Web Development Session II: Introduction to Server-Side Web Development with Servlets.
SE-2840 Dr. Mark L. Hornick1 Servlet Threads and Sessions.
1 Java Servlets l Servlets : programs that run within the context of a server, analogous to applets that run within the context of a browser. l Used to.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Spring MVC Essentials Getting started.
CSE 403 The Mythical Servlet Goals Introduce basic servlet terminology Formally introduce homework 2 Walkthrough of build & deployment Group discussion.
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
1 Introduction to Servlets. Topics Web Applications and the Java Server. HTTP protocol. Servlets 2.
Mark Dixon 1 11 – Java Servlets. Mark Dixon 2 Session Aims & Objectives Aims –To cover a range of web-application design techniques Objectives, by end.
JS (Java Servlets). Internet evolution [1] The internet Internet started of as a static content dispersal and delivery mechanism, where files residing.
Advanced Java Session 6 New York University School of Continuing and Professional Studies.
©SoftMoore ConsultingSlide 1 Filters. Filters can be used in a web application to intercept, examine, and possibly transform requests or responses associated.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
The Sakai Architecture
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 21 Java Servlets Wed. 11/22/00 based on material.
Java Servlets and Java Server Pages
How CGI and Java Servlets are Run By David Stein 14 November 2006.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
The Chain of Responsibility Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
Bayu Priyambadha, S.Kom. Static content  Web Server delivers contents of a file (html) 1. Browser sends request to Web Server 3. Web Server sends HTML.
Securing Web Applications Lesson 4B / Slide 1 of 34 J2EE Web Components Pre-assessment Questions 1. Identify the correct return type returned by the doStartTag()
Enterprise Java v050228MVC1 Model, View, Controller Web Architecture.
MODEL VIEW CONTROLLER PATTERN. Model View Controller MVC is a time tested method of separating the user interface of an application from its Domain Logic.
CS122B: Projects in Databases and Web Applications Spring 2017
Introduction to Servlets
CS122B: Projects in Databases and Web Applications Winter 2017
Servlet Fudamentals.
Java Servlets By: Tejashri Udavant..
Java Servlets.
Chapter 6 Server-side Programming: Java Servlets
HTTP Servlet Overview Servlets are modules that extend request/response-oriented servers, such as Java-enabled web servers. For example, a servlet might.
Chapter 26 Servlets.
CS122B: Projects in Databases and Web Applications Winter 2018
CS122B: Projects in Databases and Web Applications Spring 2018
Servlet APIs Every servlet must implement javax.servlet.Servlet interface Most servlets implement the interface by extending one of these classes javax.servlet.GenericServlet.
An Introduction to JavaScript
CS122B: Projects in Databases and Web Applications Winter 2019
Presentation transcript:

1 Using Sakai in Stellar at MIT Mark J. Norton, Nolaria Consulting Craig Counterman, MIT Mark Brown, MIT

2 The MIT Course Management System is called Stellar designed and built by Craig Counterman. The project was started in 2001 to provide on-line support for existing MIT classes. Quickly grew to support basic support needs: homework, schedule, forums, etc.

3 Background and History 2001: Stellar project started to provide on-line support for MIT classes. 2002: OKI objects added. 2004: MIT is a founding partner of the Sakai project. 2005: Explored adding Sakai tools. 2006: Stellar and Sakai integrated.

4 Statistics There are 509 classes on Stellar for Spring 2006 (so far) Stellar class websites have been created since Of all Stellar class websites 49.7 % are graduate courses and 50.3 % are undergraduate courses.

5 Original Stellar Architecture Plug-in tool capability: –Stand alone tools –Integrated tools Core objects were based on the emerging OKI OSID specifications. Several presentation technologies are supported. A diagram shows it better….

6 Stellar 1 Architecture

7 Stellar Tools Materials Homework and drop box Schedule and Announcements Sign up for Sections Discussion forum based on Jive Syllabus Etc.

8 New Tool Development New tools are easy to build in Stellar. The new ImageTool, for example. However, MIT wants to take advantage of the large number of tools being developed for Sakai. A replacement for Jive was needed.

9 Stellar Home Page

10 Some Problems Sakai has it’s own portal – Charon. Maintains it’s own user sessions. Runtime includes –Component management. –Tool state and placements. –Preferences, etc. Tools use Sakai’s authorization system.

11 Solution! Create a null portal that: –Accepts requests for Sakai tools –Maintains the Sakai user session –Creates or finds tool placement as needed –Manage other environment concerns This is called LaunchPortal in Stellar. Leads to a new architecture….

12 Stellar 2 Architecture

13 Request Processing In stellar, a URL is of the form: nexus/nexus/nexus/tool/tool-arguments Each request is processed to find a tool. Proxy tools are added to forward a request to the LaunchPortal. The LaunchPortal then forwards it to the appropriate Sakai tool along with a context. Tools return HTML.

14 Request and Response Flow Stellar Tool Proxy Launch Sakai Tool Aggregator RequestResponse HTML Content Aggregated Content

15 Preserving the Sakai Session Stellar uses a regular java.servlet session and a servlet session cookie for state. This is the JSESSIONID cookie. Stellar was already using this, so code had to be added to preserve Sakai session information and forward it to the request handler This is done via a HttpServletRequestWrapper in the proxy tool which eliminates the non-Sakai cookie from the request.

16 The Launch Portal LaunchPortal is a null portal built by stripping down Mercury to it’s essentials. 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.

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 Request Processing The doGet() method is the usual entry point to the LaunchPortal since most are HTTP GET requests. doPost() replicates most of doGet() just in case a POST request is needed.

19 1. Logic in doGet() User name is passed in on an attribute. Largely manages paths and URLs. If there is no session, one is created for this user. This happens in initSession(). Checks for development UI case or, Calls doTool(). Context also passed via an attribute.

20 2. Logic in doTool() Gets the Sakai tool associated with the tool id passed. Uses the context to find or create a tool placement, a combination of a tool and a context (usually a site or section). Calls forwardTool().

21 3. Logic in forwardTool() Makes sure that attributes are set for the HTML head and style sheet references. Uses the forward() method in the Sakai tool to forward the request to the tool being invoked.

22 Error Handling 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. Exception information is logged in catalina.out

23 Content Aggregation Sakai tools are generally written to appear in an iFrame. Stellar avoids the use of iFrames for accessibility and graphic design reasons. HTML content from Sakai tools will be aggregated via an XML transform. TBD

24 JForum in Stellar

25 Sakai Tool Integration In order for Sakai tools to work fully in the Stellar environment, they must be integrated with user and group data. Sakai includes three providers for integration to enterprise data services: –UserDirectoryProviderImplemented –GroupProviderExtended –CourseManagementProviderUnused

26 User Integration StellarUserProvider fully implements the UserDirectoryProvider against Stellar user data using a OkapiUser object. User data is currently limited to: –First and Last Name – address –(but more data could be added)

27 Authorization Sakai provides limited support for authorization integration using the GroupProvider API. This provider gives access to group names, membership, and group roles. It does NOT allow authorization grants to be resolved externally.

28 Extensions to GroupProvider Since Stellar sites are not defined as groups in Sakai, access can’t be determined locally by the Security Service. In order to properly determine authorization requests by Sakai tools against Stellar users and groups, the Group Provider was extended with three methods: –isAllowed() –isGroup() –getAllowedFunctions()

29 Three New Methods Boolean isAllowed (userId, ftn, realm); Boolean isGroup (groupId); Set getAllowedFunctions(role, groups); 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 GroupProvider Implementation The StellarGroupProvider is implemented against Stellar Nexus data that contains sites, roster lists, and user roles. This is done directly against Nexus objects, thus avoiding database interaction.

31 Tool Lessons Learned Sakai tools can be made to work in non- Sakai UI environments using an intermediary to maintain a Sakai session. Some hand-off support is needed to ensure tool ids, context, and arguments. The environment is more flexible than some might think!

32 Integration Lessons Learned Authorization is at the heart of integration. User and Group info is easy, but authorization can be hard. The Sakai providers are good, but can be improved for greater flexibility.

33 Future Work External authorization may be better done by re-implementing AuthZGroups rather than via the GroupProvider. Course Management and Sectioning providers will be needed to allow any Sakai tool to run in Stellar.