directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ersin Er" <ersin...@gmail.com>
Subject Re: [ApacheDS] Cost of interceptors
Date Mon, 28 May 2007 09:53:47 GMT
Well, I am talking about an interceptor chain in a chain.

Int1 -> Int2 -> Int3(Int3.1 -> Int3.2 -> Int3.3) -> Int4 - > Int5

If Int3 is enabled all Int3.x will be executed. If Int3 is disabled,
the executed will just be forwarded to Int4, not Int3.1. This is
because the Kerberos service can be enabled or disabled at all. BTW,
if Kerberos service is enabled and it's desired to disable a
subservice of it, it's still possible. Int3.x can only know about
other Int3.x if needed. Int3 is a blackbox, it is just a regular
interceptor to the outer world. It has a registration mechanism, as
just Interceptors have, which can again register Interceptor. Well, I
think Int3 implements two interfaces: InterceptorChain and
Interceptor.

On 5/28/07, Emmanuel Lecharny <elecharny@gmail.com> wrote:
> Hi Ersin,
>
> can you elaborate a little bit ? It seems that what you propose is a
> kind of state machine which executes interceptors sequencially,
> compared to the actual chaining.
>
> Thanks !
>
> On 5/28/07, Ersin Er <ersin.er@gmail.com> wrote:
> > Hi,
> >
> > I recommend to implement a new base interceptor which can execute
> > multiple interceptors inside itself. If I am not wrong, Spring
> > framework uses this scheme for Servlet filters. They have a filter
> > implementation which can run multiple interceptors sharing same some
> > common context. This scheme may have various advantages. If for
> > example Kerberos service is disabled only one interceptors needs to
> > check the service status and other interceptors need not even wake up.
> > It also groups common services which do not make sense individually
> > into one common place.
> >
> >
> > On 5/28/07, Alex Karasulu <akarasulu@apache.org> wrote:
> > > Hi Emmanuel,
> > >
> > > Enrique is adding 2-3 new interceptors into the core.  I guess they could be
> > > conditionally added in the configuration based on the presence of the
> > > kerberos service or whatever service needed them.  Hmmm me thinks this is a
> > > good example of how services can use the add/remove capabilities on the
> > > interceptor chain.  Regardless I was wondering what the costs are on going
> > > through these interceptor call chains.  I remember you did some metrics
> > > around this and found that it does not cost much at all.
> > >
> > > Alex
> > >
> > >
> >
> >
> > --
> > Ersin
> >
>
>
> --
> Regards,
> Cordialement,
> Emmanuel L├ęcharny
> www.iktek.com
>


-- 
Ersin
Mime
View raw message