You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by Chamikara Jayalath <ch...@gmail.com> on 2005/10/22 06:35:23 UTC

Need for a global Duplicate Detection Haldler

Hi All,

In WS-RM it is always possible to receive duplicate messages. Both client
and server will be retransmitting application messages and some control
messages (e.g. Create sequence) as well. So it is always possible for the
receiver to receive the same message twice or more.

But it seems that this could violate the MEP concept. Consider an RM
interaction where client has send a one application mesage and expect a
response. The server sends the response once and wait for some time. Since
the ack message sent by the client does not arrive in time, the server
re-transmits the message. Unfortunately the client receive both messages and
both have the same wsa:relatesTo value. Since this is an in-out mep, only
the first message get added to the correct OperationContext. The second
message will most certailly be dispatched incorrectly.

Because of this IMO Sandesha2 should have a global handler that detect
duplicate messages. It should be able to detect the messages of RM enabled
inteactions and it should stop the propogation of such messages. Since this
should happen before dispatching. This has to be a GLOBAL handler.


Thanx,
Chamikara

Re: Need for a global Duplicate Detection Haldler

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi deepal,


On 10/25/05, Deepal Jayasinghe <de...@gmail.com> wrote:
>
>
>  ----- Original Message -----
> *From:* Chamikara Jayalath <ch...@gmail.com>
> *To:* deepalk@gmail.com
> *Cc:* sandesha-dev@ws.apache.org
> *Sent:* Tuesday, October 25, 2005 5:10 PM
> *Subject:* Re: Need for a global Duplicate Detection Haldler
>
> Hi Deepal,
>
> You mean a Global DuplucateDetection module ??
>
> Duplicate detection is a part of RM logic. So making it a module does not
> seem right to me. (for security case it may be ok, since they may be
> dividing it as encryption, authontication ect. which are different
> functionalities users need).
>
> And users having to attach two modules also does not sound very nice. A
> single RM module (global or service specific) sound much better.
> >>>>>>>>>>>>
> agreed
> >>>>>>>>>>>>>
>
> Can we go for something like this. We make Sandesha a global module. We
> add an RMPhase (after PostDispatch) and make sure that the service specific
> handlers are attached to that phase. And we attach the DuplicateDetection
> handler to the PreDispatch phase (which is global). Within the RM Service
> specific handlers we check weather a special parameter is made "true" in the
> service.xml. RM will only happend if that parameter is "true" for the
> service. So RM will happen only for RM enabled services.
>  >>>>>>>>>>
> I always like to make the simple case simple , if you try to put some
> parameter in service.xml and at each invocation you are going to check
> that parameter , it will make system slow down. So my personal view is we
> should not do that , if we have some other option it will be great
>
> >>>>>>>>>
>
>
Is this parameter read from the file every time, or is it taken from the
memory after the first loading. If latter is the case, don't think it will
have an considerable affect on performance.

Thanx,
Chamikara

Re: Need for a global Duplicate Detection Haldler

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi deepal,


On 10/25/05, Deepal Jayasinghe <de...@gmail.com> wrote:
>
>
>  ----- Original Message -----
> *From:* Chamikara Jayalath <ch...@gmail.com>
> *To:* deepalk@gmail.com
> *Cc:* sandesha-dev@ws.apache.org
> *Sent:* Tuesday, October 25, 2005 5:10 PM
> *Subject:* Re: Need for a global Duplicate Detection Haldler
>
> Hi Deepal,
>
> You mean a Global DuplucateDetection module ??
>
> Duplicate detection is a part of RM logic. So making it a module does not
> seem right to me. (for security case it may be ok, since they may be
> dividing it as encryption, authontication ect. which are different
> functionalities users need).
>
> And users having to attach two modules also does not sound very nice. A
> single RM module (global or service specific) sound much better.
> >>>>>>>>>>>>
> agreed
> >>>>>>>>>>>>>
>
> Can we go for something like this. We make Sandesha a global module. We
> add an RMPhase (after PostDispatch) and make sure that the service specific
> handlers are attached to that phase. And we attach the DuplicateDetection
> handler to the PreDispatch phase (which is global). Within the RM Service
> specific handlers we check weather a special parameter is made "true" in the
> service.xml. RM will only happend if that parameter is "true" for the
> service. So RM will happen only for RM enabled services.
>  >>>>>>>>>>
> I always like to make the simple case simple , if you try to put some
> parameter in service.xml and at each invocation you are going to check
> that parameter , it will make system slow down. So my personal view is we
> should not do that , if we have some other option it will be great
>
> >>>>>>>>>
>
>
Is this parameter read from the file every time, or is it taken from the
memory after the first loading. If latter is the case, don't think it will
have an considerable affect on performance.

