Description
CDL provides a number of specific mechanisms for handling data in distributed parallel environments. Transient store data objects, as the name implies, are destructively 'read', and in many cases provide an equivalent of conventional stack data. Arbitrated store data objects on the other hand are persistent, and provide an equivalent for file scope and static data. Active objects (threads, call-backs, methods and circuits) can all own 'workspace' data objects which are also persistent, and in many ways provide an equivalent of thread specific data. Methods can also own 'state' objects, which are similar to workspace objects, but in the specific case of 'slave-able' methods, which can be scheduled to execute on any CPU, the state data object is automatically moved to whichever machine executes the method instance.
In all cases, data objects have two components. The first of these is the 'data' component itself which is referenced and managed by the second 'reference' component. The data component can contain native pointers and references but these will not be valid when data objects are moved between machines, and are unlikely to be valid in asymmetric memory environments. They can be used however to reference objects within the data component but will need to be 're-linked' each time their owning store is opened for read. This approach is often used to implement variable sized multidimensional arrays that require time critical access.
In the case of store data the reference component is referred to as a 'record' and is actually just a pointer and status word with a number of member functions. Active objects can own 'workspace' objects, and methods can also own 'state' objects. These are described in more detail below.
The main reason for this separation is that CDL data objects exist in virtual shared memory (VSM) and so the reference object and the definitive copy of its data might be in different machines; but if it is to be portable, the application must not make any assumptions about process topology. The reference component insulates the application from the details of CDL's VSM implementation. It also provides a standard set of functions that allow the runtime to transparently move data between machines and hide details of the network's topology from the application. In all cases CDL applications see their data objects by reference regardless of the location of the definitive object; data is only moved if necessary, and then only once.
In order to implement 'distributable' user data objects there are a number of conventions that need to be adopted and these are described under the following topics;
This topic describes data components and is relevant to store, state and workspace data objects.
This topic describes store records and is relevant to transient and arbitrated stores.
This topic discusses state and workspace objects and is relevant to call-backs, methods, threads and circuits.
Pseudo Implicit Types
These are provided for convenience and to reduce dependency on machine word sizes. They do not have to be adopted by the application.
The following types are defined for 32 bit platforms;
Uns
32 bit unsigned integer.
Int
32 bit signed integer.
Char
8 bit signed character
Uchar
8 bit unsigned character
Float
32 bit floating point
Double
64 bit floating point