Sensei


Overview

Design

Sensei GMS

Sensei Domains

Sensei GMNS

Sensei UMA

Code

IDL specification

Download & Build

Configuration

Examples

Documentation

Links


Last Updated:
30th May 2004



My personal homepage java_lmp@yahoo.co.uk
Download & Build


License

Sensei is available for free, including the source code. No responsibilities can be claimed to the authors, who, on the other hand, could provide some limited support. The sources can be freely modified and distributed, and credits to us, the original authors, are of course welcome.


Download

You can download the binary or source versions, for Java 1.3 or Java 1.4 (the differences are focused on the use of assertions). In both cases, examples are included as well.

downloadJDK 1.3JDK 1.4
Source version senseiSourceDist-1.3.tar.gz (229 KB) senseiSourceDist-1.4.tar.gz (230 KB)
Binary version senseiBinDist-1.3.tar.gz (1.669 KB) senseiBinDist-1.4.tar.gz (1.733 KB)

From the initial version, published on July 2002, the reference ORB was Orbacus. Since then, and due to the changes on the licenses and availability of the original product, this reference has shifted to the ORB available with the SUN distribution of the JDK. The code did not work perfectly with this ORB on the initial sensei version, as null values were returned on several CORBA calls.

These bugs have been solved, and a new version is available for download. This is the last version of Sensei, as I do not expect to extend its functionality in the future. However, a new project, called Alley has already started using the main source code of Sensei. The idea with Alley is to extend Sensei, simplifying extremely its usage. In particular, the final user will not have to deal anymore with CORBA / RMI, will not have to declare by herself messages, etc. Although most of the new code is already implemented, the part than in Sensei is denominated UMA is still very uncompleted. Whether it makes sense to add more effort on this project is to be evaluated. If you are interested in this task, please contact me at java_lmp@yahoo.co.uk

On the meanwhile, here is the new downloadable version. The rest of this website is completely related to the original version (in special the pages describing the code), which is for this reason still available. This new version has not been tested with Orbacus, but it exhibits no problems with RMI or CORBA with the ORB available with SUN's JDK:

downloadJDK 1.4
Source version senseiSourceDist.zip (426 KB)
Binary version senseiBinDist.zip (2.015 KB)
Source version on Eclipse workspace senseiSourceOnEclipse.tar.gz (361 KB)


Requirements
  • Java: versions 1.3 and 1.4 are supported. In the latest case, debug assertions are used, while on the first, a (included) class gives the needed assertion support.
  • Ant: this Java library gives MAKE functionality to the Java world. Sensei is supplied with several ant files, which have been tested against Ant 1.4.
  • Idldepend: an ant task giving support for CORBA projects. If you intend to use only the RMI version of sensei, you can avoid this requirement, but then it is needed first to remove the links to this task on the ant build files.
  • A CORBA 2.4 compliant ORB with support for Java mapping. JDK1.4 is itself compliant, but JDK1.3 does not include a valid ORB. Following ORBs have been tested:
    • Orbacus 4.1 (ftp://ftp.orbacus.com/pub/OB/4.0/ & www.orbacus.com): gives no problems.
    • JDK1.4. So far, it gives a problem on the GMNS server when a group has no members, sending an exception back. The problem is associated to the generated stubs, handling incorrectly a null return value. Using the binary distribution, compiled with Orbacus stubs, the JDK1.4 is enough to do any testing.
    • OpenORB 1.2: not compliant.
    • JacORB 1.4 beta 4 . It has problems compiling the IDL specification, as it does not define a specific scope for the valuetypes.

As Sensei is built on Java, it will run on any machine witch a Java Virtual Machine (as far as its fulfils the previous requirements). It has been tested on the next configurations:

  • Solaris 2.8 / JDK 1.3.1 / Orbacus 4.1
  • Linux (Suse 7.3) / JDK 1.4 (JDK orb)
  • Windows 2000 / JDK 1.4, using JDK orb
  • Windows 2000 / JDK 1.4, using Orbacus orb
  • Windows 2000 / JDK 1.3.1 / Orbacus 4.1


Building Sensei

This section assumes that you have already downloaded the source package and you fulfil the requirements given in the previous section.

When the source package is decompressed, the following directory structure is created:

.
|-------source
|-------scripts
|-------scripts.win
  • parent directory: contains the ant build files. It contains as well some scripts to set variables for ant, that must be, of course, changed for your specific configuration.
  • source : contains all the source, including the examples.
  • scripts : scripts to run the examples, the GMNS server, etc, and the configuration file by default
  • scripts.win : same scripts, for Windows

The two ant files are:

  • build.xml: makefile for the sensei libraries
  • buildExamples.xml: makefile for the examples

To build everything, please include any needed library on the classpath. This includes the libraries for ant, and the ant's idldepend task, and, if using a different ORB than the supplied with JDK1.4, the ORB's library. For example, using JDK1.4 on Linux, I need the following classpath:

CLASSPATH=/home/me/sensei/idldepend/idldepend.jar:
	/opt/jakarta-ant-1.4.1/lib/crimson.jar:/opt/jakarta-ant-1.4.1/lib/jaxp.jar

And using Orbacus4.1 on Windows 2000, I specify the next classpath:

set classpath=%classpath%;d:\java\programs\idldepend\idldepend.jar;
	e:\java\jakarta-ant-1.4.1\lib\crimson.jar;e:\java\jakarta-ant-1.4.1\lib\jaxp.jar;

After this, to build all the libraries, examples and the distribution file, is enough to write:

ant

The following directories are added:

  • lib: includes the .jar files containing all the code
  • bytecode: (it is removed using ant clean): the class files and generated java files.

Please note that the makefiles support different targets; for example:

  • ant rmi: builds the rmi libraries, but not the examples.
  • ant corba: idem for the corba libraries.
  • ant -buildfile buildExamples.xml: builds just the examples.

For a complete list of possibilities, please look at the beginning of the makefiles.


Debug and optimized versions

Sensei contains a lot of code used exclusively for debugging purposes and tracing purposes, which is completely unneeded on a release version.

For this reason, the package sensei.preprocessors contains programs (two on the 1.3 version, one on the 1.4 version) to remove the debugging and tracing information. This task is automatically performed using the makefiles.

As a result, each of the core libraries contains two versions; for example, the RMI implementation is packaged on the files senseiRMI.jar and senseiRMIdbg.jar

To use one of the other version, just set the right one on the classpath; the scripts are ready to use one or the other version (for example, it is possible to use useRMI or useRMIdbg).

The difference on speed is dramatic, the improvement can be up to 1000 times (measured on the number of messages that a group can intercommunicate).