extending sakai cle to websphere and db2

41
8th Sakai Conference 4-7 December 2007 Newport Beach Extending Sakai CLE Extending Sakai CLE to WebSphere and DB2 to WebSphere and DB2 Mr. Marty Banting, Sr. Software Engineer, IBM Mr. Howard Baker, Executive Project Manager, IBM Mr. John Bush, Development Manager, rSmart Mr. Earle Nietzel Software Engineer, Marist College Mr. Austin Schilling, IT Executive Consultant, IBM

Upload: amber-petty

Post on 03-Jan-2016

46 views

Category:

Documents


4 download

DESCRIPTION

Extending Sakai CLE to WebSphere and DB2. Mr. Marty Banting, Sr. Software Engineer, IBM Mr. Howard Baker, Executive Project Manager, IBM Mr. John Bush, Development Manager, rSmart Mr. Earle Nietzel Software Engineer, Marist College Mr. Austin Schilling, IT Executive Consultant, IBM. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Extending Sakai CLE  to WebSphere and DB2

8th Sakai Conference

4-7 December 2007Newport Beach

Extending Sakai CLE Extending Sakai CLE to WebSphere and DB2to WebSphere and DB2

Mr. Marty Banting,Sr. Software Engineer, IBM

Mr. Howard Baker, Executive Project Manager, IBM

Mr. John Bush, Development Manager, rSmart

Mr. Earle NietzelSoftware Engineer, Marist College

Mr. Austin Schilling,IT Executive Consultant, IBM

Page 2: Extending Sakai CLE  to WebSphere and DB2

2

AgendaAgenda

• Amsterdam 2007 “recap”• Collaboration Team and Environment• Application Server and Database

Considerations• Production at Marist College• Sakai Community Availability• Next Steps

Page 3: Extending Sakai CLE  to WebSphere and DB2

3

Marist College, rSmart, IBM collaboration on Marist College, rSmart, IBM collaboration on Enterprise Sakai Enterprise Sakai June 12, 2007June 12, 2007

Page 4: Extending Sakai CLE  to WebSphere and DB2

4

MARIST COLLEGEMARIST COLLEGE• We are NOT a large research university! • Founded 1929 – small complex liberal

arts college• Approximately 5700 FTE student

population• 200 full-time faculty, 500 part-time• Long history of incorporating technology

into the teaching and learning process

Page 5: Extending Sakai CLE  to WebSphere and DB2

8th Sakai Conference

4-7 December 2007Newport Beach

Why do we need an Why do we need an extensible solution?extensible solution?

Answer: We’ve learned our lesson from the past…

Page 6: Extending Sakai CLE  to WebSphere and DB2

6

Learning from the past…Learning from the past…

• In 1996 the digital horizon was foggy…• We have a better view today… watch out!• Use and production of digital media will grow

exponentially over next decade:– Electronic portfolios (oh yeah…“for life”)– Rich media learning objects (IVT Demo)– IdentityQuest Project (Podcasting Demo)– Next Up: Mobile authoring tools?

Page 7: Extending Sakai CLE  to WebSphere and DB2

7

Colleges and Universities

Marist College Evolving Learning GridMarist College Evolving Learning Grid

K-12 DistrictState and

Local Consortia

Museums, science

centers, etc.

Certification Exams

Online Courses

“Raw” Video Content

Student content

Schema for Provisioning the Sharing of Resources/ToolsSchema for Provisioning the Sharing of Resources/Tools

Sakai Repository

NSF MM Grid

RPI, Lehigh,,Geneseo

Greystone NYSTAR CCODC

NSF IDCP

FDR

Sewall-Belmont

Page 8: Extending Sakai CLE  to WebSphere and DB2

8

Marist/IBM Joint StudyMarist/IBM Joint Study

• Well Established Relationship, First Project – 1988• Living Lab for New Technologies

– Research projects, IBM Academic Initiative support, Marist grant initiatives

• IBM program manager provides overall project management– IBM researchers, developers, business execs, and

Marist faculty, IT staff, and students collaborate on numerous projects

• Marist students hired as IBM interns– Opportunities for full-time positions

Page 9: Extending Sakai CLE  to WebSphere and DB2

9

Marist Sakai GoalsMarist Sakai Goals

