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 project. 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, 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 class 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 ALCAID, 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:
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
.