TL;DR
This paper introduces FlowVR, a middleware designed to simplify the development of large, distributed Virtual Reality (VR) applications. It addresses the challenges of integrating diverse software components and managing hardware limitations in VR by promoting modularity and leveraging PC clusters for high performance.
What Problem Does This Paper Address?
Developing complex VR applications is a significant engineering challenge. Two primary difficulties arise:
- Software Engineering Complexity: VR applications often involve integrating various pieces of code (simulation, graphics, device drivers) developed by different people over time. This integration can be cumbersome, especially when dealing with distributed systems. Traditional approaches like scene graphs can hinder distribution due to inherent dependencies.
- Hardware Limitations and Scalability: To achieve immersive experiences, VR systems often require significant computational power, leading to the use of multiple CPUs, GPUs, and display devices. However, effectively coordinating these resources, especially across a cluster of PCs, introduces complexities like task parallelization and multi-device calibration. While commodity PC clusters offer a cost-effective solution, aggregating them requires specialized software.
The paper aims to alleviate these issues by providing a framework that facilitates modular development and efficient execution on PC clusters.
Methods
FlowVR is a middleware built upon an extended data-flow model. Its core components and concepts include:
- Modular Architecture: Applications are composed of "modules," which are essentially existing code components (e.g., simulation, rendering, input handling) adapted to use FlowVR's communication mechanisms. Modules run in their own independent processes or threads, minimizing the effort to integrate existing code. Crucially, modules are unaware of each other, communicating only through FlowVR.
- Data-Flow Network: A "FlowVR network" connects these modules. This network is managed by "daemons" running on each host in the PC cluster. The daemons handle data transfer between modules, employing efficient methods.
- Extended Data-Flow Model: FlowVR utilizes a data-flow model where applications are represented as oriented graphs of tasks (modules) connected by communication channels. This model facilitates task distribution.
- Network Components (Filters and Synchronizers): To manage complex message handling and optimize performance, FlowVR introduces "filters" and "synchronizers."
- Filters: These are plugins loaded by daemons that can process messages in sophisticated ways, such as selecting, combining, or discarding them based on criteria like 3D bounding boxes. They don't run in their own processes, minimizing context switches.
- Synchronizers: These components help manage coupling policies, centralizing data to make decisions that influence other filters or modules.
- Stamps: Messages are associated with "stamps," lightweight data that can carry information like message IDs or 3D bounding volumes. Stamps can be routed separately from messages, reducing data transfer when only metadata is needed.
- Network Patterns: The paper highlights several useful network patterns implemented as Perl functions, including:
- Broadcast: For distributing data (e.g., from a driver) to multiple application copies.
- Coherent Greedy Broadcast: A more efficient broadcast that allows consumers to pick the latest data without waiting for all parts of the tree to synchronize.
- Merge: For combining results from modules that distributed computations.
- Stop/Start Control: To dynamically activate or deactivate parts of an application.
- Frequency Control: To manage the iteration rate of modules.
- Development Tools: FlowVR includes a tool suite for developing modules, defining applications, mapping them onto clusters, launching, and controlling execution, as well as tools for trace capture and analysis.
Datasets
Not discussed in the paper. The paper focuses on a framework and its application to a specific VR scenario, rather than on training or evaluating against predefined datasets.
Key Insights and Ideas
- Modularity as a Cornerstone: The paper strongly emphasizes that enforcing modularity at the module level (modules unaware of each other) is key to managing the complexity of large VR applications and facilitating code reuse.
- Data-Flow for Distributed Systems: The data-flow model, extended with filters and synchronizers, proves to be a powerful paradigm for expressing and managing distributed computations in VR.
- Filters and Synchronizers for Optimization: The introduction of filters and synchronizers as distinct network components, rather than solely within modules, allows for fine-grained control over data flow and message handling, enabling significant performance optimizations without modifying core module code.
- Network Patterns for VR: Identifying and abstracting common network patterns (like greedy broadcast and frequency control) into reusable functions significantly simplifies the development of complex VR applications.
- Commodity Clusters are Viable: The work demonstrates that high-performance VR applications can be effectively built and run on clusters of commodity PCs, overcoming the limitations of individual machines.
Key Results
The paper presents a representative VR application developed using FlowVR, which involves:
- User Input: Capturing 3D user shape information from multiple cameras.
- Advanced Interactions: Implementing virtual carving and rigid body simulations with user collision.
- Distributed Rendering: Displaying the environment on a large, multi-projector display wall.
The application was tested on the Grimage platform, featuring 6 cameras and a 4x4 projector display wall, driven by two interconnected clusters (11 dual-Xeon for vision, 16 dual-Opteron for visualization).
- Performance: The system achieved real-time performance. For instance, the rendering part could refresh the display at least 75 times per second.
- Modularity Benefits: The paper highlights that a complex application integrating around 50 modules from different teams was developed by 4 people in about 6 months, demonstrating FlowVR's ability to manage complexity.
- Efficiency: The application efficiently utilized computational resources, running over 200 processes and using approximately 2000 lines of Perl code to generate a graph with over 5000 objects.
- Flexibility: FlowVR supported heterogeneous hardware within the same application.
- Control: The control mechanism allowed parts of the application to be deactivated, freeing up resources.
Limitations and Future Work
- Limitations:
- The current implementation of FlowVR primarily provides C++ bindings, with plans to support other languages in the future.
- While the paper demonstrates the effectiveness of FlowVR, the complexity of the "most complex application" mentioned (integrating 50 modules) is not fully detailed due to its scope.
- Future Work:
- The authors anticipate building public libraries of modules and filters.
- Ongoing work focuses on a library dedicated to image handling.
- The development environment is noted as being adapted to handle complex codes from external sources (like VR Juggler and rigid body simulations).
Summary updated