Gadgeteer

ClusterJuggler Guide

Version 0.2

$Date: 2003/07/10 23:58:55 $


Table of Contents

1. Introduction
Background
Overview
2. ClusterManager
Overview
Step-by-Step Directions (Using vrjconfig)
3. ClusterNetwork
Description
Configuring the ClusterNetwork
4. ClusterPlugin Interface
Introduction
5. RemoteInputManager
Overview
Configuring the RemoteInputManager
6. ApplicationDataManager
Overview
Sample Application Code
7. SwapLockPlugin
Overview
Configuring SwapLockPlugin
8. Troubleshooting
Glossary of Terms
Index

List of Figures

1.1. Cluster Juggler Layered Architecture
1.2. ClusterManager and Plugins
2.1. Class Diagram: ClusterManager
2.2. VR Juggler Kernel Loop
2.3. Frame Syncronization
2.4. Create ClusterManager Element
2.5. Set Name
2.6. Enter Plugin Name
2.7. Adding more Plugins
2.8. Selecting First Node
2.9. Adding More Nodes
2.10. Select Node
2.11. Select Barrier Master
3.1. Packet Structure
3.2. Class Diagram: PacketFactory
3.3. Class Diagram: ClusterNetwork
3.4. Create New Machine-Specific Element
3.5. Enter Unique Name
3.6. Create Display System
3.7. Create Display Window
3.8. Machine Info
4.1. Interface ClusterPlugin
5.1. Virtual Devices
5.2. Heterogeneous Cluster
5.3. Find Device
5.4. Set Device Host
6.1. User Data
7.1. Create SwapLockPlugin
7.2. Set Unique Name
7.3. Set Sync Server Port
7.4. Set Sync Method
7.5. Set Sync Server

List of Examples

6.1. Define Your Data Structure
6.2. Declare an Instance
6.3. Initialize the Data Structure
6.4. Calculate the Value of the Data Structure
6.5. Use the Data Structure

Chapter 1. Introduction

Table of Contents

Background
Overview

This document is intended for people who are interested in using Cluster Juggler to run VR applications on a cluster. It will first give the user an understanding of what ClusterJuggler is and why it was created. Then the reader will be taught how to configure a VR Juggler application to run on a cluster using ClusterJuggler.

The prerequisites for reading this document are minimal. They are:

  • Experience running and configuring VR Juggler applications.

  • A general knowledge of distributed VR using middleware solutions.

What You Will Need

  • VRJuggler - An Open Source virtual reality platform.

  • Cluster - Multiple computers connected through a TCP/IP network

  • VRJConfig - Configuration tool distributed with VRJuggler

Background

Traditionally, muti-screen immersive systems have relied upon dedicated high-end shared memory graphics workstations or supercomputers to generate interactive virtual environments. These multi-screen immersive systems typically require one or two video outputs for each screen and simultaneously utilize several interaction devices. In recent years this trend of almost exclusively using high-end systems has started to change as commodity hardware has become a viable alternative to high-end systems.

Current technologies have empowered PC-based systems with high-quality graphics hardware, significant amount of memory and computing power, as well as support for many external devices. Their application to virtual reality applications is motivated by the dramatic cost decrease they represent and by the wide range of options and availability. To drive a multi-screen immersive environment we need multiple commodity systems working as a single unit, that is, a tightly synchronized cluster. The challenge is that, although the base technology is standard off-the-shelf technology, there is a lack of software for weaving together the cluster into a platform that supports the creation of virtual environments. Furthermore, there is an even greater lack of software that can allow existing virtual environment designed for high-end system to transparently migrate to a cluster.

This document presents ClusterJuggler, an extension to the VR Juggler architecture which allows an application to transparently run on a cluster of comodity PC's. The main goals of ClusterJuggler are to allow the cluster software to adapt to the particular hardware configuration of the virtual reality system, to provide application portability and scalability from high-end to commodity by hiding the clustering from developers, and to allow users to customize the clustering methods being used.

Overview

ClusterJuggler is our third generation of clustering software. Based on our past experiences, we have created a system that combines recommended practices of clustering into a modular and extensible system. This clustering research contributes several innovations:

  • Layered clustering architecture: ClusterJuggler is based upon a layered architecture that separates the clustering components into several major subsystems. This allows for a high degree of modularity in the system.

  • Plugin system: ClusterJuggler provides an architecture for dynamically loading cluster plug-ins. These plug-ins extend the core system with specialized clustering functionality.

  • Reconfiguration: ClusterJuggler allows the cluster to be reconfigured at run-time. Systems, displays and devices can be added, removed or reconfigured as needed.

