logo Installation

Here's how to install and run the ADL middleware server. These instructions have been written with Unix in mind, but it should be easy to adapt them to other platforms.

Contents

Preliminaries

The middleware is implemented as a set of servlets packaged into a web application. It's written in Java and Python, but it comes bundled with Jython, a Java interpreter for the Python language, so effectively the only language dependency is Java. Thus the first things to install are:

In addition, if you will be connecting the middleware to a relational database you will need a JDBC driver for that database. Drivers can be obtained from database vendors; here are some quick links to drivers:

Download & install

Download and unpack the middleware web application. The middleware's web application directory tree (hereafter referred to as M) is self-contained and the only thing you need to do is point your servlet container at it. For Tomcat this means either placing the directory in Tomcat's webapps directory or adding a <Context> element to Tomcat's server.xml configuration file.

Next, make any JDBC drivers visible to the middleware, either by adding the relevant JAR files to the CLASSPATH environment variable, or by copying or linking the relevant JAR files into the middleware's M/WEB-INF/lib directory.

Run

To run the middleware as a web application, simply start the servlet container. For Tomcat this means running a command like

$CATALINA_HOME/bin/startup.sh

Note that the middleware services are loaded by the servlet container on demand, and thus configuration problems may not be immediately apparent.

RMI server

The middleware provides an RMI server that can be run either from within the servlet container or standalone. By default the middleware is configured for the first option: it starts the RMI server automatically when the servlet container starts, and the RMI server can be controlled thereafter using the rmi_control servlet.

To run the RMI server standalone, set the CLASSPATH environment variable to encompass all of the middleware's classes (the JAR files in M/WEB-INF/lib, the M/WEB-INF/classes directory, JDBC drivers, etc.), and run

java edu.ucsb.adl.middleware.rmi.RmiServer
  -rebind
  
M/WEB-INF/config/rmi-server.conf
  
M/WEB-INF/config/middleware.conf

In either case, the RMI server requires that an RMI registry be running on the same machine. By default, the middleware is configured to create and run the registry. Another option is to run the registry as a separate process. The middleware's interface classes must be visible to the registry (the middleware does not use RMI's dynamic class loading facility), so to run the registry separately use a command like

env CLASSPATH=M/WEB-INF/lib/middleware-v.jar rmiregistry &

Configure

The middleware will generally require configuration to make it useful for your purposes and situation. By default the middleware is "open," that is, it is configured with no access control. In restricting access to your server you may want to take into account the following potential privacy and security concerns:

status service
Allows clients to cancel other clients' queries and delete other clients' result sets.
reference & unreference services
Allow clients to create and destroy permanent references to remote collections.
unload service
Allows clients to unload collection drivers.
collection_availability servlet
Allows clients to enable and disable collections.
cache_control servlet
Allows clients to empty metadata caches.
rmi_control servlet
Allows clients to start and stop the RMI server.
bucket99_status servlet
Allows clients to view other clients' queries.

Access to middleware services can be restricted through the middleware and/or through the servlet container. Access to the collection_availability, cache_control, rmi_control, and bucket99_status servlets can be restricted through the servlet container only.

Another security consideration is result set sharing, which is controlled by the query.result_set_sharing property in the main middleware configuration file. If sharing is enabled (by default it is not), then a client sharing another client's result set may gain access to collection items it otherwise would have no rights to.

last modified 2009-02-06 22:43