• How do we create a:– Standards based, – Capacity/Performance scalable, – Technology Extensible, – version of the Sakai CLE capable of handling future

business and application needs – in a Services based infrastructure?

• How can this vision be realized with the Sakai CLE deployment within the existing Joint Study infrastructure of:– WebSphere Application Servers, and– DB2 9 pureXML Technology Database?

Page 10: Extending Sakai CLE  to WebSphere and DB2

10

Marist – rSmart – IBM SupportMarist – rSmart – IBM Support

• QA environment running DB2 and WAS will be live in September with several “flavors” of Sakai.

• Marist will also be contributing several QA resources for testing activities

Page 11: Extending Sakai CLE  to WebSphere and DB2

11

Global CampusStudents

EducatorsAdministrators

Customized Portals

App 1

App 1

App 2

App 2

App 3

App 3

Collaborative Learning Environment

Sakai Tools &DevelopmentEnvironment

Distributed Environment

Core Services: content, user, security, site

Core Infrastructure

Sakai Vision (2005)

Page 12: Extending Sakai CLE  to WebSphere and DB2

12

Extending CLE Infrastructure (2007)Extending CLE Infrastructure (2007)Global Campus

StudentsEducators

Administrators

Customized Portals

App 1

App 1

App 2

App 2

App 3

App 3

Collaborative Learning Environment

Sakai CLE v2.4.1rSmart Distribution

Core Services: content, user, security, site

-X-Platform O/S -Fedora, other Linux, Windows-Tomcat Application Server-My SQL Database + Others

-X-Platform O/S - Slackware, RedHat, SuSE - WebSphere Application Server - DB2v9 SQL/XML Database

Relational Databases File Systems

Page 13: Extending Sakai CLE  to WebSphere and DB2

13

Collaboration TeamCollaboration Team• IBM

– Marty Banting– Alexander Reynolds– Robert Gilnack– Michael Ardizonne– Daniel Herman– Daniel Miller– Howard Baker– Austin Schilling

• rSmart– John Bush– Michael Sanders– Tony Potts

• Marist College– Earle Nietzel– John Digilio– Josh Baron

Page 14: Extending Sakai CLE  to WebSphere and DB2

14

Marist iLearnODC HistoryMarist iLearnODC History

• Previous porting efforts included Sakai 2.2.2 and 2.3.1.• rSmart Sakai CLE 2.4 was next to be ported.• July & August

– Sakai 2.4 port Development phase• September & October

– Merged in Sakai 2.4.1– Testing phase

• November – UAT phase

• December – Migrate IBM course to into production

• Work in Progress

Page 15: Extending Sakai CLE  to WebSphere and DB2

15

A Collaborative EffortA Collaborative Effort

• rSmart focused efforts on DB2• IBM / Marist Joint Studies focused on Websphere

• Weekly Checkpoint Meetings• Daily status calls• Scheduled builds• rSmart Jira

SakairSmart Sakai CLErSmart Sakai CLE

WAS/DB2 port(iLearnODC)

Page 16: Extending Sakai CLE  to WebSphere and DB2

16

Porting EnvironmentPorting Environment

• Development & Build Tools– Eclipse– Rational Application

Developer– Rational Software

Architect– Maven, Subversion

• Testing– IBM

• Linux Blades– Slackware, SuSE v9– Apache Tomcat– MySQL– WebSphere v6.1.09– DB2 v9.3

– rSmart• Jira• SVN

– Marist College• SVN

Page 17: Extending Sakai CLE  to WebSphere and DB2

17

Tool ListTool List

• Blogger• Samigo• Announcements• Calendar• Melete• Gradebook• OSP Tools• Message Center• Site Stats

• Site Info• Assignments• Syllabus• Roster• Profile• User Membership• rWiki• … and more!

Page 18: Extending Sakai CLE  to WebSphere and DB2

18

The ChallengesThe Challenges

• Team members relatively new to Sakai• No proper debugging environment• Collaborative effort with a distributed team

• Issues– Tomcat vs. Websphere related: 33– Sun vs. IBM JDK/JRE related: 8 – DB2 related: 35

• Time to analyze and fix: ½ hour to 1.5 weeks

Page 19: Extending Sakai CLE  to WebSphere and DB2