Figure 1.1. Cluster Juggler Layered Architecture

Cluster Juggler Layered Architecture

As Figure 1.1, “Cluster Juggler Layered Architecture” shows, ClusterJuggler is comprised of a set of components that are arranged into several layers. This technique was chosen to make the system as modular as possible. Each modular layer only uses the functionality provided to it by the layers below it.

Figure 1.2. ClusterManager and Plugins

ClusterManager and Plugins

Cluster Manager Layer. The Cluster Manager layer is responsible for the configuration of all layers in ClusterJuggler and managing the active plugins (Figure 1.2, “ClusterManager and Plugins”). This includes maintaining a list of all current plugins and synchronizing the calls to each plugin to perform their specialized tasks. Plugins are added to the system when a new plugin registers itself with theClusterManager.

Cluster Network Layer. The Cluster Network layer maintains an abstract representation of the system of interconnected nodes that comprise the cluster (Figure 1.2, “ClusterManager and Plugins”). This abstraction provides the rest of the system with a messaging interface for communicating with the entire cluster. Internally it maintains a list of each node in the cluster along with the network connection used to communicate with it. Because the networking layer is an abstraction, developers can provide different implementations that make use of alternative low-level networking methods. The networking implementation can then be configured by the user.

Cluster Plugins Layer. ClusterJuggler is based on a plugin architecture that allows the system to be modular and extensible. Plugins are dynamically loaded on demand at run-time. This allows users and developers to easily add new plugins to support additional cluster-based functionality. All ClusterJuggler plugins are derived from a common base interface: ClusterPlugin. To create a new plugin, a developer must implement a few of the base interface methods. In return, they get a support for network communication, synchronization, and run-time reconfiguration.

ClusterJuggler provides several commonly used plugins that serve as the base for clustering in VR Juggler and as examples for other developers to extend the system. These base plugins are the RemoteInputManager, ApplicationDataManager, and SwapLockManager. The RemoteInputManager plugin is responsible for distributing synchronized device data across the cluster. The ApplicationDataManager provides developers with a method for sharing application data within a clustered application. The SwapLockManager implements several methods for synchronizing display updates within a cluster. We plan to add additional plugins in the future to support extended clustering functionality.

Chapter 2. ClusterManager

Overview

The ClusterManager(Figure 2.1, “Class Diagram: ClusterManager”) is one of the only two static components of ClusterJuggler. It acts as a facade for the entire ClusterJuggler sub-system. It is responsible for maintaining a list of all current plugins, configuring all sub layers, calling the plugins to perform their specific tasks, and syncronizing the kernel loop between machines.

Dynamic Plugin Registration. When a plugin is dynamically loading it automatically registers itself with the ClusterManger where it is thrown into a list of plugins for later use. This list is the only way that ClusterJuggler knows about the plugins. This means that that there is absolutely no way to access these plugins unless you go through the ClusterManager's API and this list.

Run Time Re-Configuration. VR Juggler's architeture has the amazing ability to reconfigure itself while it is running. This is a complex task of run time reconfiguration is difficult when running on one machine let alone across a cluster. The ClusterManager is resoponsible for making this all happen behind the sceens.

Note

Run-time configuration is the process of changing the state of the application while it is running. For example it would be possible for the user to connect to the cluster using a PDA and reconfigure the display system being used. This is a complex task when running on one machine let alone across a cluster.

Figure 2.1. Class Diagram: ClusterManager

Class Diagram: ClusterManager

Note

VR Juggler is continually running through a loop of method calls that receive information from external devices, calculates application data, and draws the users perspective called the kernel loop.

Figure 2.2. VR Juggler Kernel Loop

VR Juggler KernelConrolLoopKernel Loop

Plugin Method Calls. Within the VR Juggler kernel loop (Figure 2.2, “VR Juggler Kernel Loop”)there are many different locations that we might need to send information across the network in order to fully synchronize the cluster. For example, application data needs to be shared directly before the draw function because this data needs to be identical across the cluster right before we draw the scene. But, on the other hand input data needs to be shared at the beginning of the loop so that preFrame() can use this data to calculate the state of the scene such as the navigation matrix. In order to accommodate all possible needs of a plug in, there are calls into the ClusterManager at numerous locations during the kernel loop. The Cluster Manager is then responsible for calling any plugin that needs to use the network to transfer data.

