ExecutionEngine DataTypes
Overview
The two main execution pillars of the ExecutionEngine are invocations and data. This section covers the later. The ExecutionEngine supports a number of commonly used data types inherently and provides abstractions to cover all non primitive ones. These supported data types are covered in the following sections.
The direction followed by the ExecutionEngine aims to solve the following problem. In the context of a distributed environment that cannot afford to create a canonical data model perfectly defining the full range of transfered messages, there must be a way to describe the data moved without binding them to specific classes, packages or even schema. But still the way of capturing the data must contain enough information to be able to reconstruct the needed structures populating them with the stored values.
Supported data types
- BooleanClass
- A boolean object type (java.lang.Boolean)
- BooleanPrimitive
- A boolean primitive type (boolean)
- DoubleClass
- A double object type (java.lang.Double)
- DoublePrimitive
- A double primitive type (double)
- FloatClass
- A float object type (java.lang.Float)
- FloatPrimitive
- A float primitive type (float)
- IntegerClass
- An integer object type (java.lang.Integer)
- IntegerPrimitive
- An integer primitive type (int)
- String
- A String object type (java.lang.String)
- ResultSet
- An IProxyLocator type capable of identifying a result set
- RecordStore
- An IStoreLocator type capable of identifying a result set that is stored in some record store
- Convertable
- A type capable of storing information on a type that is not directly supported but can be transformed into a string serialization from an object and then back into the object using some converter object
- Reflectable
- A type capable of storing information on named data types that can be used to populate or be populated from an object that follows the generic get/set pattern on member variables of the respective names
- Array
- A multidimensional array of one of the above types
Highlights
- Wrapped and unwrapped types
- The reason of having for primitive types also the wrapped version of them (Integer primitive and integer Class), is mainly due to Java's reflection API and the way these Java types are distinguished from one another. So should for example part of the execution plan needs to make a call to some Java object's method through reflection, then the exact type as defined in the signature of that method must be available. If the method's signature requires an int and it is provided with an Integer, an error will occur.
- Convertables
- This Data Type category provides the biggest flexibility concerning the value that can be passed to an element invoked by the ExecutionEngine or returned to it by an invocation when the involved invokable is a POJO. But this also comes with the toll of having to produce the respective Converter utility for each object that will be passed back to the ExecutionEngine or be delivered by it. And this Converter utility will have to implement an interface that is defined by the ExecutionEngine library meaning that the portability of the package is hurt. Even so, the capability is offered in cases where portability is not of great importance.
- Refelctables
- This Data Type category provides the largest generality without binding the client implementation to any execution engine libraries. As most of the types passed as arguments or are returned as results mainly act as containers of other primitive types, this utility offers the possibility of abstracting over these objects through the means of the regularly used get/set methods. An object returned by a client class invocation is scanned through reflection and the getters and setters found dictate the member values it offers. These values are then extracted through the respective getter method and are stored under the name that joins the get and set method (e.g. for int getX() and setX(int x), the common name is X). Respectively when populating an argument, the getters and setters are retrieved and wherever the common name matches one of the names available through the reflectable data type as well as the type, the setter is used to set the payload needed. This scanning can work recursively to sketch a very deep level of encapsulation. This Data Type in conjunction with the Array data type can cover most of the foreseen common usage scenarios.