Thanx,
Chamikara

Re: Need for a global Duplicate Detection Haldler

Posted by Deepal Jayasinghe <de...@gmail.com>.
Hi Chamikara;

see my comments below;

Thanks,
 Deepal
................................................................
~Future is Open~

  ----- Original Message ----- 
  From: Chamikara Jayalath 
  To: deepalk@gmail.com 
  Cc: sandesha-dev@ws.apache.org 
  Sent: Tuesday, October 25, 2005 5:10 PM
  Subject: Re: Need for a global Duplicate Detection Haldler


  Hi Deepal,

  You mean a Global DuplucateDetection module  ?? 

  Duplicate detection is a part of  RM logic. So making it a module does not seem right to me. (for security case it may be ok, since they may be dividing it as encryption, authontication ect. which are different functionalities users need).

  And users having to attach two modules also does not sound very nice. A single RM module (global or service specific) sound much better.
  >>>>>>>>>>>>
  agreed 
  >>>>>>>>>>>>>

  Can we go for something like this. We make Sandesha a global module. We add an RMPhase (after PostDispatch) and make sure that the service specific handlers are attached to that phase. And we attach the DuplicateDetection handler to the PreDispatch phase (which is global). Within the RM Service specific handlers we check weather a special parameter is made "true" in the service.xml. RM will only happend if that parameter is "true" for the service. So RM will happen only for RM enabled services.

  >>>>>>>>>>
  I always like to make the simple case simple , if you try to put some parameter in service.xml and at each invocation you are going to check that parameter , it will make system slow down. So my personal view is we should not do that , if we have some other option it will be great
  >>>>>>>>>


  will this work?

  Thanx,
  Chamikara



  On 10/25/05, Deepal Jayasinghe <de...@gmail.com> wrote:
    Hi ;

    What if we break Sandesha into two module 
     1. Global module 
     2. Service specific module

    Then user can deploy global module globally and service module to the specific services.

    The reason behind service module not allowing to add handlers to global chain is due to security consideration (NOT WS-S) .

    If we Snadesha into a global module all the service in the system will be having RM capability , that may not always required . I mean not all the services are required RM support. So my idea is if you wan to add some handler which should run irrespective of the service , just create   a module by putting that handler. And have a service specific module , if some want RM he can engage service specific Sandesha module. As I know same thing is going to happen in WS-S , they are trying to break WS-S into different sub modules. 

    Thanks,
     Deepal
    ................................................................
    ~Future is Open~

      ----- Original Message ----- 
      From: Chamikara Jayalath 
      To: sandesha-dev@ws.apache.org 
      Sent: Tuesday, October 25, 2005 4:14 PM
      Subject: Re: Need for a global Duplicate Detection Haldler


      Hi All,

      It seems like Axis2 does not allow a service specific Module to deploy a global handler. (and this seems quite logical). Shall we make Sandesha2 a global module and add a switch to make it available for each service. This will be a paramater in service.xml 
      e.g.:

      <service>
              <parameter name=RMenabled" >true</parameter>
      </service>


      I belive this is the way Security Module work currently (please correct me if I'm wrong).

      Thanx,
      Chamikara




      On 10/22/05, Chamikara Jayalath <ch...@gmail.com> wrote: 
        Hi All,

        In WS-RM it is always possible to receive duplicate messages. Both client and server will be retransmitting application messages and some control messages (e.g. Create sequence) as well. So it is always possible for the receiver to receive the same message twice or more.

        But it seems that this could violate the MEP concept. Consider an RM interaction where client has send a one application mesage and expect a response. The server sends the response once and wait for some time. Since the ack message sent by the client does not arrive in time, the server re-transmits the message. Unfortunately the client receive both messages and both have the same wsa:relatesTo value. Since this is an in-out mep, only the first message get added to the correct OperationContext. The second message will most certailly be dispatched incorrectly. 

        Because of this IMO Sandesha2 should have a global handler that detect duplicate messages. It should be able to detect the messages of RM enabled inteactions and it should stop the propogation of such messages. Since this should happen before dispatching. This has to be a GLOBAL handler.


        Thanx,
        Chamikara 




Re: Need for a global Duplicate Detection Haldler

Posted by Deepal Jayasinghe <de...@gmail.com>.
Hi Chamikara;

see my comments below;

Thanks,
 Deepal
................................................................
~Future is Open~

  ----- Original Message ----- 
  From: Chamikara Jayalath 
  To: deepalk@gmail.com 
  Cc: sandesha-dev@ws.apache.org 
  Sent: Tuesday, October 25, 2005 5:10 PM
  Subject: Re: Need for a global Duplicate Detection Haldler


  Hi Deepal,

  You mean a Global DuplucateDetection module  ?? 

  Duplicate detection is a part of  RM logic. So making it a module does not seem right to me. (for security case it may be ok, since they may be dividing it as encryption, authontication ect. which are different functionalities users need).

  And users having to attach two modules also does not sound very nice. A single RM module (global or service specific) sound much better.
  >>>>>>>>>>>>
  agreed 
  >>>>>>>>>>>>>

  Can we go for something like this. We make Sandesha a global module. We add an RMPhase (after PostDispatch) and make sure that the service specific handlers are attached to that phase. And we attach the DuplicateDetection handler to the PreDispatch phase (which is global). Within the RM Service specific handlers we check weather a special parameter is made "true" in the service.xml. RM will only happend if that parameter is "true" for the service. So RM will happen only for RM enabled services.

  >>>>>>>>>>
  I always like to make the simple case simple , if you try to put some parameter in service.xml and at each invocation you are going to check that parameter , it will make system slow down. So my personal view is we should not do that , if we have some other option it will be great
  >>>>>>>>>


  will this work?

  Thanx,
  Chamikara



  On 10/25/05, Deepal Jayasinghe <de...@gmail.com> wrote:
    Hi ;

    What if we break Sandesha into two module 
     1. Global module 
     2. Service specific module

    Then user can deploy global module globally and service module to the specific services.

    The reason behind service module not allowing to add handlers to global chain is due to security consideration (NOT WS-S) .

    If we Snadesha into a global module all the service in the system will be having RM capability , that may not always required . I mean not all the services are required RM support. So my idea is if you wan to add some handler which should run irrespective of the service , just create   a module by putting that handler. And have a service specific module , if some want RM he can engage service specific Sandesha module. As I know same thing is going to happen in WS-S , they are trying to break WS-S into different sub modules. 

    Thanks,
     Deepal
    ................................................................
    ~Future is Open~

      ----- Original Message ----- 
      From: Chamikara Jayalath 
      To: sandesha-dev@ws.apache.org 
      Sent: Tuesday, October 25, 2005 4:14 PM
      Subject: Re: Need for a global Duplicate Detection Haldler


      Hi All,

      It seems like Axis2 does not allow a service specific Module to deploy a global handler. (and this seems quite logical). Shall we make Sandesha2 a global module and add a switch to make it available for each service. This will be a paramater in service.xml 
      e.g.:

      <service>
              <parameter name=RMenabled" >true</parameter>
      </service>


      I belive this is the way Security Module work currently (please correct me if I'm wrong).

      Thanx,
      Chamikara




      On 10/22/05, Chamikara Jayalath <ch...@gmail.com> wrote: 
        Hi All,

        In WS-RM it is always possible to receive duplicate messages. Both client and server will be retransmitting application messages and some control messages (e.g. Create sequence) as well. So it is always possible for the receiver to receive the same message twice or more.

        But it seems that this could violate the MEP concept. Consider an RM interaction where client has send a one application mesage and expect a response. The server sends the response once and wait for some time. Since the ack message sent by the client does not arrive in time, the server re-transmits the message. Unfortunately the client receive both messages and both have the same wsa:relatesTo value. Since this is an in-out mep, only the first message get added to the correct OperationContext. The second message will most certailly be dispatched incorrectly. 

        Because of this IMO Sandesha2 should have a global handler that detect duplicate messages. It should be able to detect the messages of RM enabled inteactions and it should stop the propogation of such messages. Since this should happen before dispatching. This has to be a GLOBAL handler.


        Thanx,
        Chamikara 




Re: Need for a global Duplicate Detection Haldler

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Deepal,

You mean a Global DuplucateDetection module ??

Duplicate detection is a part of RM logic. So making it a module does not
seem right to me. (for security case it may be ok, since they may be
dividing it as encryption, authontication ect. which are different
functionalities users need).

And users having to attach two modules also does not sound very nice. A
single RM module (global or service specific) sound much better.

Can we go for something like this. We make Sandesha a global module. We add
an RMPhase (after PostDispatch) and make sure that the service specific
handlers are attached to that phase. And we attach the DuplicateDetection
handler to the PreDispatch phase (which is global). Within the RM Service
specific handlers we check weather a special parameter is made "true" in the
service.xml. RM will only happend if that parameter is "true" for the
service. So RM will happen only for RM enabled services.

will this work?

Thanx,
Chamikara


On 10/25/05, Deepal Jayasinghe <de...@gmail.com> wrote:
>
> Hi ;
>  What if we break Sandesha into two module
>  1. Global module
>  2. Service specific module
>  Then user can deploy global module globally and service module to the
> specific services.
>  The reason behind service module not allowing to add handlers to global
> chain is due to security consideration (NOT WS-S) .
>  If we Snadesha into a global module all the service in the system will be
> having RM capability , that may not always required . I mean not all the
> services are required RM support. So my idea is if you wan to add some
> handler which should run irrespective of the service , just create a module
> by putting that handler. And have a service specific module , if some want
> RM he can engage service specific Sandesha module. As I know same thing is
> going to happen in WS-S , they are trying to break WS-S into different sub
> modules.
>
> Thanks,
> Deepal
> ................................................................
> ~Future is Open~
>
> ----- Original Message -----
> *From:* Chamikara Jayalath <ch...@gmail.com>
> *To:* sandesha-dev@ws.apache.org
> *Sent:* Tuesday, October 25, 2005 4:14 PM
> *Subject:* Re: Need for a global Duplicate Detection Haldler
>
> Hi All,
>
> It seems like Axis2 does not allow a service specific Module to deploy a
> global handler. (and this seems quite logical). Shall we make Sandesha2 a
> global module and add a switch to make it available for each service. This
> will be a paramater in service.xml
> e.g.:
>
> <service>
> <parameter name=RMenabled" >true</parameter>
> </service>
>
>
> I belive this is the way Security Module work currently (please correct me
> if I'm wrong).
>
> Thanx,
> Chamikara
>
>
>
> On 10/22/05, Chamikara Jayalath <ch...@gmail.com> wrote:
> >
> > Hi All,
> >
> > In WS-RM it is always possible to receive duplicate messages. Both
> > client and server will be retransmitting application messages and some
> > control messages (e.g. Create sequence) as well. So it is always
> > possible for the receiver to receive the same message twice or more.
> >
> > But it seems that this could violate the MEP concept. Consider an RM
> > interaction where client has send a one application mesage and expect a
> > response. The server sends the response once and wait for some time. Since
> > the ack message sent by the client does not arrive in time, the server
> > re-transmits the message. Unfortunately the client receive both messages and
> > both have the same wsa:relatesTo value. Since this is an in-out mep, only
> > the first message get added to the correct OperationContext. The second
> > message will most certailly be dispatched incorrectly.
> >
> > Because of this IMO Sandesha2 should have a global handler that detect
> > duplicate messages. It should be able to detect the messages of RM enabled
> > inteactions and it should stop the propogation of such messages. Since this
> > should happen before dispatching. This has to be a GLOBAL handler.
> >
> >
> > Thanx,
> > Chamikara
>
>
>

Re: Need for a global Duplicate Detection Haldler

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Deepal,

You mean a Global DuplucateDetection module ??

Duplicate detection is a part of RM logic. So making it a module does not
seem right to me. (for security case it may be ok, since they may be
dividing it as encryption, authontication ect. which are different
functionalities users need).

And users having to attach two modules also does not sound very nice. A
single RM module (global or service specific) sound much better.

Can we go for something like this. We make Sandesha a global module. We add
an RMPhase (after PostDispatch) and make sure that the service specific
handlers are attached to that phase. And we attach the DuplicateDetection
handler to the PreDispatch phase (which is global). Within the RM Service
specific handlers we check weather a special parameter is made "true" in the
service.xml. RM will only happend if that parameter is "true" for the
service. So RM will happen only for RM enabled services.

will this work?

Thanx,
Chamikara


On 10/25/05, Deepal Jayasinghe <de...@gmail.com> wrote:
>
> Hi ;
>  What if we break Sandesha into two module
>  1. Global module
>  2. Service specific module
>  Then user can deploy global module globally and service module to the
> specific services.
>  The reason behind service module not allowing to add handlers to global
> chain is due to security consideration (NOT WS-S) .
>  If we Snadesha into a global module all the service in the system will be
> having RM capability , that may not always required . I mean not all the
> services are required RM support. So my idea is if you wan to add some
> handler which should run irrespective of the service , just create a module
> by putting that handler. And have a service specific module , if some want
> RM he can engage service specific Sandesha module. As I know same thing is
> going to happen in WS-S , they are trying to break WS-S into different sub
> modules.
>
> Thanks,
> Deepal
> ................................................................
> ~Future is Open~
>
> ----- Original Message -----
> *From:* Chamikara Jayalath <ch...@gmail.com>
> *To:* sandesha-dev@ws.apache.org
> *Sent:* Tuesday, October 25, 2005 4:14 PM
> *Subject:* Re: Need for a global Duplicate Detection Haldler
>
> Hi All,
>
> It seems like Axis2 does not allow a service specific Module to deploy a
> global handler. (and this seems quite logical). Shall we make Sandesha2 a
> global module and add a switch to make it available for each service. This
> will be a paramater in service.xml
> e.g.:
>
> <service>
> <parameter name=RMenabled" >true</parameter>
> </service>
>
>
> I belive this is the way Security Module work currently (please correct me
> if I'm wrong).
>
> Thanx,
> Chamikara
>
>
>
> On 10/22/05, Chamikara Jayalath <ch...@gmail.com> wrote:
> >
> > Hi All,
> >
> > In WS-RM it is always possible to receive duplicate messages. Both
> > client and server will be retransmitting application messages and some
> > control messages (e.g. Create sequence) as well. So it is always
> > possible for the receiver to receive the same message twice or more.
> >
> > But it seems that this could violate the MEP concept. Consider an RM
> > interaction where client has send a one application mesage and expect a
> > response. The server sends the response once and wait for some time. Since
> > the ack message sent by the client does not arrive in time, the server
> > re-transmits the message. Unfortunately the client receive both messages and
> > both have the same wsa:relatesTo value. Since this is an in-out mep, only
> > the first message get added to the correct OperationContext. The second
> > message will most certailly be dispatched incorrectly.
> >
> > Because of this IMO Sandesha2 should have a global handler that detect
> > duplicate messages. It should be able to detect the messages of RM enabled
> > inteactions and it should stop the propogation of such messages. Since this
> > should happen before dispatching. This has to be a GLOBAL handler.
> >
> >
> > Thanx,
> > Chamikara
>
>
>

Re: Need for a global Duplicate Detection Haldler

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi All,

It seems like Axis2 does not allow a service specific Module to deploy a
global handler. (and this seems quite logical). Shall we make Sandesha2 a
global module and add a switch to make it available for each service. This
will be a paramater in service.xml
e.g.:

<service>
<parameter name=RMenabled" >true</parameter>
</service>


I belive this is the way Security Module work currently (please correct me
if I'm wrong).

Thanx,
Chamikara



On 10/22/05, Chamikara Jayalath <ch...@gmail.com> wrote:
>
> Hi All,
>
> In WS-RM it is always possible to receive duplicate messages. Both client
> and server will be retransmitting application messages and some control
> messages (e.g. Create sequence) as well. So it is always possible for the
> receiver to receive the same message twice or more.
>
> But it seems that this could violate the MEP concept. Consider an RM
> interaction where client has send a one application mesage and expect a
> response. The server sends the response once and wait for some time. Since
> the ack message sent by the client does not arrive in time, the server
> re-transmits the message. Unfortunately the client receive both messages and
> both have the same wsa:relatesTo value. Since this is an in-out mep, only
> the first message get added to the correct OperationContext. The second
> message will most certailly be dispatched incorrectly.
>
> Because of this IMO Sandesha2 should have a global handler that detect
> duplicate messages. It should be able to detect the messages of RM enabled
> inteactions and it should stop the propogation of such messages. Since this
> should happen before dispatching. This has to be a GLOBAL handler.
>
>
> Thanx,
> Chamikara

Re: Need for a global Duplicate Detection Haldler

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi All,

It seems like Axis2 does not allow a service specific Module to deploy a
global handler. (and this seems quite logical). Shall we make Sandesha2 a
global module and add a switch to make it available for each service. This
will be a paramater in service.xml
e.g.:

<service>
<parameter name=RMenabled" >true</parameter>
</service>


I belive this is the way Security Module work currently (please correct me
if I'm wrong).

Thanx,
Chamikara



On 10/22/05, Chamikara Jayalath <ch...@gmail.com> wrote:
>
> Hi All,
>
> In WS-RM it is always possible to receive duplicate messages. Both client
> and server will be retransmitting application messages and some control
> messages (e.g. Create sequence) as well. So it is always possible for the
> receiver to receive the same message twice or more.
>
> But it seems that this could violate the MEP concept. Consider an RM
> interaction where client has send a one application mesage and expect a
> response. The server sends the response once and wait for some time. Since
> the ack message sent by the client does not arrive in time, the server
> re-transmits the message. Unfortunately the client receive both messages and
> both have the same wsa:relatesTo value. Since this is an in-out mep, only
> the first message get added to the correct OperationContext. The second
> message will most certailly be dispatched incorrectly.
>
> Because of this IMO Sandesha2 should have a global handler that detect
> duplicate messages. It should be able to detect the messages of RM enabled
> inteactions and it should stop the propogation of such messages. Since this
> should happen before dispatching. This has to be a GLOBAL handler.
>
>
> Thanx,
> Chamikara