Frame Synchronization. In order to guarantee that one node does not progress further through the kernel loop than the other nodes the ClusterManager must provide a level of synchronization on every method call from the kernel loop. This is accomplished by requiring the ClusterManager to receive all data packets. Each plugin is only responsible for sending packets to other cluster nodes. Once all plugins have sent their data, the ClusterManager sends an END_BLOCK packet telling the remote nodes that it is done sending information and then reads data from the network until it receives an END_BLOCK from all other nodes. The syncronization occurs because each node must indicate to all other nodes that it has completed the current frame(Figure 2.3, “Frame Syncronization”).

Figure 2.3. Frame Syncronization

Frame Syncronization

Configuring the ClusterManager

Step 1) Create a new ClusterManager config element.

Note

Please consult VRJConfig manual for directions on adding a new config element.

Tip

If you start typing the name of the config element that you want, VRJConfig will try to find a element that starts with what are typing.

Figure 2.4. Create ClusterManager Element

Create ClusterManager Element

Step 2) Give the new ClusterManager element a unique name.

Note

Cluster Juggler often references config elements by their name directly. This means that we must always have unique names for our config elements.

Figure 2.5. Set Name

Set Name

Step 3) Enter the name of the first plugin that your application requires.

Figure 2.6. Enter Plugin Name

Enter Plugin Name

Step 4) Add a new value and enter the name of each additional plugin that your application requires.

Figure 2.7. Adding more Plugins

Adding more Plugins

Step 5) Select the first node that will be in your cluster.

Note

Nodes are represented by MachineSpecific config elements. VRJConfig will only let you select cluster nodes that have been created for this configuration. This means that you must first create these MachineSpecific config elements while configuring the ClusterNetwork. You can refer to the section called “Configuring the ClusterNetwork” for help configuring the ClusterNetwork.

Figure 2.8. Selecting First Node

Selecting First Node

Step 6) Add a new value for each additioanl node in your cluster.

Figure 2.9. Adding More Nodes

Adding More Nodes

Step 7) Select the node for each additional value you just created.

Note

Nodes are represented by MachineSpecific config elements. VRJConfig will only let you select cluster nodes that have been created for this configuration. This means that you must first create these MachineSpecific config elements while configuring the ClusterNetwork. You can refer to the section called “Configuring the ClusterNetwork” for help configuring the ClusterNetwork.

Figure 2.10. Select Node

Select Node

Step 8) Select the node that is responsible for starting the cluster at the same time.

Note

Currently the ClusterManager is responsible for syncronizing the start of your application across the cluster. In the short future this will move to a new plugin, StartBarrierPlugin. This is required because we can not allow one node to start processing input data before another because it would effect the state of the application.

Figure 2.11. Select Barrier Master

Select Barrier Master

Chapter 3. ClusterNetwork

Description

The Cluster Network provides each plugin with a representation of the cluster as a system of interconnected nodes and defines an interface for exchanging message packets between nodes.

The packets are structured in a way to allow the ClusterNetwork to take a given packet, serialize it to a string of characters and send the string to a remote node. When received this string is de-serialized into a packet object again. This is accomplished by having a packet header, as seen in Figure 3.1, “Packet Structure”, that begins all packets. This header contains integers representing the packet type and the packet length. In order to allow the objects to be serialized and de-serialized into different formats we took advantage of the ObjectReader and ObjectWriter abstractions within Vapor, VR Juggler's system abstraction module. This enables us to serialize the packets into many different formats such as a string of characters or even an XML tree.

Figure 3.1. Packet Structure

Packet Structure

The process of reading the header, determining the packet type, creating the packet structure, and de-serializing the data can be a very tedious task. Because of this, we have created a packet factory, seen in Figure 3.2, “Class Diagram: PacketFactory”, that automates this process. This simplifies code and eliminates one location of possible errors.

Figure 3.2. Class Diagram: PacketFactory

Class Diagram: PacketFactory

