You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Daniel Kulp <dk...@apache.org> on 2008/06/06 18:38:59 UTC
Rationalizing the InterceptorProviders....
I'm trying to dig into CXF-1547 to try and get the "proper" fix in
place. Basically, I'm trying to make sure all the
InterceptorProviders are properly examined and in a consistent
order. We basically have 5 interceptor providers:
Endpoint
Binding
Service
Bus
Client (client side only)
On the server side, they are evaluated in this order:
In: bus, endpoint, binding, service
Out: endpoint, service, bus, binding
Fault: endpoint, binding, service, bus
On the client side:
In: bus, endpoint, client, binding
Out: bus, endpoint, client, binding
Fault: endpoint, binding, service, bus
Things to note:
Client side doesn't look at the Service at all except for faults. We
definitely need to fix that.
Server side uses different ordering for all three chains.
I'd like to make this completely consistent. I want to make it:
Server: bus, binding, endpoint, service
Client: bus, binding, endpoint, service, client
Or:
Server: bus, service, endpoint, binding
Client: bus, client, service, endpoint, binding
Any opinions or objections? Looking through things, I'm leaning
toward the second option. It LOOKS like the binding seems to define
the most "addAfter" interceptors which cause more work when building
the InterceptorChain if they are already in the chain. Thus, putting
them at the end may perform the best. I may run some checks to make
sure though.
In anycase, any thoughts?
---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog
Re: Rationalizing the InterceptorProviders....
Posted by Daniel Kulp <dk...@apache.org>.
On Jun 6, 2008, at 12:53 PM, Dan Diephouse wrote:
> I'm with ya on the need for consistency here. I honestly have no
> idea which
> one will perform best, but I think either options is reasonable.
The other option is to make in and out symetrical. Example:
Server in: bus, service, endpoint, binding
Server out: binding, endpoint, service, bus
That said, I don't really like it as I think it overly complicates
things and is then more to document. I think I'll try the two I
listed below and see which performs the best and go with it.
> I'll throw one more thing out - we could possibly make Server an
> InterceptorProvider if we wanted a mirror to the Client
> InterceptorProvider.
> I'm not sure if that gives us any needed functionality, but it might
> make it
> possible to remove the need for Service to be an InterceptorProvider.
Hmm... good point about adding to Server. I'll have to think about
that a bit more and double check that we even have the Server in all
three cases. (example: right now on the client side, we don't have
the client when setting up the fault chain. I need to address that.)
Dan
>
>
> Dan
>
> On Fri, Jun 6, 2008 at 9:38 AM, Daniel Kulp <dk...@apache.org> wrote:
>
>>
>> I'm trying to dig into CXF-1547 to try and get the "proper" fix in
>> place.
>> Basically, I'm trying to make sure all the InterceptorProviders are
>> properly examined and in a consistent order. We basically have 5
>> interceptor providers:
>>
>> Endpoint
>> Binding
>> Service
>> Bus
>> Client (client side only)
>>
>>
>> On the server side, they are evaluated in this order:
>> In: bus, endpoint, binding, service
>> Out: endpoint, service, bus, binding
>> Fault: endpoint, binding, service, bus
>>
>> On the client side:
>> In: bus, endpoint, client, binding
>> Out: bus, endpoint, client, binding
>> Fault: endpoint, binding, service, bus
>>
>>
>> Things to note:
>> Client side doesn't look at the Service at all except for faults. We
>> definitely need to fix that.
>> Server side uses different ordering for all three chains.
>>
>>
>> I'd like to make this completely consistent. I want to make it:
>>
>> Server: bus, binding, endpoint, service
>> Client: bus, binding, endpoint, service, client
>>
>> Or:
>> Server: bus, service, endpoint, binding
>> Client: bus, client, service, endpoint, binding
>>
>>
>> Any opinions or objections? Looking through things, I'm leaning
>> toward
>> the second option. It LOOKS like the binding seems to define the
>> most
>> "addAfter" interceptors which cause more work when building the
>> InterceptorChain if they are already in the chain. Thus, putting
>> them at
>> the end may perform the best. I may run some checks to make sure
>> though.
>>
>> In anycase, any thoughts?
>>
>> ---
>> Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>>
>>
>>
>>
>>
>
>
> --
> Dan Diephouse
> http://mulesource.com | http://netzooid.com/blog
---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog
Re: Rationalizing the InterceptorProviders....
Posted by Dan Diephouse <da...@mulesource.com>.
I'm with ya on the need for consistency here. I honestly have no idea which
one will perform best, but I think either options is reasonable.
I'll throw one more thing out - we could possibly make Server an
InterceptorProvider if we wanted a mirror to the Client InterceptorProvider.
I'm not sure if that gives us any needed functionality, but it might make it
possible to remove the need for Service to be an InterceptorProvider.
Dan
On Fri, Jun 6, 2008 at 9:38 AM, Daniel Kulp <dk...@apache.org> wrote:
>
> I'm trying to dig into CXF-1547 to try and get the "proper" fix in place.
> Basically, I'm trying to make sure all the InterceptorProviders are
> properly examined and in a consistent order. We basically have 5
> interceptor providers:
>
> Endpoint
> Binding
> Service
> Bus
> Client (client side only)
>
>
> On the server side, they are evaluated in this order:
> In: bus, endpoint, binding, service
> Out: endpoint, service, bus, binding
> Fault: endpoint, binding, service, bus
>
> On the client side:
> In: bus, endpoint, client, binding
> Out: bus, endpoint, client, binding
> Fault: endpoint, binding, service, bus
>
>
> Things to note:
> Client side doesn't look at the Service at all except for faults. We
> definitely need to fix that.
> Server side uses different ordering for all three chains.
>
>
> I'd like to make this completely consistent. I want to make it:
>
> Server: bus, binding, endpoint, service
> Client: bus, binding, endpoint, service, client
>
> Or:
> Server: bus, service, endpoint, binding
> Client: bus, client, service, endpoint, binding
>
>
> Any opinions or objections? Looking through things, I'm leaning toward
> the second option. It LOOKS like the binding seems to define the most
> "addAfter" interceptors which cause more work when building the
> InterceptorChain if they are already in the chain. Thus, putting them at
> the end may perform the best. I may run some checks to make sure though.
>
> In anycase, any thoughts?
>
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
>
>
>
--
Dan Diephouse
http://mulesource.com | http://netzooid.com/blog
Re: Rationalizing the InterceptorProviders....
Posted by Daniel Kulp <dk...@apache.org>.
On Jun 7, 2008, at 12:04 AM, Glen Mazza wrote:
> I would agree with making them consistent (deferring to your
> judgment of
> the actual ordering), but one concern I would have would be about
> backward compatibility--i.e., the interceptors no longer being
> activated
> in the order the users are expecting as a result of this switch. Of
> course, getting the system running right is more important, but just
> an
> issue to think about.
In theory, if the users depended on a specific version, they should
have done the "addBefore" and "addAfter" things to make sure the
order is set correctly. Without those set, we never really guaranteed
an order. (example: the order did change between 2.0.1 and 2.0.2 when
I did a bunch of performance work.)
Dan
> Glen
>
>
> 2008-06-06 Daniel Kulp wrote:
>> I'm trying to dig into CXF-1547 to try and get the "proper" fix in
>> place. Basically, I'm trying to make sure all the
>> InterceptorProviders are properly examined and in a consistent
>> order. We basically have 5 interceptor providers:
>>
>> Endpoint
>> Binding
>> Service
>> Bus
>> Client (client side only)
>>
>>
>> On the server side, they are evaluated in this order:
>> In: bus, endpoint, binding, service
>> Out: endpoint, service, bus, binding
>> Fault: endpoint, binding, service, bus
>>
>> On the client side:
>> In: bus, endpoint, client, binding
>> Out: bus, endpoint, client, binding
>> Fault: endpoint, binding, service, bus
>>
>>
>> Things to note:
>> Client side doesn't look at the Service at all except for faults. We
>> definitely need to fix that.
>> Server side uses different ordering for all three chains.
>>
>>
>> I'd like to make this completely consistent. I want to make it:
>>
>> Server: bus, binding, endpoint, service
>> Client: bus, binding, endpoint, service, client
>>
>> Or:
>> Server: bus, service, endpoint, binding
>> Client: bus, client, service, endpoint, binding
>>
>>
>> Any opinions or objections? Looking through things, I'm leaning
>> toward the second option. It LOOKS like the binding seems to define
>> the most "addAfter" interceptors which cause more work when building
>> the InterceptorChain if they are already in the chain. Thus,
>> putting
>> them at the end may perform the best. I may run some checks to make
>> sure though.
>>
>> In anycase, any thoughts?
>>
>> ---
>> Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>>
>>
>>
>>
>
---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog
Re: Rationalizing the InterceptorProviders....
Posted by Glen Mazza <gl...@verizon.net>.
I would agree with making them consistent (deferring to your judgment of
the actual ordering), but one concern I would have would be about
backward compatibility--i.e., the interceptors no longer being activated
in the order the users are expecting as a result of this switch. Of
course, getting the system running right is more important, but just an
issue to think about.
Glen
2008-06-06 Daniel Kulp wrote:
> I'm trying to dig into CXF-1547 to try and get the "proper" fix in
> place. Basically, I'm trying to make sure all the
> InterceptorProviders are properly examined and in a consistent
> order. We basically have 5 interceptor providers:
>
> Endpoint
> Binding
> Service
> Bus
> Client (client side only)
>
>
> On the server side, they are evaluated in this order:
> In: bus, endpoint, binding, service
> Out: endpoint, service, bus, binding
> Fault: endpoint, binding, service, bus
>
> On the client side:
> In: bus, endpoint, client, binding
> Out: bus, endpoint, client, binding
> Fault: endpoint, binding, service, bus
>
>
> Things to note:
> Client side doesn't look at the Service at all except for faults. We
> definitely need to fix that.
> Server side uses different ordering for all three chains.
>
>
> I'd like to make this completely consistent. I want to make it:
>
> Server: bus, binding, endpoint, service
> Client: bus, binding, endpoint, service, client
>
> Or:
> Server: bus, service, endpoint, binding
> Client: bus, client, service, endpoint, binding
>
>
> Any opinions or objections? Looking through things, I'm leaning
> toward the second option. It LOOKS like the binding seems to define
> the most "addAfter" interceptors which cause more work when building
> the InterceptorChain if they are already in the chain. Thus, putting
> them at the end may perform the best. I may run some checks to make
> sure though.
>
> In anycase, any thoughts?
>
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
>
>