19

Porting for WebspherePorting for Websphere

• Goal is to create a single codebase for both Tomcat and Websphere

• Strived to make modifications app server independent

• If not, then we used– Logical ‘if’ in Java code to check app server flag

in sakai.properties– Websphere specific versions of xml/property

config files

Page 20: Extending Sakai CLE  to WebSphere and DB2

20

Websphere Porting IssuesWebsphere Porting IssuesDifferences in JDK/JREDifferences in JDK/JRE

• XML– Referencing vendor specific implementations

eg. “com.sun.org.apache.xerces.internal.parsers.SAXParser”

– Null attributes handled differently on XML document to string conversions

Page 21: Extending Sakai CLE  to WebSphere and DB2

21

Websphere Porting IssuesWebsphere Porting IssuesDifferences in JDK/JREDifferences in JDK/JRE

• JSP– Quotes handled differently in JSP compilation

<jsp:include page="<%= (String)request.getAttribute("_body")%>" />

Page 22: Extending Sakai CLE  to WebSphere and DB2

22

• Deployment Descriptors– Tomcat is much more lenient with invalid

deployment descriptors• If a web.xml file does not match the servlet

specification it overlooks the error and allows the web application to function normally

– WebSphere is much more strict• Will not allow an application to be installed unless

there are no errors in the web.xml file

Websphere Porting IssuesWebsphere Porting IssuesWAS vs. TomcatWAS vs. Tomcat

Page 23: Extending Sakai CLE  to WebSphere and DB2

23

Websphere Porting IssuesWebsphere Porting IssuesWAS vs. TomcatWAS vs. Tomcat

• Redirection / Navigation Issues– in Tomcat:

getContextPath() = /osp-portal/tool/197c330a-8baf-4c0b-0018-3741f1eb3e87

In Websphere:request.getContextPath() = /osp-portal

– Affects context.redirect calls eg. context.redirect("sakai.filepicker.helper/tool")

Page 24: Extending Sakai CLE  to WebSphere and DB2

2424

DB2 Porting IssuesDB2 Porting Issues• Work Involved:

– Creating db2 versions of all sql/ddl scripts– Reworking issues from core services – Hibernate Complications– Deal with non-standard persistence mechanisms in some

tools (jforum and blogger)

• Design Goals – one code base must support DB2 plus mysql and oracle – isolate changes

Page 25: Extending Sakai CLE  to WebSphere and DB2

25

Core ServicesCore Services

– No vendor specific abstraction in Sakai for dealing with vendor specific issues.

– End up with code like this:

25

if ("oracle".equals(m_sqlService.getVendor())) {...} else if ("mysql".equals(m_sqlService.getVendor())) { ...} else if ("db2".equals(m_sqlService.getVendor())) { ...}

Page 26: Extending Sakai CLE  to WebSphere and DB2

26

For 2.5 For 2.5 • Core Services delegate to injected SQL

helpers (SAK-8706)

26