As you can see from Figure 3.3, “Class Diagram: ClusterNetwork”, the ClusterNetwork has been designed to have a very intuitive API without any reference to any other sub-systems of ClusterJuggler. The ClusterNetwork provides everything that a programmer needs to send messages between nodes in a cluster. It is also because of this robust design that it is possible to develop a replacement for the ClusterNetwork that might use a different low level networking technique.

Figure 3.3. Class Diagram: ClusterNetwork

Class Diagram: ClusterNetwork

Configuring the ClusterNetwork

A machine specific config element contains information about a particular node in the cluster. Fields include, but are not limited to, the local display system, display windows, host name, and accepting socket port.

Step 1) Create a new Machine Specific Config element for each cluster node.

Note

Please consult VRJConfig manual for directions on adding a new config element.

Figure 3.4. Create New Machine-Specific Element

Create New Machine-Specific Element

Step 2) Enter a unique name for the new node. Cluster nodes are referenced by name throughout the configuration process, this requires that each node have a unique name that will not interfere with any other node.

Figure 3.5. Enter Unique Name

Enter Unique Name

Step 3) Create an embedded display system element

  • Enter the number of display pipes on the given machine in the Number of Pipes field.

  • For each display pipe you must create a xpipe and set its location. (ex. ptah-1:0 or ptah-1:1)

Note

Most PC systems will be able to leave the default values since they are not multi pipe systems.

Figure 3.6. Create Display System

Create Display System

Step 4) Create an embedded Display Window. In order to display graphics on either the desktop or a projected surface, you must create an associated display window. These windows can then either contain a simulated view or a surface view port such as the front wall in a CAVE.

Figure 3.7. Create Display Window

Create Display Window

Step 5) Enter details about this node.

  • Enter the port that the machine will listen for device requests on.

  • Enter the host name for the given machine.

  • Enter the serial port that will be used in the case of serial communication.

  • Enter the baud for this serial port.

Figure 3.8. Machine Info

Machine Info

Chapter 4. ClusterPlugin Interface

Table of Contents

Introduction

ClusterJuggler has been designed in such a way to make itself very extensible The idea is to provide the plugins with all functionality needed to operate on a cluster of machines. As a result, it is very easy for someone to extend the system by creating their own ClusterJuggler plugin. Below is the interface for the plugins and the brief description of the tools that they have access to.

Introduction

In order to create a modular system we wanted to allow the user to add any number of additional components to ClusterJuggler in a simple way. We have provided a ClusterNetwork layer to handle all low level communication and the ClusterManager to take care of all synchronization details. This allows the user to concentrate on their specific clustering need without worrying about the difficult low level issues. In order to create a plugin a programmer must only implement a few methods. In return they get run-time reconfiguration, synchronization, and a cluster network abstraction to handle all communication. ClusterJuggler also comes with a few commonly used plug ins, RemoteInputManager, ApplicationDataManager, and SwapLockManager. These plug ins serve both as the base for VR based clustering in VR Juggler and as examples for others to build new plug ins from.

Note

As new configuration information is added to the system it is delivered to the correct layer or plugin by the ClusterManager. In order to accomplish this we require that all cluster plugins and the ClusterNetwork implement the jccl::ConfigElementHandler abstract base class.

Figure 4.1. Interface ClusterPlugin

Interface ClusterPlugininterfaceClusterPlugin

Plugins have a very simple interface that allows the user a high level of specialization. As you can see in Figure 4.1, “Interface ClusterPlugin”, they only need to implement preDraw(), postPostFrame() configCanHandle(), configAdd(), and configRemove(). Since these plugins are simply additions to the ClusterJuggler core they are loaded dynamically at runtime. This allows the sharing of plugin libraries which do not require the developer to recompile ClusterJuggler.

Chapter 5. RemoteInputManager

The RemoteInputManager was created to share device input across a cluster. Having the ability to share input data allows us to support two different possible application needs. The first being that a machine can act as a device server and allow remote applications to request device data from a locally attached device such as a tracker. The second is the case when we are clustering multiple machines and we want to have the exact same input data on each machine every frame so that all nodes will be using the same data for computation. The idea being that if each node has the same input it will create the same scene. We can then configure each node to draw a different section of the scene to be displayed.

Overview

Our goal is to design a distributed shared memory system for VR application I/O (input/output) data. As a result of distributed I/O, application development and execution can transparently move between shared memory VR systems and PC cluster VR systems. This means the same VR applications will run on both systems, without any changes needed to the application.

