Jamboo

  1. Motivation
  2. The ideas proposed by Bamboo [1], [2] are novel and promising, however much of what is being implemented is readily available in the Java platform [3]. Therefore the aim of Jamboo is to produce a mirror solution as close as possible to Bamboo but implemented as much as possible in Java, aiming at 100%. This approach will take advantage of the capabilities of the Java Virtual Machine [4] supported by a large community of developers. The core JVM is installed on any java enabled host, along with the core classes library. However it is possible to exploit additional functionality available by packages that are extensions to the core, such as Java3D [5]. There is a proliferate literature based on the Java platform, therefore this document will focus on Jamboo.

    Another major advantage for adopting Java is the deployment issue. The fact that the JVM currently exists on most platforms allows Jamboo to run immediately without changes to the environment or any effort from the user. Although Jamboo is a dynamic plug-in architecture of general purpose, out aims are focused on the vrtp [6] component infrastructure.

    The commitment to Java excludes the direct support for other implementation solutions such as DLLs amongst others. However their inclusion involves building a wrapper to the proposed interface and resorting to the JNI to have access to the native solutions. This approach allows the wide community of computer graphics that extensively use other languages to take advantage of Jamboo.

  3. Jamboo Kernel

The Jamboo kernel is basically an individual class that implements the singleton pattern so it is accessible from anywhere in the application. It is possible to query and request a reference to a module by providing a unique string identifier.

The Jamboo kernel provides the backbone for vrtp with its run-time dynamic plug-in architecture where modules are loaded/unloaded on demand. There are three phases in the Jamboo cycle:

The Jamboo kernel can be used both within the context of either an applet or an application:

java Jamboo [filename]

A generic application and applet implementation are provided to demonstrate how to use and setup Jamboo.

    1. Configuration File

The Jamboo kernel receives a configuration file that may correspond to a vrtp session. The Configuration class is responsible for parsing the configuration file and setup the Jamboo kernel appropriately.

The Configuration class has associated to it a configuration file with several sections that are separated by section headers, corresponding to a single line. Each line has the following format:

@ SectionName

The ‘@’, which may be another specified character, determines the start of a section, followed by a string that not only identifies the section, but also indicates what SectionConfigureHandler to use. These handles are registered at the Configuration class, doing the actual context specific configuration when called upon. The invocation of a SectionConfigureHandler is possible by supplying their identifier (SectionName) contained in the section header.

How each section is formatted depends upon the implementation of the SectionConfigureHandle that implements the parsing and execution of the settings.

The Configuration class is subclassed to reflect the particularities of applications by constructing the set of SectionConfigureHandlers to use. In the case of Jamboo, the reference implementation JambooConfiguration has the following handlers:

      1. ModuleConfigureHandler

The ModuleConfigureHandler considers each line corresponds to a Module with the following format:

ModuleName [ModuleURL] [ModuleInitialisation]

With the exception of the ModuleName all the remainder parameters are optional, however the ModuleInitialisation has the constraint of succeeding the ModuleURL parameter. Each parameter is explained as follows:

    1. Jamboo Loader

The most important utility class in the Jamboo kernel is the JambooLoader class. It is responsible for not only retrieving the corresponding class files of the Modules, but also instantiating them and linking them in run-time. The ability of instantiating and linking classes in run-time is due to the linking model of the JVM. The JambooLoader merely provides the ability of retrieving the code from anywhere across the network.

The code should take advantage of the URLClassLoader of JDK1.2 but the requirements related to the new security model have not yet been anaylsed, so current implementation is done in JDK1.1. However the port should be straightforward to JDK1.2.

The JambooLoader receives a request for a particular module, by supplying the name of the Module and the corresponding url where the classfiles are located. The JVM handles dependencies automatically by using the same classloader as the initial class.

The JambooLoader takes advantage of the potential provided by the java.net.URL and all the associated classes, such as the URLStreamHandler. Should the developer not be satisfied with the default URLStreamHandlers provided by the JVM then it is always possible to set a new URLStreamHandlerFactory. JambooLoader uses whatever is available, so it is the responsibility of the developer to invoke the URL.setURLStreamHandlerFactory. In the current version, JambooLoader inherits from ClassLoader, the decision to port it to JDK1.2 must be carefully analysed to deem justification.

  1. Modules

The extensions (plug-ins) that are to be added to the main core are divided into two categories:

This criterion is used in Bamboo, however it is prone to confusion since a root is a module and vice-versa. Their main difference is purely conceptual. An alternative concept is to consider everything is a module from the start and that there are several kinds with specific characteristics. The inheritance and implement mechanism of java would allow combining in a subclassed module several different characteristics. Therefore the main types of modules available are as follows:

Naturally the Jamboo can only make certain assumptions about what should be the methods to be supported. Therefore the concept of adapters should be applied, delegating the actual class decision to the developer rather then trying to foresee the only way of doing things.

The objective of Jamboo is not a platform but a simple means of dynamically loading and unloading modules in run-time. It requires a protocol to be managed by the application to manage Jamboo. A similar analogy is the Thread class, it just runs provides some functionality but it is up to the developer what to do with it.

  1. Implementation

The class diagram below, portraits all the classes of the Jamboo package. The current version may be considered as version 0.0, although it is not a release since some work needs to be done such as:

The current implementation of Jamboo still requires additional development to attain a state suitable for release however it works, proving the concept.

  1. References

[1] K. Watsen and M. Zyda, "BAMBOO – A Portable System for Dynamically Extensible, Real-time, Networked, Virtual Environments", IEEE VRAIS, Georgia, 1998

[2] K. Watsen and M. Zyda, "BAMBOO – Supporting Dynamic Protocols for Virtual Environments", IMAGE Conference, Arizona 1998

[3] P. Heller, S. Roberts, "Java 1.2 Developer’s Handbook", Sybex, 1999

[4] B. Verners, "Inside the Java Virtual Machine", Mc-Graw Hill, 1998

[5] H. Sowizral, K. Rushforth, M. Deering, "The Java3D API Specification", Addison-Wesley, 1997

[6] D. Brutzman et al, "Virtual Reality Transfer Protocol (vrtp) Design Rationale", WET ICE: Sharing a Distributed Virtual Reality, Massachusetts, June 1997. http://www.stl.nps.navy.mil/~brutzman/vrtp/vrtp_design.ps