Reflection
Technology used for this project was developed by Ian Welch.

In order to receive the benefits of building systems at run-time from components and middleware whilst ensuring that the resultant applications are robust we need a method of adding run-time components to the framework safely at run-time.

A promising approach is to wrap the components with a layer that implements the desired new effects/ this layer captures events or messages that pass between the environment and the component and either masks them in order to enforce behaviour.

What is required is a structured and principled method of specifying this wrapping. Metaobject protocols offer a way of achieving this.

Metaobject protocols are interfaces to a system that gives users the ability to modify the system's behaviour and implementation incrementally. Reflection and object-oriented programming are core to the approach. Reflection allows the opening up of a system's implementation without revealing unnecessary implementation detail. Object-oriented programming allows the model of the systems implementation and behaviour to be adjusted locally and incrementally. Reflection is the process by which a model of the internal workings of the system is presented to the meta level.

Reflection is the process by which a system can reason about and act upon itself. In a standard system, computation is performed on data that represents entities external to the computational system. However, a reflective computational system contains data that represents the structural and computational aspects of the system. It is also able to access and manipulate the data that represents the structural and computational aspects of the system itself. This provides a means to adjust the behaviour of the system to suit the user's needs.

In an object-oriented programming environment reflection can be implemented using metaobjects. Each object is causally connected with a metaobject that represents the structural and behavioural aspects of that object. The metaobject can be manipulated in the same manner as 'normal' objects. This allows the behaviour of the object to be manipulated without making any change to its implementation. The metaobject is changed instead.

A metaobject can be associated with an application object and the causal link is enforced by trapping each method call to the object. Instead of method calls going to the application object they are redirected to the metaobject. This metaobject is then free to redefine the semantics of the method call.

Metaobject protocols are an elegant way of separating concerns within a system. Non-functional aspects of the system can be captured by metaobjects and functional aspects can be captured by the application. This provides a transparent means of meeting non-functional requirements through the customisation of an application object by adding appropriate metaobjects to it. Metaobjects can be inserted to provide desired functionality at run-time. Since each object can have a different metaobject, this allows each application to be customised differently.

This is an ideal technique to apply to the creation of a dynamic multimedia framework adapting to network quality fluctuations. New behaviour may be implemented as a reflective wrapper intercepting messages to and from the base-level object and passing it to the metaobject to handle. The framework could be composed of multiple metaobjects each implementing different aspects of the distributed multimedia functionality. Different applications could be bound to various metaobjects in order to allow flexibility in terms of adaptability to available network resources. Separate applications could be bound to one type of metalayer and another applications is free to bind to a different metalayer.

Dalang Java

Dalang is an extension for Java that introduces behavioural runtime reflection. It uses class wrappers to implement a simple metaobject protocol where a metaobject (in the form of a wrapper) controls the behaviour of a base level object. The metaobject can redefine the handling of method calls in order to add desirable properties such as fault tolerance or security. Standard introspection can be achieved by using the standard java.lang.reflect package. These wrappers can be added dynamically or statically.

A prototype distribution of Dalang is available from here. If you would like to join the Dalang Java mailing list then contact Ian Welch.

You can read some papers about Dalang at research page.

Here are some useful Reflection Links.

Reflection

AISF(Adaptive Internet Server Framework) / OpenWebServer
DSG Research Page
HADAS : reflective, mobile, distributed environment
AspectIX
The metaXa (MetaJava) Project
Dalang Java
Computational Reflection : Extensive Links/papers etc
Watanabe, Takuo : (JAIST), LEAD++, reflection
Amano, Noriki : LEAD++, reflection, meta-objects -japan
Reflection papers from OOPSLA98
Reflection - Java example (Parameters)
Java Tip 57: Applet parameterization via class reflection - JavaWorld - August 1998
RRMI - JHPC Page (Andy's supervisor's)
Guarana - Meta Java
Newcastle University Reflection Stuff
OpenJava WWW Page
BT Qos Reflection paper (Jermome)
Arindam Banerji
MOP Related Links
Murata's Home Page
A Position Paper for the ECOOP'97 Workshop on Aspect-Oriented Programming
Aspect-Oriented Programming Home Page
Bob Briscoe's reflective (1) publication
Brad Appleton's Page (Serious amount of links)
Caltech Infospheres Group
OO Ph.D Network Abstracts (comprehensive)
Reflection Technical Papers : Tokoyo
Reflection Publication List
ANSA - Java Relfection Documents
TCD - Distributed Systems Group
TCD - DSG - Brendan Gowing's reflection links
TCD - DSG - Vinny's Home Page
TCD - DSG - (reflection) Hot Links - Frank Siqueira
Kiczales ieee article on reflection
Open Implementation Home Page
Parc Xerox. reflection documents

Home

To contact Author: Email: [email protected].