VR Juggler already has an input manager that handles local input data on a single computer. ClusterJuggler extends VR Juggler by using the RemoteInputManager plugin as an extension to the existing input manager. The RemoteInputManager provides a few key functions: device location transparency, eteroerogeneous clusters, support for platform specific device drivers, and an unlimited number of devices.

Device Location Transparency. Not only does the remote input manager have useful functionality, but it also intends to avoid forcing the application programmer to worry about the location of devices. Once a cluster is set up, the programmer and application can act as if each input device is connected to every cluster node(Figure 5.1, “Virtual Devices”). The remote input manager avoids putting extra burden on application developers and hides the complications of the cluster from them.

Figure 5.1. Virtual Devices

Virtual Devices

Heterogeneous Clusters. Also by distributing the input to cluster nodes across the network, we can remove the typical cluster computing constraint of having identical computers at each node. We are able to accomplish this very easily since our ClusterNetwork layer works across multiple platforms. This allows us to construct a cluster from any combination of the platforms supported by VR Juggler(Figure 5.2, “Heterogeneous Cluster”).

Figure 5.2. Heterogeneous Cluster

Heterogeneous Cluster

Support for Platform Specific Device Drivers. Although VR Juggler supports many platforms, new devices require their own drivers for each platform. This can restrict the use of new devices on VR systems because writing device drivers is time consuming. With the help of the RemoteInputManager, devices whose drivers have been integrated into VR Juggler on one platform can be utilized on other platforms as well. By connecting to another computer through the RemoteInputManager, other platforms can retrieve device data across the network until drivers for the specific platforms are finally integrated.

Unlimited Number of Devices. Also, if a large number of input devices are to be used, our design allows the devices to be spread across the cluster nodes. This prevents problems such as multiple input devices creating a large workload on a single computer, or all input hardware not being able to attach to a single PC.

Configuring the RemoteInputManager

Step 1) Find the device(s) that you want to share by browsing through the list of Config Elements under the Devices heading.

Figure 5.3. Find Device

Find Device

Step 2) Select the cluster node from the drop down list in the Host Node property.

Note

In some cases you may want to have input devices attached to multiple systems because of a lack of serial ports. For this reason we require you to configure the device server for each input device.

Figure 5.4. Set Device Host

Set Device Host

Chapter 6. ApplicationDataManager

The application data manager was created to allow VR application developers to easily exchange any type of data they want across a cluster of machines. We can accomplish this by letting the developer derive from an interface that we have defined. This will allow us to grab the data structure, serialize it, send it across the cluster, serialize it, and allow all other nodes to access the identical data. This chapter will present the basic structure of the Application Data Manager and show you how to use it in your code.

Overview

Application Data Manager allows the application developer to share any arbitrary type of data. For example we might have a GUI running on a hand held device that interacts with the application to provide data to control the application. Since we can not expect this GUI to connect to all nodes in the cluster, the application data manager allows the hand held device to connect to a single machine which will synchronize this data across the cluster.

Figure 6.1. User Data

User Data

As you can see from Figure 6.1, “User Data”, you can create your own data structure and use two templated mixin classes in order to gain the needed interface to allow the Application Data Manager to handle you data.

Sample Application Code

Using the application data manager to share information within your application is very easy and powerful. You only need to do the following:

  • Define your data structure and implement the writeObject and readObject functions for it.

  • Create and instance of your new data structure

  • Initialize the data structure by assigning it a GUID(Globally Unique Identifier) and assigning a host to be responsible for updating its value when needed.

  • Calculate the value of the data structure on the responsible host node.

  • Use the data structure's value in your application.

Once you have completed this simple tasks you will have a custom data type that is being synchronized across all cluster nodes behind the scenes. This can make the process of sharing the transformation matrix a simple task that can be implemented in 50 lines of code.

Example 6.1. Define Your Data Structure

  1 #include <vpr/IO/SerializableObject.h>
    struct MyType1 
    { 
       int something; 
  5    float otherStuff;
       char stupid;
       bool drawBool;
    }; 
    
 10 template<class MyType> 
    vpr::ReturnStatus 
    vpr::SerializableObjectMixin<MyType>::writeObject(vpr::ObjectWriter* writer) 2 
    {
       writer->writeUint16(something); 
 15    writer->writeBool(drawBool); 
    }
       
    template<class MyType> 
    vpr::ReturnStatus
 20 vpr::SerializableObjectMixin<MyType>::readObject(vpr::ObjectReader* reader)3 
    { 
       something = reader->readUint16();
       drawBool = reader->readBool(); 
    }
