Tips for Deploying Sakai

Exclusive offer: get 50% off this eBook here
Sakai CLE Courseware Management: The Official Guide

Sakai CLE Courseware Management: The Official Guide — Save 50%

Take your e-learning, research, and collaboration experience to the next level

$32.99    $16.50
by Alan Mark Berg | July 2011 | Open Source

Sakai is an open source, web-based, Collaboration and Learning Environment (CLE) that is primarily focused on higher education, and has been adopted by hundreds of institutions. It supports the activities of students, teachers, and researchers. Sakai also provides an administrative interface. Sakai is flexible, and can be configured for a variety of specialized audiences.

This article by Alan Berg, author of Sakai CLE Courseware Management, explains concepts that you may need during first-time Sakai deployments. Within this article, you'll find an overview of the third-party frameworks on which Sakai is built and information about how to manage and monitor Java.

 

Sakai CLE Courseware Management: The Official Guide

Sakai CLE Courseware Management: The Official Guide

Take your e-learning, research, and collaboration experience to the next level

        Read more about this book      

(For more resources on Sakai, see here.)

The benefits of knowing that frameworks exist

Sakai is built on top of numerous third-party open source libraries and frameworks. Why write code for converting from XML text files to Java objects or connecting and managing databases, when others have specialized and thought out the technical problems and found appropriate and consistent solutions? This reuse of code saves effort and decreases the complexity of creating new functionality. Using third-party frameworks has other benefits as well; you can choose the best from a series of external libraries, increasing the quality of your own product. The external frameworks have their own communities who test them actively. Outsourcing generic requirements, such as the rudiments of generating indexes for searching, allows the Sakai community to concentrate on higher-level goals, such as building new tools.

For developers, also for course instructors and system administrators, it is useful background to know, roughly, what the underlying frameworks do:

  • For a developer, it makes sense to look at reuse first. Why re-invent the wheel? Why write with external framework X for manipulating XML files when other developers have already extensively tried and tested and are running framework Y? Knowing what others have done saves time. This knowledge is especially handy for the new-to-Sakai developers who could be tempted to write from scratch.
  • For the system administrator, each framework has its own strengths, weaknesses, and terminology. Understanding the terminology and technologies gives you a head start in debugging glitches and communicating with the developers. For a manager, knowing that Sakai has chosen solid and well-respected open source libraries should help influence buying decisions in favor of this platform.
  • For the course instructor, knowing which frameworks exist and what their potential is helps inform the debate about adding interesting new features. Knowing what Sakai uses and what is possible sharpens the instructors' focus and the ability to define realistic requirements.
  • For the software engineering student, Sakai represents a collection of best practices and frameworks that will make the students more saleable in the labor market.

 

Using the third-party frameworks

