Setting up a Java Data Server

Introduction

The class files for the Java Data Server are included in the jas.jar file in the standard distribution. The main class for the Java Data Server is jas.jds.JDSMain. The server takes a single argument, which is the name of a configuration file.

The simplest configuration file consists of the following:

Protocol jas.jds.RMIProtocol
DataServer jasext.test.TestServer

This creates a data server which listens for connections using the Java RMI (Remote Method Invocation) protocol (the default protocol used by the JAS client) and which serves data from the built-in test data source. More information on writing configuration files is given below.

If you are running on Windows then the Java Runtime Environment (JRE) was installed as part of the installation of Java Analysis Studio. In this case you need to make sure that the appropriate bin directory is included in your PATH, and that the jas.jar file is pointed to by your CLASSPATH environment variable, then issue the command:

    jre jas.jds.JDSMain config.txt

where config.txt is the configuration file containing the lines above. (Under linux you can make a modified copy of the jas exec supplied for running the client to run the server. Note: maybe this should be included in the distribution)

On other Unix platforms make sure that the java JDK is installed and included in your PATH. then set the CLASSPATH environment variable to point to the jas.jar file. Finally issue the command:

    java jas.jds.JDSMain config.txt

where config.txt is the configuration file containing the lines above.

On all platforms, if all is well you should see output something like:

[charger] ~ > java jas.jds.JDSMain config.txt 
Server bound in RMI registry as JDSServe 
Monitor bound in RMI registry as JDSMonitor 
ServerRegistry - registering dataserver: Test server 
Server ready for incoming connections... 

You should now be able to connect to this server using the Java Analysis Studio client.

Configuration File Syntax

Currently there are only two legal commands in a configuration file:

Protocol <module> [<args>...]
Dataserver <module> [<args>...]

In addition any lines beginning with > are treated as comments. The Protocol command is used for specifying protocol modules, and the Dataserver is used for loading data interface modules. In each case the first argument is the full java name of the module to be loaded, and the remaining arguments, if any, are passed to the loaded module.

Built in Protocols

Protocol modules are used to specify what type of connections the server will accept. Currently the only protocol supported is Java Remote Method Invocation (RMI) implemented by the module jas.jds.RMIProtocol. This is invoked as follows:

Protocol  jas.jds.RMIProtocol

Built in Data Interface Modules (DIMS)

Data Interface Modules allow a particular type of data to be served by the server. Any number of data servers may be loaded from one configuration file. The same module may be loaded more than once, to serve different collections of data.. The following data interface modules are currently supplied with Java Analysis Studio:

Test Server - jasext.test.TestServer

This module serves "fake" data generated using a random number generator used for testing purposes. It is loaded by the command:

DataServer jasext.test.TestServer

Paw Server - jasext.pawserver.PawServer

This server is used to serve paw ntuple files. It is loaded using the command:

DataServer jasext.paw.PawServer [title] [directory] [extension]

where the arguments are:

title - A description of the data to be server. This is what the user will see when connecting to the Java Data Server. The title may be delimited by double-quotes (") if it contains spaces. (defaults to "Paw files")
directory - The directory containing the files to be served (defaults to the current directory)
extension - The extension of the files to be served within the directory. (defaults to hbook)

Hippo Server - jasext.hippo.HippoServer

This server is used to serve hippoplotamus ntuple files. It is loaded using the command:

DataServer jasext.hippo.HippoServer [title] [directory] [extension]

where the arguments are:

title - A description of the data to be server. This is what the user will see when connecting to the Java Data Server. The title may be delimited by double-quotes (") if it contains spaces. (defaults to "Hippo files")
directory - The directory containing the files to be served (defaults to the current directory)
extension - The extension of the files to be served within the directory. (defaults to hippo)

StdHEP Server - jasext.hepevt.HepEventServer

This server is used to serve StdHEP format mc generator files. It is loaded using the command:

DataServer jasext.hepevt.HepEventServer [title] [directory] [extension]

where the arguments are:

title - A description of the data to be server. This is what the user will see when connecting to the Java Data Server. The title may be delimited by double-quotes (") if it contains spaces. (defaults to "Stdhep files")
directory - The directory containing the files to be served (defaults to the current directory)
extension - The extension of the files to be served within the directory. (defaults to io)

Flat File Server - jasext.flatfile.FlatFileServer

This server is used to serve flat file ntuples. Documentation to be provided.

SQL Database server -jasext.jdbc.JDBCServer

This server is used to serve data from SQL databases using the Java Data Base Connector (JDBC). Documentation to be provided.

Providing your own Data Server

You may also load your own custom data interface modules. Documentation to be supplied.

Installing Java Data Server as a Service under Windows NT

Documentation to be supplied.