On Sat, 5 Oct 2002 19:23, Leo Simons wrote:
> On Fri, 2002-10-04 at 09:25, Peter Donald wrote:
> > On Fri, 4 Oct 2002 13:07, Berin Loritsch wrote:
> > > Peter, it seems that this might really help out with the Interceptor
> > > stuff. For instance, you can have a set of static methods that hold all
> > > the logic for your interceptors, and then invoke them with the Delegate
> > > to the correct method.  It is faster than giant switch/if/then/else
> > > networks, and takes up less space than several small classes in the
> > > JAR.
> >
> > Kool - I will check it out. However I still can't get interceptor
> > performance to an acceptable level so it looks like BCEL is going to have
> > to be the answer.
>
> hmm. Does that imply you consider all existing architectures that use
> interceptors to provide 'unacceptable' bad performance (I think the vast
> majority of code doesn't resort to BCEL ;)? 

The majority of architectures that support invocation interceptors have 
unacceptable bad performance when creating fine grain components. The 
architectures that do support fine grain components weave it in with a 
precompile step (ala ApsectJ) or use BCEL-like mechanisms to compile at 
runtime.

Remember that distributed object models (RMI, remote EJB, CORBA etc) are 
rarely going to care about a slight call overhead. In the cases where they do 
(ie EJB Local interfaces) the interceptor execution is likely to still be the 
highest cost (ie starting a transaction which contacts a remote Database or 
Transaction Manager). So in this case the cost is minimal.

> What kind of performance are
> you shooting at?

fast. No fixed numbers but I want to use it for fine grain components.

> Would BCEL make it more complex to write an interceptor? Would it make
> it more complex to write a container using the interceptor toolkit?

Makes no difference. 

The only thing that it requires is that BCEL be on Classpath. However it could 
quite easily be worked so that reflection was used to create the 
InterceptorFactory and a BCEL one was attempted to be created first. If that 
failed (ie BCEL not on classpath) we could then use the reflection based 
factory.

-- 
Cheers,

Peter Donald
 "Man's mind stretched to a new idea never goes back to its original 
dimensions." -Oliver Wendell Holmes 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to