This section details frameworks that Sakai is heavily dependent on: Spring (http://www.springsource.org/), Hibernate ((http://www.hibernate.org/), and numerous Apache projects (http://www.apache.org/). Generally, Java application builders understand these frameworks. This makes it relatively easier to hire programmers with experience.

All projects are open source and the individual use does not clash with Sakai's open source license (http://www.opensource.org/licenses/ecl2.php).

The benefit of using Spring

Spring is a tightly architected set of frameworks designed to support the main goals of building modern business applications. Spring has a broad set of abilities, from connecting to databases, to transaction, managing business logic, validation, security, and remote access. It fully supports the most modern architectural design patterns.

The framework takes away a lot of drudgery for a programmer and enables pieces of code to be plugged in or to be removed by editing XML configuration files rather than refactoring the raw code base itself. You can see for yourself; this is the best framework for the user provider within Sakai. When you log in, you may want to validate the user credentials using a piece of code that connects to a directory service such as LDAP , or replace the code with another piece of code that gets credentials from an external database or even reads from a text file. Thanks to Sakai's services that rely on Spring! You can give (called injecting) the wanted code to a Service manager, which then calls the code when needed.

In Sakai terminology, within a running application a service manager manages services for a particular type of data. For example, a course service manager allows programmers to add, modify, or delete courses. A user service manager does the same for users.

Spring is responsible for deciding which pieces of code it injects into which service manager, and developers do not need to program the heavy lifting, only the configuration. The advantage is that later, as a part of adapting Sakai to a specific organization, system administrators can also reconfigure authentication or many other services to tailor to local preferences without recompilation.

Spring abstracts away underlying differences between different databases. This allows you to program once, each for MySQL , Oracle , and so on, without taking into account the databases' differences. Spring can sit on the top of Hibernate and other limited frameworks, such as JDBC (yet another standard for connecting to databases). This adaptability gives architects more freedom to change and refactor (the process of changing the structure of the code to improve it) without affecting other parts of the code. As Sakai grows in code size, Spring and good architectural design patterns diminish the chance breaking older code.

To sum up, the Spring framework makes programming more efficient. Sakai relies on the main framework. Many tasks that programmers would have previously hard coded are now delegated to XML configuration files.

Hibernate for database coupling

Hibernate is all about coupling databases to the code. Hibernate is a powerful, high performance object/relational persistence and query service. That is to say, a designer describes Java objects in a specific structure within XML files. After reading these files, Hibernate gains the ability to save or load instances of the object from the database. Hibernate supports complex data structures, such as Java collections and arrays of objects. Again, it is a choice of an external framework that does the programmer's dog work, mostly via XML configuration.

The many Apache frameworks

Sakai is biased rightfully towards projects associated with the Apache Software Foundation (ASF) (http://www.apache.org/). Sakai instances run within a Tomcat server and many institutes place an Apache web server in front of the Tomcat server to deal with dishing out static content (content that does not change, such as an ordinary web page), SSL/TLS, ease of configuration, and log parsing. Further, individual internal and external frameworks make use of the Apache commons frameworks, (http://commons.apache.org/) which have reusable libraries for all kinds of specific needs, such as validation, encoding, e-mailing, uploading files, and so on. Even if a developer does not use the common libraries directly, they are often called by other frameworks and have significant impact on the wellbeing; for example, security of a Sakai instance.

To ensure look and feel consistency, designers used common technologies, such as Apache Velocity, Apache Wicket , Apache MyFaces (an implementation of Java Server Faces), Reasonable Server Faces (RSF) , and plain old Java Server Pages (JSP)

Apache Velocity places much of the look and feel in text templates that non-programmers can then manipulate with text editors. The use of Velocity is mostly superseded by JSF. However, as Sakai moves forward, technologies such as RSF and Wicket (http://wicket.apache.org/) are playing a predominate role.

Sakai uses XML as the format of choice to support much of its functionality, from configuration files, to the backing up of sites and the storage of internal data representations, RSS feeds, and so on. There is a lot of runtime effort in converting to and from XML and translating XML into other formats. Here are the gory technical details: there are two main methods for parsing XML:

  • You can parse (another word for process) XML into a Document Object Model (DOM) in the memory that you can later transverse and manipulate programmatically.
  • XML can also be parsed via an event-driven mechanism where Java methods are called, for example, when an XML tag begins or ends, or there is a body to the tag.

Programmatically simple API for XML (SAX) libraries support the second approach in Java. Generally, it is easier to program with DOM than SAX, but as you need a model of the XML in memory, DOM, by its nature, is more memory intensive. Why would that matter? In large-scale deployments, the amount of memory tends to limit a Sakai instance's performance rather than Sakai being limited by the computational power of the servers. Therefore, as Sakai heavily uses XML, whenever possible, a developer should consider using SAX and avoid keeping the whole model of the XML document in memory.

Looking at dependencies

As Sakai adapts and expands its feature set, expect the range of external libraries to expand.

The table mentions libraries used, their links to the relevant home page, and a very brief description of their functionality.

Name Homepage Description
Apache-Axis http://ws.apache.org/axis/ SOAP web services
Apache-Axis2 http://ws.apache.org/axis2

 

SOAP, REST web services. A total rewrite of Apache-axis. However, not currently used within Entity Broker, a Sakai specific component.

 

Apache Commons http://commons.apache.org Lower-level utilities
Batik http://xmlgraphics.apache.org/batik/ Batik is a Java-based toolkit for applications or applets that want to use images in the Scalable Vector Graphics (SVG) format.
Commons-beanutils http://commons.apache.org/beanutils/ Methods for Java bean manipulation
Commons-codec http://commons.apache.org/codec Commons Codec provides implementations of common encoders and decoders, such as Base64, Hex, Phonetic, and URLs.
Commons-digester http://commons.apache.org/digester Common methods for initializing objects from XML configuration
Commons-httpclient http://hc.apache.org/httpcomponents-client Supports HTTP-based standards with the client side in mind
Commons-logging http://commons.apache.org/logging/ Logging support
Commons-validator http://commons.apache.org/validator Support for verifying the integrity of received data
Excalibur http://excalibur.apache.org Utilities
FOP http://xmlgraphics.apache.org/fop Print formatting ready for conversions to PDF and a number of other formats
Hibernate http://www.hibernate.org ORM database framework
Log4j http://logging.apache.org/log4j For logging
Jackrabbit http://jackrabbit. apache.org
http://jcp.org/en/jsr/detail?id=170
Content repository. A content repository is a hierarchical content store with support for structured and unstructured content, full text search, versioning, transactions, observation, and more.
James http://james.apache.org A mail server
Java Server Faces http://java.sun.com/javaee/javaserverfaces Simplifies building user interfaces for JavaServer applications
Lucene http://lucene.apache.org Indexing
MyFaces http://myfaces.apache.org JSF implementation with implementation-specific widgets
Pluto http://portals.apache.org/pluto The Reference Implementation of the Java Portlet Specfication
Quartz http://www.opensymphony.com/quartz Scheduling
Reasonable Server Faces (RSF) http://www2.caret.cam.ac.uk/rsfwiki RSF is built on the Spring framework, and simplifies the building of views via XHTML.
ROME https://rome.dev.java.net ROME is a set of open source Java tools for parsing, generating, and publishing RSS and Atom feeds.
SAX http://www.saxproject.org Event-based XML parser
STRUTS http://struts.apache.org/ Heavy-weight MVC framework, not used in the core of Sakai, but rather some components used as part of the occasional tool
Spring http://www.springsource.org Used extensively within the code base of Sakai. It is a broad framework that is designed to make building business applications simpler.
Tomcat http://tomcat.apache.org Servlet container
Velocity http://velocity.apache.org Templating
Wicket http://wicket.apache.org Web app development framework
Xalan http://xml.apache.org/xalan-j An XSLT (Extensible Stylesheet Language Transformation) processor for transforming XML documents into HTML, text, or other XML document types
xerces http://xerces.apache.org/xerces-j XML parser

For the reader who has downloaded and built Sakai from source code, you can automatically generate a list of current external dependencies via Maven. First, you will need to build the binary version and then print out the dependency report. To achieve this from within the top-level directory of the source code, you can run the following commands:

mvn -Ppack-demo install
mvn dependency:list

The table is based on an abbreviated version of the dependency list, generated from the source code from March 2009.

For those of you wishing to dive into the depths of Sakai, you can search the home pages mentioned in the table.

In summary, Spring is the most important underlying third-party framework and Sakai spends a lot of its time manipulating XML.

 

Sakai CLE Courseware Management: The Official Guide Take your e-learning, research, and collaboration experience to the next level
Published: July 2011
eBook Price: $32.99
Book Price: $54.99
See more
Select your format and quantity:

 

        Read more about this book      

(For more resources on Sakai, see here.)

 

An expanded tour of Java

Sakai is a Java-based application. Not only are its parts written in Java, but the Tomcat server on which it is running is Java-based as well. This section explores how to monitor and tune Java/Sakai.

Introduction

Java runs on many operating systems and types of hardware. To achieve this high degree of consistent compatibility, tools compile the Java source into runnable code (known as pseudo byte code) and run the code in a virtual machine that sits between the running code and the operating system. The Java Virtual Machine (JVM) hides the underlying complexity by abstracting details away in the language itself, so that programmers call the same methods, such as for opening files, no matter on which hardware or operating system the code is running.

The JVM also manages the Java application's memory via a Garbage Collector (GC), which cleans up the objects that are no longer used. The JVM manages memory by splitting it up into parts. When objects are first created, they are placed in a young object space. Later, as objects get older, they are copied to other spaces, and for old objects, to a memory location known as tenured space. During the process of copying objects, the GC removes the objects that a running program does not reference. When tenured space fills up, then the JVM stops running the code and the GC does a thorough clean up. Under high student usage, this stops the world process; a process that stops an application from running while running itself, has significant potential to hurt your favorite mission-critical application.

You can configure the JVM via the JAVA_OPTS environment variable. You can tell it to reserve a certain amount of memory and which method to use to clean memory up and turn on/off, or generally tweak numerous features. An excellent paper on GC-related options is located here: http://java.sun.com/j2se/reference/whitepapers/memorymanagement_whitepaper.pdf.

The JVM has more than one method for garbage collection. On starting, the JVM checks the system on which it is running and partially configures the garbage collector to match the system's capabilities. To tell the JVM that it is running as a server application, you should set the -server option in JAVA_OPTS. For Sakai, these options are set in start-sakai.sh for UNIX/Linux or start-sakai.bat for Windows machines.

The minimum and maximum memory that the JVM can use is set by -Xms (minimum) and -Xmx (maximum). To save computational effort during garbage collection, you should consider setting the two values equal. Further, the JVM can run in 32-bit or 64-bit mode on 64-bit hardware. Theoretically, on a 32-bit JVM, you should be able to address 4GB of memory. However, due to the way the underlying OS manages memory, you may be limited to around 2GB or 3GB in practice.

64-bit mode allows for more memory reservation, but using 64-bit results in slightly larger object sizes and potentially longer "stop-the-world" garbage collections as the JVM has more space to tidy up. The JAVA_OPTS setting for this is -d64.

The JVM reserves a space in memory for loading the definitions of objects and other data. Java specialists know this space as permanent space, or permspace for short. Currently, most production servers set this at around 512MB; to do so, they require the option -XX:PermSize=512m.

By default, JVM loads in a number of Java libraries, including the ones for graphical display. However, the Sakai instance does not need these libraries, as it runs over the network and not through a local GUI. To tell the JVM of the situation requires setting the value java.awt.headless to true.

Finally, the JVM can run the garbage collection in parallel using more than one CPU or serially. Modern hardware has multiple core CPUs, so triggering parallel garbage collection improves the behavior. The relevant JAVA_OPT for this is –XX:+UseParallelGC.

Following is a full JAVA_OPTS example. The options force the JVM to run on the server in 64-bit mode with parallel garbage collection, reserving 8GB of memory, of which 512 MB is reserved for permspace. The JAVA_OPTS are also telling the JVM it is headless, that is the server runs without monitor or keyboard attached, and you can manage it over the network. The last two options are used for compatibility between Java 1.6 and Java 1.5

-server -d64 -Xms8g -Xmx8g -XX:PermSize=512m -XX:MaxPermSize=512m -Djava.
awt.headless=true -XX:+UseParallelGC -Dorg.apache.jasper.compiler.Parser.
STRICT_QUOTE_ESCAPING=false -Dsun.lang.ClassLoader.allowArraySyntax=true

Numerous organizations have already deployed Sakai with great success. The Sakai Foundation collects the deployment data, see: http://jira.sakaiproject.org/browse/PROD. Most of the deployments in the list include their servers' JVM options as a reference.

Three recommendations for anyone wishing to optimize are:

  • Read the examples given in the link and try to understand what all the options do.
  • Use the best-suited values for your hardware as the start point for testing.
  • Simplify: The JVM is very good at its memory cleanup tasks for most applications, most of the time. Do not use options for influencing garbage collection unless there are good measurable reasons or instinctive suspicions to do so.

Setting your memory size settings to optimum and debugging potential performance issues requires monitoring software.

You can monitor Sakai on multiple levels. If you are looking from the bottom up, the monitoring tools can question numerous network devices, such as routers or load balancers , through the Simple Network Management Protocol SNMP standard and deliver different real-time metrics depending on the devices' capabilities. The SNMP information from load balancers is particularly interesting, as load balancers collect all kinds of statistics, so that they can judge how best to distribute load between individual servers. The Windows Operating System also comes with a free SNMP service. Popular open source monitoring tools, such as the Multi Router Traffic Grapher, MRTG (http://oss.oetiker.ch/mrtg), and Nagios (http://www.nagios.org/) are fluent speakers of SNMP.

Placing a web server in front of the Tomcat server allows the web server to generate log files in a standard format with the information pertaining to the requests and responses from Sakai. An abundance of log file parsers exists: AWStats (http://awstats.sourceforge.net/) and WebDruid (http://www.projet-webdruid.org/) are the examples. The generated reports can tell you about busiest times, error locations, and help you predict usage trends into the future. However, neither SNMP communication with network devices nor log analysis will let you see what is going on within Java JVM and any potential disruptions caused by memory utilization or garbage collection. One possible solution is to tell the JVM to send debug information to a log file. To enable GC logging, set the JAVA_OPTS to:

-Xloggc:/var/logs/my_application/gc.log -verbose:gc

Please change the location /var/logs/my_application/gc.log to the one that best suits your environment. Remember to rotate this log, or it will reach its maximum size, stop logging, or use up a lot of disk space.

The outputted log file is not particularly readable, but there are a few good log parsers in the wild, such as GCViewer (http://www.tagtraum.com/gcviewer.html), that return summarized results graphically.

Profiling using JMX

Java Management Extensions (JMX) (http://www.oracle.com/technetwork/java/javase/tech/index-jsp-142926.html) is a standard part of Java 1.5 onwards (and you can backwardly apply it to Java 1.4 by adding extra libraries; Sakai currently runs on Java version 1.6). The various aspects of JMX have been mentioned in JSR Java standards (3, 70, 71, 77, 146, 160, and 174). The important point to note is that JMX standard allows for a uniform method of monitoring and controlling distributed systems. Tomcat and JBoss (http://jboss.org) are among the many applications that are JMX-enabled with internal features exposed to monitoring.

At a practical level, JMX allows you to observe in real time how the Java Virtual Machine manages memory, and whether you are running short of memory in any particular place, such as permspace or the heap. You can also find out if pieces of code are deadlocked, waiting on other pieces of code and never moving forward to the completion of their work. This happens very rarely, if at all, in Sakai and is an indicator of difficult-to-test defects in the code. This problem is very difficult to debug, as errors will happen. Therefore, the ability to find a deadlock live is an advantageous feature.

For a local test server, to view live, you can enable an open JMX-related port on 1099 locally via the following extra JAVA_OPTS options:

-Dcom.sun.management.jmxremote.port=1099
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false

See: http://download.oracle.com/javase/1.5.0/docs/guide/management/faq.html for common problems and solutions when configuring remote management.

You can monitor the JVM via JConsole, a standard tool included free with the Sun Java JDK.

You can activate JConsole typing {$JAVA_HOME}/bin/Jconsole where {$JAVA_HOME} is the location of the JDK.

Although Sakai runs on Java 1.6, you can connect to it from a JConsole running within a Java 1.7 JVM. JConsole improves with version.

If you are running JConsole from a 1.6 JDK locally, then you can log in either through selecting the process ID or via remote localhost port 1099. After doing so, you are presented with a summary page that is updated roughly every ten seconds. The summary includes the main memory for objects, named the heap , the number of parallel processes (threads ), and CPU usage.

Sakai CLE Courseware Management

Clicking on the Memory tab allows you to zoom into the various parts of memory. The GC occasionally cleans up as new objects are created and older ones stop being used. You can check for deadlocking from the Threads tab. The VM Summary displays a written report of the main vital statistics of the Virtual Machine.

The MBeans tab requires a little bit more explanation. M is an abbreviation for Managed. An MBean is a piece of Java code that represents a resource, such as a cache, memory, or search engine. For example, the writers of a cache may expose how much memory the cache reserves inside an MBean.

Clicking on the MBean tab shows all the available MBeans, mostly associated with the Tomcat server or the underlying JVM. Currently, Search and Hibernate have some Mbeans in the list. Expect more features to be exposed later.

JConsole can also load in custom code that is run as an extra tab within JConsole's GUI. An example JConsole plugin is provided with the Java SE 6 platform. The JTop application shows the CPU usage of all threads running in the application. This is useful for identifying threads that have high CPU consumption. JTop is bundled with the Java SE 6 platform, as a demo application. You can run JConsole with the JTop plug-in using the following command:

% JDK_HOME/bin/jconsole -pluginpath JDK_HOME/demo/management/JTop/
JTop.jar

Sakai CLE Courseware Management

An alternative open source product that has enhanced functionality when compared to JConsole is MC4J (http://sourceforge.net/projects/mc4j).

 

Sakai CLE Courseware Management: The Official Guide Take your e-learning, research, and collaboration experience to the next level
Published: July 2011
eBook Price: $32.99
Book Price: $54.99
See more
Select your format and quantity:

 

        Read more about this book      

(For more resources on Sakai, see here.)

The Apache web server

The Apache web server is the most popular web server used on the Internet. This indicates that a large proportion of all Internet-related system administrators have encountered and configured Apache before. According to netcraft (http://news.netcraft.com/archives/web_server_survey.html), Apache dominates the market place with over 60% of overall market share. The server is stable, secure, highly configurable, and proven to scale to even the most demanding and acidic environment imaginable. Urban folklore mentions reliable services forgotten and running on very antique computers only to be found wanting when major earthquakes hit.

Sakai is highly scalable, especially behind load balancers with or without Apache server(s) in front of the Tomcat server. Therefore, the need to deploy the web server as part of your infrastructure is a matter of taste. The advantages of deploying Apache normally outweigh the extra complexities of the configuration and any extra learning demands placed on system administrators.

Apache uses less system resources for delivering static files than Tomcat. One use of Apache is associated with the default gateway within Sakai. A fresh Sakai instance includes a number of premade sites. With the Sites tool, you can see that the !admin site, which is the administration workspace; !user, the template for the workspace for a new user; !error, the site-unavailable page; and the !gateway site for the front page of Sakai just before logging on. The sites are composed of content that resides mostly in static HTML files. As the administrator, you can change the location of the content by visiting the gateway site and selecting the relevant tool. By default, you will find the static content underneath the webapps/library/content/gateway directory. To change the content, you will need to change the about.html, features.html, training.html, and acknowledgments.html files. The global configurations file, sakai.properties, points to the gateway's welcome page via the value set in server.info.url. Therefore, with a combination of changing the property file and the online administrator, you can move most of the static pages outside of the Sakai application and configure Apache to go directly to those files.

You can configure SSL connections (the secure connections you get in your web browser when, for example, you need to type in a password) so that the encryption takes place within the Tomcat server, the Apache server, or through hardware, such as a Load Balancer. Whenever possible, use hardware encryption on the Load Balancer. Hardware encryption is the process of using hardware, such as a Load Balancer, to encrypt plain text, such as web pages. Using encryption on the Load Balancer removes demand on the CPU of the server itself. A big advantage of this approach is that in most computing trends, prices are decreasing rapidly and performance is increasing. For a detailed account of separating static and dynamic content in Apache, you can read http://www.linuxjournal.com/article/9041.

Apache is written in the C language and has a plug-in structure in which custom code units (known as modules) are loaded at the start-up. This allows dropping in extra functionality, such as WebDAV support and adding different types of authentication. You can find a full list of modules for Apache 2 at http://httpd.apache.org/docs/2.0/mod.

Two examples of handy modules are mod_jk and mod_deflate. mod_jk helps Apache talk with the Tomcat server. mod_deflate returns resources in a compressed format saving network traffic. Compression increases the server's CPU utilization, but decreases the time to return the resource to the web browser.

 

Migration

Section author, Zach Thomas, is a software engineer who has contributed to Sakai since its first public release in June of 2004. He is a Sakai Fellow, speaks at conferences on topics relating to Sakai adoption, and runs a Sakai consulting business named Aeroplane Software . In a previous life, he co-founded a modestly famous folk punk rock band named Okkervil River. He lives in San Marcos, Texas, with his wife and two little boys.

Migrating course content

If you wish to migrate site content from an LMS, such as Blackboard, to Sakai or vice versa, then you should be aware of the current strengths and limitations of Sakai. In this section, Zach Thomas, who built most of the migration software, discusses the process.

A bit of history

Sakai has a checkered past when it comes to content migration. In the very early days, the core development team established a mechanism for exporting the content of a worksite's tools. This feature is available in the Administration Workspace and is named Site Archive. Each tool developer had to provide code to ensure that the tool's data would be written out to an XML file when requested by Site Archive.

This approach has a few drawbacks:

  1. The archive is saved on the server, and is only accessible to system administrators and not site maintainers.
  2. The archive format is Sakai-specific, so it is only usable by Sakai.
  3. Not all tool developers opted to support the Sakai export mechanism.

As of this writing, these tools participate in the Sakai export:

  • Announcements
  • Assignments
  • Calendar
  • Chat
  • Forums
  • Mail Archive
  • News
  • Polls
  • Resources
  • Syllabus
  • Wiki

Notably absent are Gradebook and Tests & Quizzes, which have no export and use their own built-in mechanisms for import.

Sakai CLE Courseware Management

There was one option for site maintainers to move content into their sites: among the features in the Site Info tool is Import from File. Prior to August of 2005, the only way to get a file suitable for importing was to feed a Sakai archive into an Indiana University tool that was not publicly available.

A small team at Texas State extended the Import from File capability to work with export files from Blackboard 5.5. We can see from the Subversion repository log exactly when it became public:

-----------------------------------------------------------------
r13 | zach.thomas@txstate.edu | 2005-08-09 12:31:49 -0500 (Tue, 09 Aug
2005) | 1 line
initial add of the imsimport code. hi from Zach.
-----------------------------------------------------------------

Because the Blackboard export format was based on the IMS content package standard, it was possible to adapt the same import facility to work with newer versions of Blackboard, as well as WebCT and the IMS Common Cartridge standard.

Enabling the LMS script

As of Sakai version 2.3 and later, the ability to import legacy Sakai archives and limited support for IMS Common Cartridge is built-in. In order to support the import of content from Blackboard or WebCT export files, a sys admin needs to compile some additional code and modify a couple of configuration files.

The code for the LMS importers is in Sakai's Contrib repository at https://source.sakaiproject.o0072g/contrib/migration/trunk.

  1. From a terminal window, change to archive/import-parsers within the Sakai source directory.
  2. Get the parser code with:
     svn co https://source.sakaiproject.org/contrib/migration/trunk/
    import-parsers/blackboard_6
  3. If necessary, modify any pom.xml files in the parser so that the version given for the parent tag agrees with what is in archive/pom.xml.
  4. Modify archive/pom.xml, and add the new parser directory to the <modules> tag where you see <module>import-parsers/common-cartridge</module>.
  5. Modify archive/import-pack/src/webapp/WEB-INF/components.xml:
  6. Add a bean definition for the new parser.
  7. Uncomment the bean definitions for the Announcements handler and Samigo handler if you wish to import their content.
  8. Add references to the new parser and new handlers (if you uncommented those) to the properties for the ImportService bean.
  9. Build and deploy the archive module as usual, and the new import capability will be available. Note that Tomcat must be restarted for the changes to take effect.

A screencast demonstration of this procedure is available at http://aeroplanesoftware.com/import-setup.mov.

A note about IMS Common Cartridge

The Sakai CLE does not yet support importing or exporting of IMS Common Cartridges. However, now that version 1.0 of the CC specification is final, and that support is growing among learning management systems, expect a team to explore this issue to emerge from the Sakai community.

Using "Import from File"

Once the new code is installed, any instructor or other site maintainer will be able to use their LMS export files with the Import from File feature under Site Info. It works like a Windows wizard, with several options available while importing new content.

First, you browse to the export file you want to import. The file upload will be subject to Sakai's configured file upload limit.

The tool parses the archive and shows you a summary of its content. You may select the categories you wish to import.

You will then see a summary of your selections and the destinations within Sakai where the content will go.

The import can take several minutes if the archive is large (more than a handful of megabytes). When it's done, you will see a confirmation message.

Summary

Planet Sakai is an excellent blog aggregator to keep in contact with the Sakai buzz. Sakai is built up on top of third-party frameworks, such as Spring and Hibernate. For the inquisitive, it is worth reading up on which frameworks are used and what capabilities exist. For developers, this may help avoid reinventing the wheel. For administrators, it may provide the background knowledge to support pinpointing issues.

Sakai was written in Java. You can tune the Java Virtual Machine and enable Java Management Extensions via the JAVA_OPTS environment variable. The Sakai Foundation has listed the settings for production servers in JIRA. These settings act as excellent initial values for any new deployment. The Apache web server is useful for delivering static content, rewriting URLs, and for a standard source of logs for log parsing. It has many modules that can extend its functionality, such as mod_deflate, which compresses network traffic. Course migration is possible, but with some limitations.


Further resources on this subject:


About the Author :


Alan Mark Berg

Alan Mark Berg Bsc. MSc. PGCE, has for the last twelve years been the lead developer at the Central Computer Services at the University of Amsterdam. In his famously scarce spare time, he writes. Alan has a degree, two masters degrees, and a teaching qualification. He has also co-authored two books about Sakai (http://sakaiproject.org), a highly successful open source learning management platform used by many millions of students around the world. Alan has also won a Sakai Fellowship.

In previous incarnations, Alan was a technical writer, an Internet/Linux course writer, a product line development officer, and a teacher. He likes to get his hands dirty with the building and gluing of systems. He remains agile by ruining various development and acceptance environments.

Books From Packt


NetBeans IDE 7 Cookbook
NetBeans IDE 7 Cookbook

WordPress 3 Ultimate Security
WordPress 3 Ultimate Security

CMS Made Simple Development Cookbook
CMS Made Simple Development Cookbook

Pentaho Data Integration 4 Cookbook
Pentaho Data Integration 4 Cookbook

Drupal 7 Themes
Drupal 7 Themes

Apache Wicket Cookbook
Apache Wicket Cookbook

Joomla! 1.5 Multimedia
Joomla! 1.5 Multimedia

jQuery 1.4 Reference Guide
jQuery 1.4 Reference Guide


Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software