1

Define the data type that you want to share across the cluster.

2

Implement the function that will serialize the structure.

3

Implement the function that will de-serialize the structure.

Example 6.2. Declare an Instance

cluster::UserData<vpr::SerializableObjectMixin<MyType> > mMyData;1
1

Declare an instance of your data type called mMyData

Example 6.3. Initialize the Data Structure

vpr::GUID new_guid("d6be4359-e8cf-41fc-a72b-a5b4f3f29aa2");1 
        std::string hostname = "gfxn1";2 
        mMyData.init(new_guid, hostname);3
1

Create a new GUID to identify the new data.

2

Store the hostname of the cluster node that will be responsible for updating the value of the data structure.

3

Initialize the data structure to be shared across the cluster.

Example 6.4. Calculate the Value of the Data Structure

  1 if (mMyData.isLocal())1 
    {
       if(0 != mButton0->getData())2 
       { 
  5       mMyData->drawBool = true;3 
       } 
       else
       {
          mMyData->drawBool = false; 
 10    } 
    }
1

Determine if the data structure is local, the value is being updated by the local machine.

2

Get the current state of Button0.

3

Change the value of the shared data structure to match Button0.

Example 6.5. Use the Data Structure

if (mMyData->drawBool == true)1 
{
   drawNetwork();2 
}
1

Test if the value of the mMyData is true.

2

If true then call a function that draws the representation of the cluster network.

Chapter 7. SwapLockPlugin

Synchronizing multiple displays is one of the biggest challenges in creating immersive VR on PCs. This is because a single PC does not have enough processing power to generate the graphics for multiple displays in VR systems such as a CAVE. Now that graphics hardware is becoming available to synchronize multiple active stereo PCs or show passive stereo, the design of ClusterJuggler must provide a way for a running applications that distribute across multiple PCs and graphic hardware. Because we are using different machines that may even have different graphics cards, generating the graphics is going to take a different length of time on each machine. While generating the image the graphics hardware places the data into a buffer that is not being displayed. Once the hardware has generated the image it swaps the buffer containing the new data with the buffer that is being displayed. We encounter a synchronization issue when the cluster nodes swap these buffers at different times. This creates a ripping effect that causes the display to appear out of sync. We can combat this issue by sending a signal between all machines when they should swap their buffers. This communication needs to have a very low level of latency, usually on the order of 10-80us.

Overview

The SwapLockPlugin gives the application developer a set of methods which they can choose from while configuring the application.

Synchronization Methods

  • TCP/IP - Uses a socket connection to synchronize the cluster. [Latency:100 us]

  • TCP/IP Serial Hybrid - Uses a socket connection for the slave-to-master communication and a serial connection for the master-to-slave communication. [Latency:80 us]

  • Wired Parallel Port - Uses a kernel module to directly communicate through the parallel port. You are required to have an external device that acts as a simple AND gate. [Latency:10 us]

Configuring SwapLockPlugin

Step 1) Create a new SwapLockPlugin Config Element.

Note

Please consult VRJConfig manual for directions on adding a new config element.

Note

Nodes are represented by MachineSpecific config elements. VRJConfig will only let you select cluster nodes that have been created for this configuration. This means that you must first create these MachineSpecific config elements while configuring the ClusterNetwork. You can refer to the section called “Configuring the ClusterNetwork” for help configuring the ClusterNetwork.

Tip

If you start typing the name of the config element that you want, VRJConfig will try to find a element that starts with what are typing.

Figure 7.1. Create SwapLockPlugin

Create SwapLockPlugin

Step 2) Give the SwapLockPlugin a unique name.

Figure 7.2. Set Unique Name

Set Unique Name

Step 3) Set the TCP/IP port to use on the Sync Server for communications.

Figure 7.3. Set Sync Server Port

Set Sync Server Port

Step 4) Set the method of synchronization to use.

Figure 7.4. Set Sync Method

Set Sync Method

Step 5) Select the cluster node that should be responsible for keeping the cluster synchronized.

Figure 7.5. Set Sync Server

Set Sync Server

Chapter 8. Troubleshooting

If while trying to use ClusterJuggler you encounter a problem you should consult the following list of commonly seen problems. We have provided the reason why each problem occurs and how to fix it.

