In recent years, numerous extended transaction models have been proposed to address requirements posed by advanced applications [Elm93]. A few of these models have been implemented as prototypes, but most remain mere theoretical constructs with no practical implementation [Moh94], and none are being used in a commercial product. We believe the main reason for this state of affairs is that the interface and functionality of commercial transaction processing (TP) monitors is ``locked in'' to a fixed transaction model, making it difficult, if not impossible, to readily use them to implement new extended transaction models. We have found [BP95], the problem is not due to an inherent inadequacy of modern TP monitor functionality, but rather lies with the visible aspects of the underlying implementation not permitting access to the required functionality. In this paper, we describe an approach to apply reflection to a commercial TP monitor to ``open up'' the interface and underlying functionality so that extended transaction models can be implemented.
We have introduced the Reflective Transaction Framework [BP95] as a practical method to implement a wide range of extended transaction models on a commercial TP monitor. The design of the Reflective Transaction Framework is based on the principles of computational reflection [Mae87], and in particular the Open Implementation approach [Kic92]. In the Reflective Transaction Framework, reflection is realized using transaction adapters, which are software modules layered on top of the TP monitor. Transaction adapters build on the available functionality of the TP monitor to the extent possible to provide the programmer with a clean meta interface through which they can customize the TP monitor. Transaction adapters effectively open up aspects of the legacy TP monitor functionality that are often hidden, so that programmers can explore alternative transaction models implementations and new application interfaces according to the specific requirements of their application. All without changing the code of the legacy TP monitor. To demonstrate the practicality of our approach, we have implemented the Reflective Transaction Framework on top of the commercial TP monitor Encina [Cor91].
We believe the Reflective Transaction Framework represents a new application of reflective concepts. Unlike classic reflective systems, such as CLOS [BGW93] and 3-LISP [dRS84], the Reflective Transaction Framework applies reflection to a legacy TP monitor written in a non-reflective programming language. While the TP monitor already provided a rudimentary open implementation through a transaction event facility and an interface to adjust system functionality, the state of application transactions and functional aspects of the TP monitor were opaque to the user at the application level. We have applied reflection to reify selected aspects of TP monitor functionality and transaction state and execution behaviors into distinct objects, and constructed a coherent, easy to use, open implementation with explicit mechanisms for users to express application-specific requirements to the TP monitor. Concretely, the Reflective Transaction Framework demonstrates the practicality and usefulness of this new application of reflection to incrementally extend a legacy TP monitor [Bar96]. This approach also enables the reuse of available legacy functionality, which has obvious economic advantages. Another, more pragmatic contribution, is that the Reflective Transaction Framework presents the first practical method to implement a wide range of extended transaction models [BP95] and semantics-based concurrency control protocols [BPZH95] on an industrial-grade TP monitor.
This paper deals mostly with the ability of the Reflective Transaction Framework to perform reflective computation and the extent to which the legacy TP monitor supports this computation, and leaves performance issues to a companion paper which is in preparation. The remainder of this paper is organized as follows: Section 2 provides background and motivation for our approach. Section 3 presents the Reflective Transaction Framework, and discusses how reflection is implemented on a legacy TP monitor. Section 4 illustrates the implementation of an extended transaction model using our framework. Section 5 discusses details pertaining to the implementation of the Reflective Transaction Framework. Section 6 presents a comparison with related work, and Section 7 concludes the paper.