Components for Distributed Virtual Environments
Manuel Oliveira Jon Crowcroft Mel Slater
University College of London
Computer Science Department
Gower Street. WC1E 6BT London
+44 171 419 3876
{m.oliveira|j.crowcroft|m.slater}@cs.ucl.ac.uk
Don Brutzman
Naval Postgraduate School
Monterey Ca 93943-5000 USA
+1 408 6562149
brutzman@nps.navy.mil
ABSTRACT
Virtual Environments (VE) are complex systems that presents interesting non-trivial challenges for software development. The problems increase when considering VE that are both distributed and shared amongst multiple participants. The majority of existing systems supporting Large Scale Virtual Environments (LSVE) are based on monolithic architectures, making maintenance, reusability and extensibility difficult at best.
This paper presents an overview of the Java Adaptive Dynamic Environment (JADE) as an alternative to the traditional approach for developing a core infrastructure for VE systems.
JADE consists of a light-weight cross-platform kernel with inherent capabilities for dynamic extensibility in run-time. Its architecture and fundamental design concepts are discussed in detail. Although the design principles are applicable to other areas, the implementation is targeted at LSVE.
The JADE implementation is 100% Java, taking full advantage of the following properties: wide deployment across major operating systems and browsers; comprehensive set of packages; networking capabilities and security mechanisms.
Keywords
Virtual Environments, Framework, Components, Virtual Reality, Object-Oriented, Java.
Introduction
The current LSVE systems are inflexible partly because some have the legacy of a monolithic architecture, and partly because of their premise of putting code together just to make things work. It is extremely difficult, if not totally impossible, to integrate a module that performs an elaborate visualisation algorithm from one LSVE system into another.
The gruesome reality of current LSVE systems is one of the major obstacles to satisfy the requirements for massive scalability. The Virtual Reality Transfer Protocol (vrtp) [Brutzman97] proposes a framework identifying the main components that constitute a distributed LSVE system: Client, Server, Monitor, Universal Platform (UP), Peer-to-Peer. The focus of this paper will be the UP, which provides the base support for all the remainder components, by means of a flexible kernel with extensible capabilities for run-time integration of code, thus enabling VE systems to be both dynamic and adaptive. The Bamboo [Watsen98a, Watsen98b] kernel is a proposed implementation for the UP, which is based on C++ for the core, using language loaders to broaden the platform to other languages. The underlying infrastructure is based upon the NetScape Portable Run-time (NSPR) technology. Nevertheless, significant effort has gone in the design of Bamboo to support cross-platform, by building the necessary common functionality as base components.
The JADE initiative is an alternative implementation of the UP, following the same software engineering principles as Bamboo, which have existed in other fields of computer science, namely operating systems [Ford97]. JADE takes full advantage of the rich functionality readily available in any Java Virtual Machine (JVM) along with the functionality provided by the extension libraries such as Java3D [Sowizral97]. The cross-platform nature of the Java language provides JADE with the capability for wide deployment, while avoiding the burden of third party libraries that may be unwieldy and too generic.
Overview Description
JADE focuses on the framework design of a small flexible kernel supporting dynamic components for LSVE, taking into consideration the premises inherent to vrtp. Therefore, its cornerstone is based on interface design, conveying a LSVE system with total liberty to customise.
The base component of the JADE framework is the Module, which enforces the minimal interface for any component to be managed by the kernel. It is possible for a Module to obtain a reference to another, however it is the responsibility of the Module developer to either understand beforehand the interface of the target Module, or to use the available reflection mechanisms.
Modules come in different variants to support the necessary base functionality for any VE system as illustrated in Fig. 1.
Fig. 1 - JADE possible configuration
The block diagram presented in the fig.1, represents a possible configuration of a VE system where the base Modules are used, where the differences are represented by different shapes and shades:
The core of any JADE based system is based on the kernel, which extends the ModuleManager, however additional helper classes exist to support dynamic runtime modules. The kernel implements the Singleton pattern thereby allowing immediate accessibility from anywhere in the system. The pattern enforces that only one single instance is available in the JVM at any given time. This permits ubiquitous access to the kernel without resorting to reference passing.
JADE Loader
The JADELoader is the fundamental helper class of the JADE kernel. It is responsible to retrieve resources based on a unique identifier and the URL indicating its location. The relationships between sources and sinks related to the JADELoader are depicted in Fig. 2.
Fig. 2 - The JADE Loader
The retrieval methods employed by the JADELoader depend upon what is defined by the corresponding URL, which not only defines a location of the resource, but also the associated protocol to be used. By default if the URL is not based on the HyperText Transfer Protocol (http) then the resource is located on the local host and the system variables for paths are used. Otherwise the resource is located remotely, and therefore the appropriate protocol is used for retrieval as indicated in the protocol section of the url.
Once the resources are retrieved, JADE handles each according to their nature. In the case of a Module or a Java class, the JADELoader retrieves the corresponding classfile, linking it dynamically before creating an instance. This dynamic linking is an inherent property of the Java Virtual Machine [Venners98], which in Java Development Kit 1.2 (JDK) provides fine grained security policies associated to class loading. The JVM does resolution of classes, meaning that if a class being linked requires other classes then they are loaded into the same namespace of the current java.lang.classloader. However the search is done based on the current urls known, so it is advisable to either compact all required classes in a single jar (or zip) file or guarantee that the classes with interdependencies are located in the same resource path.
It is possible to integrate native code (C/C++, Pascal, Assembly, LISP, etc) as long as it is provided by means of a system library so the JADELoader may load it into its memory space. In the case of the windows operating system, the most common library form is the Dynamic Link Library (dll).
Alternative Frameworks
JADE benefits immensely from the Java platform and inherent mechanisms to make it a cross platform developing language. However it is necessary to evaluate alternative solutions that may support the aims of a flexible and dynamic runt-time kernel, to avoid repetition of any implementation efforts.
The underlying aim of middleware, such as Common Object Request Broker Architecture (CORBA) [Orfali98] and Distributed Component Object Model (DCOM) [Grims97], is to promote software reusability. However it does not present itself as a viable solution due to the real-time requirements of LSVE that make systems very susceptible to any latencies incurred in the middleware.
Although non-existent in virtual environments, there exist several research proposals to build multimedia applications from components, such as MMLite [Helander98], DJINN [Mitchell97], Medusa [Wray94], CINEMA [Barth96], amongst others. However normally their component framework is tied to the particular context of multimedia applications, thereby imposing obstacles for generalising to other contextual areas, such as LSVE.
The problem in defining a framework is to establish the life cycle of components and their management, including the way of interacting with one another. In JADE, the solution is based on defining a flexible interface and providing the mechanisms for Module management. Another alternative to defining an interface framework would be based on multicast communication to create a local data bus for components to exchange information. Such an approach is adopted in [Otto98] and [Schulzrine95], however minimal transmission mechanisms must be used for communication purposes. The associated overhead of those mechanisms incurs significant performance penalties when compared to JADE. It is always possible to design a component that integrates the MBUS functionality [Otto98].
REFERENCES