My old device driver does not work on the cluster.

In order to correctly serialize the input devices we had to use a different method of inheritance.

Change

public Input, public Digital, public Position

to

InputMixer<
    Input, InputMixer<Digital, Position> >

While running Performer applications swap lock does not seem to work.

Because of the way that Performer threading works, you can not use multiple processors with RIM.

To disable multi processor usage uncomment line 264 and comment out line 263 in modules/vrjuggler/vrj/Draw/Pf/PfManager.cpp and rebuild VR Juggler.

My screens exhibit a large amount of tearing.

ClusterJuggler currently only supports three methods of swap-locking.

We are looking for a very simple and easily expandable method. Our goal is to eliminate the need for specialized hardware.

I seem to be navigating differently on each screen.

All navigation must be based of timestamps returned from a input devices.

You must use timestamps to find the delta between frames. These timestamps can be acquired from any DeviceInterface that is pointing at a device that is being shared across the cluster.

static vpr::Interval last_frame; 
vpr::Interval current_frame = mHead->getTimeStamp();
vpr::Interval diff(current_frame-last_frame);
last_frame = current_frame; // You can get the delta in microseconds from 
                            // vpr::Uint64 delta = diff.usecs();

Glossary of Terms

C

ClusterJuggler

An extension to VR Juggler designed to make PC clusters a feasible alternative to expensive shared memory systems. It cannot simply utilize the design of traditional clusters because virtual reality requires special functionality not present in conventional cluster applications. It also should not put the burden on the VR application developer to perform communication between cluster nodes. To prevent burdening the developer, the design retains some of the features that shared memory systems provide for virtual reality by hiding the complexities of a cluster.

Context-specific data

In OpenGL terms, some information that is associated with a specific OpenGL context.

Critical section

In multi-threaded programming, a block of code that reads from or writes to data that is shared across multiple threads.

F

Facade

Provides a unified interface to a set of interfaces in a complex subsystem.

Frame

In computer graphics terms, one iteration of a rendering loop. In VR Juggler, a frame is one complete pass through an application object's methods, beginning with vrj::App::preFrame() and ending with vrj::App::postFrame(). Methods called in between include vrj::App::intraFrame() and methods that are specific to a given graphics API.

G

GUID

Globally unique identifier that is generated using various properties of a machine and a random number generator. It has been proven that it is statistically impossible for the same number to be generated twice within your lifetime.

I

interface

An interface is a collection of operations used to specify a service of a class or a component.

R

Remote Input Manager Plugin

Plugin designed to create a distributed shared memory system for VR application I/O (input/output) data. As a result of distributed I/O, application development and execution can transparently move between shared memory VR systems and PC cluster VR systems. This means the same VR applications will run on both systems, without any changes needed to the application.

S

smart pointer

In C++ terminology, a smart pointer is a pointer-like object where the pointer dereference operators (-> and *) are overloaded to perform special functionality. This takes advantage of C++ operator overloading to hide extra processing steps behind a familiar syntax.

V

virtual platform

An abstraction of the operating system and hardware (both the computer architecture and the input devices) that comprise a VR system. A virtual platform provides a cross-platform and cross-VR system layer upon which portable VR applications can be written.

VR Juggler

VR Juggler is a open source project that creates a platform for Virtual Reality applications to run on. It allows a users application to be written once and run on any platform or configuration without recompiling. For example you could create an application to run on your home computer and then run the exact same application on the multi-million dollar C6 in Howe Hall.

Index

A

ApplicationDataManager
Sample Code, Sample Application Code

C

Cluster, Background
ClusterJuggler
extends VR Juggler, Overview
included plugins, Overview, Introduction
layered architecture, Overview
overview, Overview
ClusterManager
Plugin registration, Overview
ClusterPlugin
interface, Overview, Introduction
ConfigElement
ClusterManager, Configuring the ClusterManager

F

Facade
ClusterManager, Overview

K

Kernel
ConrolLoop, Overview

O

ObjectReader, Description
ObjectWriter, Description

P

Plugin
dynamic loading, Introduction
(see also ClusterManager)

R

Remote Input Manager
defined, Glossary of Terms
Run Time Reconfiguration, Overview

S

SwapLockPlugin
Synchronization Methods, Overview

V

Vapor, Description
VR Juggler, Background