Figure 1 shows the conventional
direct delivery message passing model. A Client
object on a
network sends a print()
message to a Printer
object.
The message is delivered directly to the destination object, which
in this case is Printer
. As a result, the corresponding
operation is invoked at the destination object. This implies that any
intermediate message
control cannot be decoupled from the operation without sacrificing its
transparency.
For example, after a period of time, it may be found that one
Printer
is insufficient to fulfill the needs of increasing
number of clients, and more printers
need to be added to the system for load balancing. But it may
not possible to dynamically introduce this solution without making
considerable changes to the Printer
object code.
Filter objects provide an elegant, modular
solution to the above problem. Removal,
addition and replacement of filter objects do not require any
modification of code, either at the source object or at the
destination object. Figure 2 shows how load balancing
can be introduced through the filtered delivery model. Here a
LoadBalancer
object, which maintains a list of additional
Printer
objects, is plugged to original Printer
object. It intercepts all the incoming print()
requests to
original
Printer
object, and redirects them to one of the Printer
objects to achieve load-balancing.
CORBA implementations such as Visibroker[2] and Orbix[3] provide interceptors. Visibroker provides various kinds of client and server interception points such as bind interception, client request interception, POA create/destroy interception, server request interception etc. Orbix provides filters in per-process and per object categories. Various kinds of filtering points may be specified such as pre-marshaling and post-marshaling filter points per process and pre-invocation and per-invocation filter points per object are supported.
Filter objects[6] on the other hand are first class dynamically pluggable objects, which are provided in the current implementation as full fledged CORBA objects. Apart from their filtering capabilities, they may also provide public interfaces. Filter objects have been implemented for Java[7] and C++[6], and in distributed environment at user level for MICO[11] and on an AspectJ based environment[5]. The current work enhances the MICO kernel to support a kernel level implementation of first class filter objects such that the ORB becomes filter-aware.