Message objects are usually matched against patterns of several subscribers at a time, and
these patterns are likely to present redundancies.
We discuss here an optimization based on that observation, which is
similar, but not identical to the tree matching algorithm
used in GRYPHON [ASS+98].
The tree matching algorithm factors out redundant subpatterns with
simplified assumptions: only ands of basic conditions are considered, and latter ones
are primitive comparisons of attribute values with predefined values.
In contrast, our filter library offers more expressiveness, e.g., nested method invocations, different comparators and combinations (and, or, ...). Such combinations are performed statically, and dynamic queries on message objects represent the critical factor in our system. As a consequence, we focus on detecting common denominators of accessors, in order to avoid the evaluation of redundant dynamic method invocation chains. Figure 18 shows a simple example of redundant accessors where each subscriber specifies a pattern consisting of a single basic condition. An invocation tree, like the one shown in Figure 19, is constructed from all accessors and is evaluated for every filtered message object.