a commercially-available object-oriented database management system. In ... and furthermore, the process of executing the simulation can be thought of as.
Object-Oriented Database Technology Applied to Distributed Simulation P. Heywood, G. MacKechnie, R. Pooley and P. Thanisch Department of Computer Science, University of Edinburgh King's Buildings, May eld Road, Edinburgh, EH9 3JZ Scotland Abstract
There are several ways in which object-oriented database technology can be harnessed to assist in the implementation of simulation packages. We have already integrated our own simulation environment, HASE, with a commercially-available object-oriented database management system. In particular, we use the database system's transaction processing and object persistence facilities. We are currently extending the HASE simulation environment so that it can exploit distributed computing facilities by using the distributed client/server architecture of the object-oriented database system. We are taking this approach in order to parallelize an experiment rather than an individual simulation run.
1 Introduction For some time now, the developers of process-based, discrete-event simulation packages have been aware that there may be advantages to be obtained by using database technology in their products. As simulation experimenters become increasingly ambitious in what they attempt to simulate, the underlying simulation model's complexity warrants the use of principled data modelling in its design [1] and furthermore, the process of executing the simulation can be thought of as query driven [4]. It is only recently, however, that database technology and simulation package technology have converged suciently that the advantages of incorporating a database system into a simulation package have become more tangible.
To whom correspondence should be addressed.
1
The impetus for the convergence has been the C++ programming language. On the one hand, several simulation packages are available in the form of C++ class libraries. The package user writes a simulation model as a C++ application which inherits simulation facilities from this class library. On the other hand, object-oriented database management systems (OODBMSs) provide persistence for C++ objects. It was this property that rst led us to re-engineer our own simulation system, called `HASE' (Hierarchical Architecture Simulation Environment), so that HASE now uses an OODBMS. Having gone through this re-engineering exercise, we have now come to realise that other OODBMS features, such as concurrency control and distributed client/server architecture, can also be exploited to advantage. In this paper, we describe our work to date on exploiting OODBMS functionality in HASE, and our plans for further exploitation of OODBMS technology. Before describing our simulation environment, we give a brief overview of object-oriented database systems.
2 Overview of Object-Oriented Database Systems HASE uses an object-oriented database management systems (ODMS) called ObjectStore [5]. ObjectStore is a multi-user, distributed object database with a C++ class library interface. It provides a persistent storage facility for objects denoted by C++ program variables. C++ programs can retrieve persistent objects (possibly created by other programs) into their program variables. ObjectStore controls concurrent access by multiple users or processes and allows control over the physical location of data. In ObjectStore, persistence is independent of type. Objects of any C++ data type can be allocated transiently (on the ordinary heap) or persistently (in a database). The classes of persistent objects may contain pointers, virtual functions, multiple inheritance, etc. Different objects of the same class may be persistent or transient within the same program. ObjectStore has a client/server architecture. The persistent storage is on the servers and an individual application executes on a client host machine. If every database operation required a signi cant per-operation overhead cost (such as the cost of sending a network message), performance would be unacceptably slow. In order to manipulate stored data at an acceptable speed, ObjectStore's designers have attempted to provide ecient mechanisms for pointer dereferencing (which allows object traversal), locking, network access, data caching and disk access. Typically, pointer dereferencing is the most important factor aecting performance in complex object management applications. Given a pointer or a reference to an object, which may be in the program's memory space or in the database,
ObjectStore attempts to minimize the overhead incurred when \dereferencing" the pointer, i.e. obtaining data from the object. Typically, in many applications the \next" user of a data item is actually the same as the \last" user. To exploit this tendency, ObjectStore provides a caching mechanism that allows a user to re-access previously-retrieved objects without incurring the overhead for re-fetching and re-locking. This is done by caching the data at the client workstation. Of course, there has to be a mechanism for ensuring consistency in the case that several users wish to access the same objects. ObjectStore databases are updates and accessed by transactions. A transaction is an abstraction of change in which individual modi cations to the database are aggregated into a single large modi cation that appears to occur either entirely in a single moment or not at all. ObjectStore guarantees that each transaction sees a consistent state of the database, even though there are other transactions executing concurrently.
3 The HASE System HASE allows for the rapid development and exploration of computer architectures at multiple levels of abstraction. Within HASE there are graphical entity design and edit facilities, entity library creation and retrieval mechanisms, an animator, and statistical analysis and experimentation tools based on [6] for deriving system performance metrics. The current version of HASE has been developed with object-oriented design methodology using a combination of C++, ObjectStore [5] and the simulation language Sim++ [7]. The graphical user interface to HASE is implemented in a blend of X-Windows and Motif. For each each architecture model to be simulated within HASE an Architecture Description must be created. For example, a multiprocessor array description consists of a collection of Processor, Memory and Interconnection Network entities. Each entity is an object consisting of an instance name, an icon, a textual description, a list of its parameters, and a list of ports. To create the architecture description, the desired entities are linked together to form the system. Entities can either be selected from a library, or could be custom-made. Each entity's behaviour is described in the corresponding (user supplied) Sim++ method, \body". When complete, the architecture description is compiled to produce the simulation code for that system. HASE provides mechanisms for running test software on the model architecture during the simulation. The form of the test software ranges from user supplied assembly language routines to HLL code linked together with the simulation code. The HASE Animator is is useful for verifying the validity of the architecture model after single simulation runs, i.e. getting the bugs out. Once the design is stable, entity parameterization allows for ne-tuning without reconstruction
through experimentation. For a detailed presentation of the full functionality of HASE, the HASE User Guide is viewable on the Web at .
4 Database Organization Each HASE user maintains a personal \startup" le containing environment variable de nitions for the default library databases and the user speci c project directory containing subdirectories for all individual projects. An unlimited number of project databases can exist, each holding a number of projects. Similarly, an unlimited number of personal entity libraries can exist in addition to the public HASE entity library. The limit on the number of projects within a database is dependent on the size of the project and the amount of persistent address space in use. A project in HASE is the collection of all entities, ports, links, parameters, etc. that make up the simulation model and the set of all experiments performed on the model. The database not only stores the results of each experiment, but also maintains their relationship to the state of the architecture model that produced the results, including all input and output parameters and their values during the experiment. Libraries in HASE are repositories for pre-designed (and pre-tested) entities which can be archived to a library for shared or later use or retrieved from a library for inclusion in an architectural model. The HASE Entity Library is a global read-only library and the User Entity Library is a user's personal catalogue of entities. The design of a HASE Entity Library corresponds to the dierent levels of abstraction for the archived entities, e.g. PMS or RTL. An entity's hierarchy can be easily perused from within the library and can be included in the architectural model at various levels.
5 Use of OODBMS in HASE The use of an object-oriented database management system within HASE was a retro- t to the existing version of the tool. Very little redesign was undertaken. There was a natural correspondence between the existing design and the remapping into collections, lists and sets of related objects. All objects comprising the Architecture Description are stored persistently within the database. This includes all entities, ports, links, and parameters. To improve performance related objects and collections are placed on the same segment/cluster. However, because behavior of the simulation model is supplied by the user and not internally generated by HASE, the Sim++ \body" method is kept externally, as is the Sim++ generated \trace le". Any additional informa-
tion needed by the Sim++ compiler (initialisation routines, header les etc.) is generated by HASE from persistent objects at compile time. The nested transaction design and processing within HASE coincides with Motif Style Guide Quit/Save guidelines. That is to say that all functions in HASE are logically grouped together in a tree like structure, under various selection mechanisms (buttons etc.), each of which may decompose into further selection mechanisms until changes, additions or deletions are made to the database objects. At any step in the process where database objects may be created, deleted, derived, or modi ed in any way, the operation must be con rmed by pressing an Ok button. On the other hand, each such operation is also provided with a Quit button to discard any changes made to the database objects. This also includes the entire HASE session itself where all changes made since the last Session Save operation can be saved again or discarded. This partitioning of operations into functions delimited by quits and saves of database objects became the bounds for nested transactions within HASE and we have fully exploited the OODBMS rollback mechanisms for this purpose. That is, a \quit" triggers a Transaction Abort and a rollback to the persistent state at the previous transaction level and a \save" signals Transaction Commit. Any \commit" from a nested transaction is always overridden by an \abort" in an outer transaction. It is then the outermost transaction (Quit/Save) that determines whether data is kept or discarded for that entire session. We are able to use ObjectStore's client/server architecture by storing the persistent objects and the statistics associated with a simulation experiment on a server host. We have separate simulations running concurrently on client hosts. These applications update the results database with the output parameters from a simulation run, and check if a control process wants them to continue with more replications of the current set of input parameters or whther a new set of input parameters is to be obtained for the next stage in the experiment. The controlling process interrogates the results database and performs statistical tests to check on the progress of the experiment.
6 Conclusions It is our belief that the use of object-oriented database systems greatly facilitates that development of simulation packages. The notion of a transaction, concurrency control and the client/server architecture do not have to be re-invented. This can simplify the development of the package and reduce maintenance costs. The next stage of the HASE project will be to investigate the use concurrency features within the OODBMS as a means of controlling a parallel simulation run. Future plans include adding query facilities to the metrics gathering tools within HASE. At the moment, the use of queries is limited to internal collection processing. Ongoing work includes data modelling within HASE. With tailored
versioning, HASE maintains a one-to-many relationship between a project and the experiments performed. For a \baselined" version of a simulation model, several experiments with various parameters can be performed so a more nely grained versioning maintains the relationship between the inputs, the architectural model and the outputs.
References [1] P. Beynon-Davies and A.R. Hutchings. Modelling and databases. European Journal of Operational Research, 64, pp. 327-337 (1993). [2] P.W. Glynn and P. Heidelberger. Analysis of Parallel Replicated Simulations Under a Completion Time Constraint. In: ACM Transactions on Modeling and Computer Simulation, 1, 1, pp. 3-23 (1991). [3] P. Heywood, R.J. Pooley and P. Thanisch. Object-Oriented Database Technology for Simulation Environments. In: The Conference of the United Kingdom Simulation Society (UKSS95), North Berwick, Scotland, 19-21 April, 1995. Volume II, pp. 1-4. [4] J.A. Miller and N.D. Grieth. Performance modelling of database and simulation protocols: design choices for query driven simulation. In: 24th Annual Simulation Symposium, New Orleans, (A.H. Rutan, ed.), pp. 205-216, IEEE Computer Society Press (1993) [5] \ObjectStore Release 3.0 User Guide", Object Design Incorporated, Burlington, MA, December 1993. [6] R.J. Pooley, The Integrated Modelling Support Environment a new generation of performance modelling tools, Computer Performance Evaluation Modelling Techniques and Tools, Elsevier Science Publishers, 1991. [7] \Sim++ User Manual", Jade Simulations International Corporation, Calgary, Canada, 1992.