public interface ClusterServiceSql { String getListExpiredServers(long timeout);...}public class SakaiClusterServiceSqlOracle extends SakaiClusterServiceSqlDefault{ public String getListExpiredServers(long timeout) { return "select SERVER_ID from SAKAI_CLUSTER where SERVER_ID != ? and UPDATE_TIME < (CURRENT_TIMESTAMP - " + ((float) timeout / (float) (60 * 60 * 24)) + " )";}}public class SakaiClusterServiceSqlMySql extends SakaiClusterServiceSqlDefault{ public String getListExpiredServers(long timeout) { return "select SERVER_ID from SAKAI_CLUSTER where SERVER_ID != ? and UPDATE_TIME < CURRENT_TIMESTAMP() - INTERVAL " + timeout + " SECOND";}

Page 27: Extending Sakai CLE  to WebSphere and DB2

27

Refactor StatusRefactor Status

• Completed for event, content, cluster, site, user, authz, and db

• Microsoft SQL Server implementations contributed (SAK-7002)

• DB2 still left to do, for 2.6 ?

27

Page 28: Extending Sakai CLE  to WebSphere and DB2

28

Hibernate and DB2Hibernate and DB2

• length of index names (18 characters for DB2)

• binary type• type mismatches in a few Samigo queries

28

Page 29: Extending Sakai CLE  to WebSphere and DB2

29

DB2 DialectDB2 Dialect• Good place for dealing with how Hibernate

maps its types to the vendor• Can enforce column length limitations

• Doesn’t provide a solution to all our problems....

29

Page 30: Extending Sakai CLE  to WebSphere and DB2

30

Hibernate UserTypesHibernate UserTypes

• Interface which allows you to control how a data element maps from the object model to the database and back

30

public Object nullSafeGet(ResultSet resultSet, String[] names, Object owner) throws HibernateException, SQLException { final Object object; final Integer bigInt = resultSet.getInt(names[0]); if (bigInt == null) { return null; } return bigInt.toString(); } public void nullSafeSet(PreparedStatement statement, Object value, int index) throws SQLException { final String strValue = (String) value; if (strValue == null) { statement.setNull(index, Types.BIGINT); } else { statement.setInt(index, Integer.valueOf(strValue)); } }

Page 31: Extending Sakai CLE  to WebSphere and DB2

31

Transforming hbm’sTransforming hbm’s

• Modified AdditionalHibernateMappingsImpl to apply a vendor specific xsl transformation to the hbm’s

• This re-writes the hbm’s at runtime, “injecting” our custom UserTypes.

• This avoids hacking up the hbms, with only a one line code change to this file.

31

Page 32: Extending Sakai CLE  to WebSphere and DB2

32

Tomcat

webapps/

Building & DeployingBuilding & Deploying

warwarwarwar

componentscomponentscomponentscomponents

jar

components/

shared/lib/

jarjarjar

Page 33: Extending Sakai CLE  to WebSphere and DB2

33

installedApps/

Websphere

Building & DeployingBuilding & Deploying

warwarwarwar

componentscomponentscomponentscomponents

jar

components/

shared/lib/

jarjarjar

EAR

Page 34: Extending Sakai CLE  to WebSphere and DB2

34

Build ProcessBuild Process

• Design Goals– Build process for Websphere as easy as Tomcat– Leverage existing build process with Maven 1.0.2

• Differences from Tomcat build– Copies Websphere specific XML and property files pre-

compilation– Packages the WAR files into an EAR file– Copies components and shared libs to appropriate

directory

Page 35: Extending Sakai CLE  to WebSphere and DB2

35

Building ProcessBuilding Process

• New ‘was’ module– starting point for Websphere build– contains overlay directory with the Websphere specific XML and

property files– Gets copied into source pre-compilation

• New ‘ear’ project within ‘was’ module– utilizes Maven EAR plugin– project.xml specifies WAR dependencies

• New property (was.sakai_shared.home) in build.properties specifies where to deploy components and shared library files

Page 36: Extending Sakai CLE  to WebSphere and DB2

36

Deployment ProcessDeployment Process

• Deployed via Websphere Admin Console– Web based application for Websphere

management

• Setup shared library pointing to components and shared lib directory

• Deploy as EAR file

Page 37: Extending Sakai CLE  to WebSphere and DB2

37

Marist iLearnODC Production StatusMarist iLearnODC Production Status

• Final Testing near completion• January 2008

– System Z Networking course online

• March 2008 – 2 new courses online– Prepare to migrate Marist Courses

• September 2008– Sakai 2.4.1 production at Marist

Page 38: Extending Sakai CLE  to WebSphere and DB2

38

Best practicesBest practices

• Use persistence frameworks• Consider the web framework• Don’t hard code implementations• Validate against specification

38

Page 39: Extending Sakai CLE  to WebSphere and DB2

39

Next StepsNext Steps

• Form Platform Support WG• Refactor DB2 work to use new SQL helpers

in 2.5• Refactor/revisit some Websphere fixes• Establish better development environment

for Websphere• Contribute low hanging fruit ASAP• Increase adoption of Sakai

Page 40: Extending Sakai CLE  to WebSphere and DB2

40

Q & AQ & A

Page 41: Extending Sakai CLE  to WebSphere and DB2

8th Sakai Conference

4-7 December 2007Newport Beach

Technical ContactsTechnical Contacts

John Bush ([email protected])Marty Banting ([email protected])Earle Nietzel ([email protected])

Austin Schilling ([email protected])Howard Baker ([email protected])