next up previous contents index
Next: Design of a Up: Object Streams Previous: Differences from the

Object Reification

The use of objects as application data units causes the dynamic creation and destruction of a very large number of media element objects. The basis of the internal state of these objects is a piece of memory that is the result of the activity of a sampling device or the network subsystem. But in a pure ``objects-only'' system a piece of memory is an unknown concept. This leads to the question: how can a piece of memory be made accessible as an object?

Husemann [Hus96, S. 4,] describes how both individual media elements, which he calls  chunks, as well as whole data streams can be turned into chunk objects and multimedia object streams, respectively. He names this technique  object reification.

 The aim of reification in general is to make a foreign concept of a higher or lower level visible on the current level of perception. This mechanism is classically used to achieve  reflection, that is the modification of an object's attributes, which are normally not visible and accessible at the level of the object itself. These concepts or attributes comprise for example inheritance, class membership, storage, or existence.

The work of Husemann is embedded in the PM projectgif. In the PM object model, objects that exist on a meta level implement abstractions for the objects of the corresponding base level. Reification is achieved by the  projection of meta-level objects into the base level. Because of PM's homogeneous object model, the projected meta objects are accessible through the same method invocation interface as normal base-level objects. The interaction of real base-level objects with projected meta-level objects is called  meta interaction.

Projecting pieces of memory, which exist on the operating system meta level,gif into the base level yields reified chunk objects, hence the term object reification. The ingredients [Hus96, p. 82,] of a reified object are a chunk and an incomplete base-level object, which contains the necessary pieces---for example class and method information---to complement the chunk and to form a complete object.

Object reification is very similar to the instantiation of new objects: both operations take place on a meta level, both need a description of the classgif of the object to be created, and both introduce a new object on the base level. However, object reification works differently from object instantiation during the following steps of the respective operations:

To keep the variable binding simple, Husemann suggests that only PM chunk objects can be reified from chunks. The reified chunk object can, if necessary, behave like an object of another type by means of  algorithmic type adaption. Through algorithmic type adaption, a chunk object can behave like a video frame object, for example. Glue code must be specified, which describes how the methods and variables of one type are mapped to the respective ones of the other.

In contrast to PM's object-model language ALCAIDgif, common hybrid object-oriented programming languages---such as C++ or Java---do not support mechanisms such as algorithmic type adaption or reifying projection. In compensation of these shortcomings, other features of these languages can be exploited:

C++.
  C++ is a hybrid language. As a consequence, it includes primitive data types in addition to first level objects. In particular, C++ facilitates direct access to memory regions by treating pieces of virtual memory as arrays of 8-bit characters. Pointers to memory regions and arrays of elements of any type are also primitive data types.
The ``equivalent'' of object reification consists of initialising a pointer in a chunk object to the address of the piece of memory that contains the chunk's media data. Further start-up operations can include the initialisation of some state variables by interpreting the contents of the chunk, for example by extracting a sequence number or media type information.
Java.
  Java includes the primitive data type byte. However, arrays of elements of any type or class are first-class objects. Pointers or memory addresses of arrays are not accessible. Programmers cannot influence the object reification mechanism: a reifying projection is done by the Java runtime system only at the instantiation of a byte array, but the result is always a reference to an array object consisting of the specified number of bytes, which are all initialised to the value 0.
In an application based on the object-stream model, byte arrays are filled with media data by source objects, for example by socket objects or objects representing hardware devices. Chunk objects offering more functionality or additional state variables are reified, that is initialised, by storing a reference to a byte array object in an internal variable and executing some start-up code.



next up previous contents index
Next: Design of a Up: Object Streams Previous: Differences from the



tspeuker@cip.informatik.uni-erlangen.de