|
Cyberspace EngineersEngineering Cyberspace!
|
|
Consensus: A Scalable Interactive Entertainment System Crosbie Fitch Pepper’s Ghost Productions Abstract The design of a scalable system to support networked, interactive, virtual environments is presented, which forms the basis of work in progress to produce Consensus: an active, object oriented, distributed database, optimized to support simultaneous and interactive exploration of indefinitely large virtual worlds by indefinite numbers of Internet users. Data comprising objects within the virtual world are continually distributed between computers, not only in order that they may share in simulating the virtual world, but also that they may independently and scalably, model and render scenes in view of virtual characters. Although objects are widely replicated, a single instance will override other instances, effectively providing an arbitration scheme. There is a continuous process of reallocating responsibility for the processing of these arbitrating instances based on which computer is most suited to the task. Computer relationships are continuously revised to optimize the distribution network. UDP/IP & MBone are used for distributing data. Bandwidth is maximized by accepting any messaging failure and consequential loss in object integrity given that inconsistencies arising are expected to evaporate quickly with frequent updates. This is considered acceptable given the system's intended application to large scale interactive entertainment with its priority of low latency interaction over accuracy. CR Categories and Subject Descriptors: C.2.4 [Computer-Communication Networks] Distributed Systems - Distributed applications, Distributed databases; D.1.3 [Programming Techniques]: Concurrent Programming - Distributed programming; H.2.4 [Database Management]: Systems - Distributed databases, Object-oriented databases; I.3.7 [Computer Graphics]: Three-Dimensional Graphics and Realism - Virtual reality; I.6.8 [Simulation and Modeling]: Types of Simulation - Distributed. Additional Keywords and Phrases: Large Scale Interactive Entertainment, Large Scale Virtual Environments (LSVE), Distributed Virtual Environments (DVE), Distributed Interactive Simulation (DIS), Massive Multiplayer Games, Networked Virtual Reality, Active Distributed Object Oriented Databases, Online Entertainment, Computer Supported Collaboration. 1 Introduction1.1 The ObjectiveTo build the foundations for cyberspace, and to have them last well into the next century, entails the following: · A system that allows the simulation of indefinitely large scale virtual worlds supporting simultaneous, interactive exploration by indefinitely large numbers of users, e.g. the Internet population. · A system sufficiently scalable and flexible that its evolutionary development can keep pace with the ever increasing technical capabilities and demands of networks, users, and their equipment. · Very efficient and highly fault tolerant use of networks such as the Internet. · Competitive in performance terms with first and second generation systems such as those based on the US Department of Defense's DIS/HLA infrastructure [12]. 1.2 The problems1.2.1 Latency Now and in the FutureWith Moore’s law appearing to govern memory/storage, processor power, and bandwidth, and Parkinson’s law appearing to govern users, traffic, and application size and complexity, one can also observe that latency appears to obey the same law that governs average city traffic speeds, and perhaps from this, one should estimate a worst case scenario where we can expect no significant improvement in latency for years to come, just as there has been no significant improvement in London (UK) average traffic speeds over the last two centuries, nor any foreseeable [6]. 1.2.2 The Need for ScaleThe best demonstration of the attraction of large scale virtual worlds, is the real world. A virtual world that approaches the depth and size of the real one is likely to be similarly popular. The best virtual worlds will offer players large amounts of freedom and provide attractive opportunities, to explore, create and interact. Large scale means a scaling by the same order of magnitude as the number of users with Internet connections. 1.2.3 Challenges of ScaleA large scale virtual world will be too big to launch in one go, too big to shut down or recall, and too big to develop wholesale. The entire system must support live content development, live update, and uncoordinated system upgrade. There can be no bottlenecks and scalability is required at all levels: from 4 to 4 billion. We need a simple design, such as a distributed system based on modular system components (supporting piecemeal development), and all on an affordable budget. 1.3 The SolutionOpportunities for solutions to these problems naturally lie across a variety of areas. Improvements can be made at the network level, e.g. the transport layer taking responsibility for determining the best way to deliver messages (whether multicast via wire, or broadcast via satellite). Improvements can also be made at the rendering end, e.g. texture and geometry compression may well result in lower bandwidth consumption and storage overhead. However, the only areas addressed in this paper are the application, the scene modeler, and the world simulation. The Consensus system is only concerned with the last of these, as it is the key area in which a scalable system must focus its energies. Any improvement in any other area will only contribute positively to the performance of the overall system. Let us first briefly touch upon the need to realize that applications cannot be designed without consideration to latency, and then highlight the way the virtual world is presented to a user via an intermediate scene model and why this should be separate from (and only needs to be an interpretation of) the model used by the world simulation. 1.3.1 Application Design StrategiesUntil we discover instantaneous communication, latency (including jitter) will always be a factor in networked applications. This means that whatever tricks an underlying system can perform or facilitate, the application must still take a large part of the burden of ameliorating the effects of latency. Application-side approaches to latency are relatively well known, so here is a rather brief list: 1. Separation Do not map player controls to an avatar 2. Incorporation Build delay into controlled objects (inertia, arming period, etc.) 3. Prediction If it can be predicted, it doesn’t need communication 4. Explanation Depiction of mist, deafness, indecision, etc. 5. Delegation Employ AI avatars or other players to act remotely 6. Avoidance Don’t let distant players meet 7. Planning Communicate future changes before they are to happen 8. Hiding Produce feedback from accumulation of actions rather than each one If the application is to play its part in ameliorating latency, whatever underlying system is used must present enough information and facilities for the application to achieve this. However, this must not be in such a complex manner that an application programmer has as hard a task as the systems programmer. This tends to indicate that the underlying system should appear as transparent as possible, i.e. applications may be implemented as though destined for a single user system, but facilities are provided to program latency ameliorating strategies in relatively high level terms (where default behavior is inadequate). 1.3.2 Scene IndependenceBefore going any further, we should be careful to delimit the task of this networked system: it is only concerned with simulating a virtual world and presenting this consistently to an indefinite number of computers. As can now be explained, we reduce the communication volume considerably if we restrict ourselves solely to simulation of the essential and salient features of this virtual world. Although most will be familiar with the benefit of separating appearance from behavior (texture and geometry separate from object, identifier and attributes, velocity say), this separation can be extended further and perhaps subtly so. The scene is only necessary for the user to sense and interpret the virtual world, and it may well have far greater fidelity. The virtual world need only be described in quite high level (and thus concise) terms, e.g. 'An aircraft carrier at sea on a stormy evening, bearing NW, at 15 knots, etc.'. As long as a scene modeler can interpret this description into a high fidelity, local simulation then it doesn't really matter if different users have slightly different textures, geometry, telemetry, or fluids and physics models, etc. Their verbal descriptions of the scene will still agree. While, across poor communication links the Consensus system may provide a rough and jerky sketch of the world, it will at least be universally consistent. It is the scene modeler's job to present this as elaborately as system resources allow and with as few discontinuities as possible. Though it may be as simple as depicting a corresponding portion of the world model verbatim, separately modeling the scene allows future scaling of this process without requiring the simulation fidelity to scale. 1.4 The Consensus SystemSome discussion now follows of the guiding principles and reasoning behind the design of the Consensus system. 1.4.1 BasisThe basis upon which Consensus has been designed is to assume that latency will not change, whereas all other capabilities although restricted, will increase. Starting with the notion of unlimited storage, processing, bandwidth, and zero latency, any solution is possible, e.g. brute force client/server. The moment you introduce significant latency, all solutions gravitate towards a requirement to cache information and perform local modeling (if only predictive computation). This seems to strongly favor a distributed system solution. Of course, given that storage, processing, and bandwidth are also limited, these need to be utilized efficiently as well. 1.4.2 Latency AmeliorationHere are some of the guiding principles adopted in Consensus: · Minimize transmission, no guarantees for message ordering, no message recovery · Communicate high level information first; detailed, lower level information last · Communicate important information first, unimportant last · Cache as much as possible (duplicate data) · Predict as much as possible (duplicate modeling) · Model the most critical objects often; least critical, least often · Favor communication with peers having similar interests · Prefer communication with closest equivalent peers (minimize network distance) · Keep variable data closest to those that change it the most · Take advantage of network broadcast facilities, e.g. MBone · Make the system flexible, allow it to dynamically reconfigure as its nodes change (or fail) · Continue to design applications with latency in mind 1.4.3 DedicationIt is important to keep the system focused on its objective and avoid taking advantage of its facilities for ancillary tasks. So Consensus is singularly concerned with the need to model the virtual world and makes no attempt to model aspects of the real world, i.e. user parameters, administration, or software configuration. So, in the same way that there is a separation of the scene from the world, so there is a separation of the virtual world from the real one. 1.4.4 Fault ToleranceIt's a dangerous and unpredictable world out there, and the Internet is no different. Any system, particularly a distributed one, must be highly fault tolerant. · Entire system based on uncertain, best effort delivery (UDP) · Latest data is more important than reconstructing message ordering, i.e. the more rapidly state is updated the sooner artifacts will evaporate. · Disconnection is likely, data corruption is probable · All nodes are subject to failure, all nodes must be fault tolerant · Continue in the face of catastrophe · Continuous monitoring of local system integrity (primary security measure) · This is entertainment – perfect replication and consistency is not necessary 2 RELATED WORK2.1 Systems in ProductionThere are various companies, network, and premium service providers, such as TEN[1], MPATH[2], Wireplay[3] [17], that provide network and/or software platforms that facilitate and improve multi-user 3D games (among other things). However, they appear focused on the current and immediately forthcoming market for small to large (10-1,000) multi-player 3D games as opposed to truly scalable systems. The US Department of Defense is probably the most successful pioneer of distributed interactive simulation systems, notably its SIMNET [4] system, its DIS and HLA protocols [12], especially in terms of working product. However, as one might suspect, these require considerable development resources and high performance systems in order to be used effectively. In addressing such concerns, DIS-Lite [19] has been developed. Although, a promising candidate for the next generation of large scale interactive entertainment, DIS-Lite still places a large burden on the applications developer in terms of the level of awareness they must have concerning the intrinsic problems of distributed interactive simulation. That Consensus recreates the single user 'game engine', but in a transparently distributed form, should give it an advantage in this respect. 2.2 Distributed SystemsThere are a variety of distributed system approaches to the development of large scale virtual environments and Consensus is no stranger to many of the techniques they use. Probably most similar to SPLINE [1], especially in its aims to be scalable, Consensus goes further in supporting multiple worlds and having a more general and dynamic solution to the problem of managing communication and interest relationships between objects than SPLINE's Locales and Beacons [2]. Repo [13] and COTERIE [15] are other excellent systems from which to explore this field further. Based on these, Repo-3D [14] is a fairly recent application of a distributed system approach to the task of replicating a 3D scene (especially an Inventor style scene graph). In contrast to this, Consensus only focuses upon the larger problem of distributing a virtual world. The presentation of the scene then represents a small portion of the task, and so, instead of attempting to replicate the scene as in Repo-3D, Consensus deliberately abdicates responsibility, allowing a scenic interpretation of replicated application state to be freely represented (by a separate client-side, scene modeling system). Furthermore, in order to obtain maximum performance, as is inevitably required by developers of interactive entertainment, Consensus has been designed and developed from the ground up. Primarily targeting Windows based systems, it uses COM [16] for modularization purposes rather than Modula 3 [8] (C++ is used for implementation). Thus critical features such as those of distribution languages such as Obliq [5] and toolkits such as Network Objects [3] are re-implemented - incidentally providing opportunities to streamline the system's implementation. Consensus can be seen as a distributed system at the extreme end of an integrity/performance graph, i.e. towards low integrity/high performance. This means that Consensus has virtually no guarantees of message sequencing, causality, object integrity, transactional integrity, or even delivery - it is only a 'best effort' system. This need to sacrifice integrity for the sake of performance is also evident in other distributed systems aiming for real-time performance such as DOVRE [18]. As long as the end result tends to be consistent and well behaved, then it should be sufficient for entertainment applications. In comparison with other research efforts, Consensus is probably best seen as a case study, with the rest of this document describing its design and issues arising out of an attempt to put distributed system theory into practice. 3 System OverviewConsensus is effectively the back-end of the system, containing and simulating models of a variety of virtual worlds (or universes). Communicating with this is the Scene Modeler application which expresses interest in, and effectively attaches itself to, an avatar within the virtual world. The Scene Modeler consequently also has an interest in what this avatar can sense (or affect) and interprets this into a presentation to the user via a 3D renderer, audio and other devices. Conversely, the Scene Modeler also conveys the user's input (commands, control manipulations, etc.) to the representation of the avatar, and via this to the avatar itself. There is a separate administration system (Figure 1).
Figure 1: Local application interacts with distributed database, both administered using client/server system. 3.1 Scene ModelerFor one or more Consensus worlds, there may be one or more scene modelers (or other applications) that understand and may interact with them. To interact with a virtual world requires special knowledge of it, and of various classes and objects composing it that are designed for interaction by a scene modeler. The scene modeler is well suited to an implementation based on a variety of next generation game engines such as Motion Factory's Motivate product [11]. 3.2 Consensus - Distributed SimulationConsensus shares the burden of simulating one or more virtual worlds between all participating computers, each of which is fundamentally a peer, yet also observes a dynamic, hierarchical responsibility structure according to capacity and performance. Thus the task of simulating the virtual world is shared across an interconnected network of computers (nodes of the network), many of which will be those of the participants (users). Each node has a finite amount of storage in which to store a portion of the data defining the virtual world. Each node strives to contain as much data as possible that is relevant (or potentially so) to its users, prioritizing the most important data. In order to do this, a node will locate nodes that contain the required data and the most up to date versions as possible. Each node therefore continuously changes its relationships so that it communicates directly with other nodes sharing the same interest. Thus each node may serve many other nodes' requests for data, but this is carefully managed so that the communication burden is balanced according to ability. Ultimately it is the user's avatar expressing the interest, acting as though it is a magnetic force, attracting relevant and interesting data into the local database. The Consensus system software is comprised of a single set of modules, and this set is duplicated on each participating computer. Every computer shares in all tasks - there is no system whereby some computers are dedicated to one task and others to another. This is because each module is scalable, taking advantage of whatever resources are available. Of course, it may well turn out that some computers with low resources will perform some tasks to a very limited extent, but this division of labor is achieved automatically and continuously. Having a single set of modules makes the entire system much easier to manage. 3.3 System AdministrationSome things do require secure, high integrity systems, and systems administration is best suited to these. This component, produced using tried and tested technology, co-ordinates the system software (installation, upgrade, licensing, diagnostics, etc.) and controls user access (lobby service, charging, privileges, etc.). 4 The ProjectConsensus is an active, object oriented, distributed database system designed to support massive multi-player games, i.e. large scale interactive entertainment. It is intended to be used in a similar way to a conventional game engine. The project is currently on hold until such time as funding becomes available to continue. However, it was considered that the experiences obtained in the project so far are worth disseminating if only to provide other implementers with food for thought. In order to understand how Consensus evolved there follows a list of a few brief notes about the project. 4.1 Implementation MethodologyOne of the primary principles in developing Consensus was to address one of the common issues with game engines and that is ease of use. Many games development houses have limited resources, and would appreciate a fairly transparent API, i.e. that the system appears as a local database and games engine. It is also important that we keep our own workload manageable so that development of Consensus doesn't grind to a halt under the weight of its own complexity. This means dividing the work into bite sized chunks or software modules (Figure 2): · API for interface with the Scene Modeler application, · Process Manager (for executing behaviors), · Event Manager (for scheduling behaviors and state machines) · Object Database (based on simple database), · Simple Database (based on 3rd party engine), · ID Broker for creating locally and globally unique ids for elements, · Communications (publishing & subscribing to changes), and 3rd party components wherever appropriate: · Rendering: Microsoft Direct3D · Scene Modeling: Motion Factory Motivate · System Modularization: COM · Operating platform: Microsoft Windows · Back-end database: FairCom C-Tree · Communications: UDP, MBone/Multicast
4.2
|