You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Fuhwei Lwo <fu...@bricemedia.com> on 2007/03/06 14:12:27 UTC

[SCA Databinding] - Discussion on pass-by-value parameters and return values

Based on the SCA spec, there are two semantics for parameters and return values - pass-by-reference and pass-by-value. In the case of pass-by-value with Web Service binding, after demarshalling, the data object was newly created from the soap message (the original value) so Tuscany should have no need to make another new copy of the data object because this will have huge impact on performance.

Just want to make sure I am on the right track. Thanks.

Fuhwei Lwo

Re: [SCA Databinding] - Discussion on pass-by-value parameters and return values

Posted by ant elder <an...@gmail.com>.
I don't think the E4X databinding makes a copy. Its just a wrapper over an
OMElement to adapt to the Rhino E4X API. So wiring a JavaScript component to
another component that uses OMElements would have an E4X transformation but
both components would be using the same underlying OMElement objects.

   ...ant

On 3/9/07, Raymond Feng <en...@gmail.com> wrote:
>
> Hi,
>
> I think it's safe assumption that the databinding transformation will
> create
> a copy of the data.
>
> Thanks,
> Raymond
>
> ----- Original Message -----
> From: "Venkata Krishnan" <fo...@gmail.com>
> To: <tu...@ws.apache.org>
> Sent: Thursday, March 08, 2007 9:05 AM
> Subject: Re: [SCA Databinding] - Discussion on pass-by-value parameters
> and
> return values
>
>
> > Hi,
> >
> > I intend to fix this by skipping copying if one end of the wire is
> either
> > an
> > instance of ServiceBinding or an instance of ReferenceBinding as we had
> > agreed that where binding exists, the binding implementation will ensure
> > passbyvalue semantics.
> >
> > With respect to skipping copy when both ends of a wire are Components
> and
> > there is data transformation that is going to happen on the wire I
> wonder
> > if
> > it is valid to assume that any transformed data will not contain any
> > reference to the original data - and is as good as a copy.
> >
> > Thoughts ?
> >
> > Thanks.
> >
> > - Venkat
> >
> > On 3/7/07, Venkata Krishnan <fo...@gmail.com> wrote:
> >>
> >> Hi,
> >>
> >> Yes, we did agree on this.  I don't think this check is in place in the
> >> WirePostProcessor.  Will take a look and fix that.
> >>
> >> Also, in general, I think we intended to skip this copying if there has
> >> been a data transformation performed ahead, in the wire.  So, is it
> safe
> >> to
> >> simply check if the source and target have different databindings and
> if
> >> they do, then simply skip this copying. ?
> >>
> >> Thanks
> >>
> >> - Venkat
> >>
> >>
> >> On 3/6/07, Raymond Feng <en...@gmail.com> wrote:
> >> >
> >> > Hi,
> >> >
> >> > I think we have agreed on this optimization strategy in previous
> >> > discussions
> >> > on this ML. Venkat, do you know if we have implemented it (to skip
> >> > pass-by-value copy if the one end of the wire is a service or
> reference
> >> > with
> >> > remote binding)?
> >> >
> >> > Thanks,
> >> > Raymond
> >> >
> >> > ----- Original Message -----
> >> > From: "Jean-Sebastien Delfino" <js...@apache.org>
> >> > To: < tuscany-dev@ws.apache.org>
> >> > Sent: Tuesday, March 06, 2007 8:45 AM
> >> > Subject: Re: [SCA Databinding] - Discussion on pass-by-value
> parameters
> >> > and
> >> > return values
> >> >
> >> >
> >> > > Fuhwei Lwo wrote:
> >> > >> Based on the SCA spec, there are two semantics for parameters and
> >> > return
> >> > >> values - pass-by-reference and pass-by-value. In the case of
> >> > >> pass-by-value with Web Service binding, after demarshalling, the
> >> > >> data
> >> > >> object was newly created from the soap message (the original
> value)
> >> > so
> >> > >> Tuscany should have no need to make another new copy of the data
> >> > object
> >> > >> because this will have huge impact on performance.
> >> > >>
> >> > >> Just want to make sure I am on the right track. Thanks.
> >> > >>
> >> > >> Fuhwei Lwo
> >> > >>
> >> > >>
> >> > > Fuhwei,
> >> > >
> >> > > That makes sense to me. We need to avoid multiple transformations
> and
> >> > > unnecessary copies from XML to the form expected by the target
> >> > component
> >> > > implementation. If the target component implementation expects an
> SDO
> >> > > DataObject, the DataObject should be created directly from the XML
> >> > stream
> >> > > out of the SOAP body.
> >> > >
> >> > > --
> >> > > Jean-Sebastien
> >> > >
> >> > >
> >> > >
> ---------------------------------------------------------------------
> >> > > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> >> > > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >> > >
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> >> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >> >
> >> >
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: [SCA Databinding] - Discussion on pass-by-value parameters and return values

Posted by Raymond Feng <en...@gmail.com>.
Hi,

I think it's safe assumption that the databinding transformation will create 
a copy of the data.

Thanks,
Raymond

----- Original Message ----- 
From: "Venkata Krishnan" <fo...@gmail.com>
To: <tu...@ws.apache.org>
Sent: Thursday, March 08, 2007 9:05 AM
Subject: Re: [SCA Databinding] - Discussion on pass-by-value parameters and 
return values


> Hi,
>
> I intend to fix this by skipping copying if one end of the wire is either 
> an
> instance of ServiceBinding or an instance of ReferenceBinding as we had
> agreed that where binding exists, the binding implementation will ensure
> passbyvalue semantics.
>
> With respect to skipping copy when both ends of a wire are Components and
> there is data transformation that is going to happen on the wire I wonder 
> if
> it is valid to assume that any transformed data will not contain any
> reference to the original data - and is as good as a copy.
>
> Thoughts ?
>
> Thanks.
>
> - Venkat
>
> On 3/7/07, Venkata Krishnan <fo...@gmail.com> wrote:
>>
>> Hi,
>>
>> Yes, we did agree on this.  I don't think this check is in place in the
>> WirePostProcessor.  Will take a look and fix that.
>>
>> Also, in general, I think we intended to skip this copying if there has
>> been a data transformation performed ahead, in the wire.  So, is it safe 
>> to
>> simply check if the source and target have different databindings and if
>> they do, then simply skip this copying. ?
>>
>> Thanks
>>
>> - Venkat
>>
>>
>> On 3/6/07, Raymond Feng <en...@gmail.com> wrote:
>> >
>> > Hi,
>> >
>> > I think we have agreed on this optimization strategy in previous
>> > discussions
>> > on this ML. Venkat, do you know if we have implemented it (to skip
>> > pass-by-value copy if the one end of the wire is a service or reference
>> > with
>> > remote binding)?
>> >
>> > Thanks,
>> > Raymond
>> >
>> > ----- Original Message -----
>> > From: "Jean-Sebastien Delfino" <js...@apache.org>
>> > To: < tuscany-dev@ws.apache.org>
>> > Sent: Tuesday, March 06, 2007 8:45 AM
>> > Subject: Re: [SCA Databinding] - Discussion on pass-by-value parameters
>> > and
>> > return values
>> >
>> >
>> > > Fuhwei Lwo wrote:
>> > >> Based on the SCA spec, there are two semantics for parameters and
>> > return
>> > >> values - pass-by-reference and pass-by-value. In the case of
>> > >> pass-by-value with Web Service binding, after demarshalling, the 
>> > >> data
>> > >> object was newly created from the soap message (the original value)
>> > so
>> > >> Tuscany should have no need to make another new copy of the data
>> > object
>> > >> because this will have huge impact on performance.
>> > >>
>> > >> Just want to make sure I am on the right track. Thanks.
>> > >>
>> > >> Fuhwei Lwo
>> > >>
>> > >>
>> > > Fuhwei,
>> > >
>> > > That makes sense to me. We need to avoid multiple transformations and
>> > > unnecessary copies from XML to the form expected by the target
>> > component
>> > > implementation. If the target component implementation expects an SDO
>> > > DataObject, the DataObject should be created directly from the XML
>> > stream
>> > > out of the SOAP body.
>> > >
>> > > --
>> > > Jean-Sebastien
>> > >
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> > > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>> > >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>> >
>> >
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [SCA Databinding] - Discussion on pass-by-value parameters and return values

Posted by Venkata Krishnan <fo...@gmail.com>.
Hi,

I intend to fix this by skipping copying if one end of the wire is either an
instance of ServiceBinding or an instance of ReferenceBinding as we had
agreed that where binding exists, the binding implementation will ensure
passbyvalue semantics.

With respect to skipping copy when both ends of a wire are Components and
there is data transformation that is going to happen on the wire I wonder if
it is valid to assume that any transformed data will not contain any
reference to the original data - and is as good as a copy.

Thoughts ?

Thanks.

- Venkat

On 3/7/07, Venkata Krishnan <fo...@gmail.com> wrote:
>
> Hi,
>
> Yes, we did agree on this.  I don't think this check is in place in the
> WirePostProcessor.  Will take a look and fix that.
>
> Also, in general, I think we intended to skip this copying if there has
> been a data transformation performed ahead, in the wire.  So, is it safe to
> simply check if the source and target have different databindings and if
> they do, then simply skip this copying. ?
>
> Thanks
>
> - Venkat
>
>
> On 3/6/07, Raymond Feng <en...@gmail.com> wrote:
> >
> > Hi,
> >
> > I think we have agreed on this optimization strategy in previous
> > discussions
> > on this ML. Venkat, do you know if we have implemented it (to skip
> > pass-by-value copy if the one end of the wire is a service or reference
> > with
> > remote binding)?
> >
> > Thanks,
> > Raymond
> >
> > ----- Original Message -----
> > From: "Jean-Sebastien Delfino" <js...@apache.org>
> > To: < tuscany-dev@ws.apache.org>
> > Sent: Tuesday, March 06, 2007 8:45 AM
> > Subject: Re: [SCA Databinding] - Discussion on pass-by-value parameters
> > and
> > return values
> >
> >
> > > Fuhwei Lwo wrote:
> > >> Based on the SCA spec, there are two semantics for parameters and
> > return
> > >> values - pass-by-reference and pass-by-value. In the case of
> > >> pass-by-value with Web Service binding, after demarshalling, the data
> > >> object was newly created from the soap message (the original value)
> > so
> > >> Tuscany should have no need to make another new copy of the data
> > object
> > >> because this will have huge impact on performance.
> > >>
> > >> Just want to make sure I am on the right track. Thanks.
> > >>
> > >> Fuhwei Lwo
> > >>
> > >>
> > > Fuhwei,
> > >
> > > That makes sense to me. We need to avoid multiple transformations and
> > > unnecessary copies from XML to the form expected by the target
> > component
> > > implementation. If the target component implementation expects an SDO
> > > DataObject, the DataObject should be created directly from the XML
> > stream
> > > out of the SOAP body.
> > >
> > > --
> > > Jean-Sebastien
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
> >
>

Re: [SCA Databinding] - Discussion on pass-by-value parameters and return values

Posted by Venkata Krishnan <fo...@gmail.com>.
Hi,

Yes, we did agree on this.  I don't think this check is in place in the
WirePostProcessor.  Will take a look and fix that.

Also, in general, I think we intended to skip this copying if there has been
a data transformation performed ahead, in the wire.  So, is it safe to
simply check if the source and target have different databindings and if
they do, then simply skip this copying. ?

Thanks

- Venkat


On 3/6/07, Raymond Feng <en...@gmail.com> wrote:
>
> Hi,
>
> I think we have agreed on this optimization strategy in previous
> discussions
> on this ML. Venkat, do you know if we have implemented it (to skip
> pass-by-value copy if the one end of the wire is a service or reference
> with
> remote binding)?
>
> Thanks,
> Raymond
>
> ----- Original Message -----
> From: "Jean-Sebastien Delfino" <js...@apache.org>
> To: <tu...@ws.apache.org>
> Sent: Tuesday, March 06, 2007 8:45 AM
> Subject: Re: [SCA Databinding] - Discussion on pass-by-value parameters
> and
> return values
>
>
> > Fuhwei Lwo wrote:
> >> Based on the SCA spec, there are two semantics for parameters and
> return
> >> values - pass-by-reference and pass-by-value. In the case of
> >> pass-by-value with Web Service binding, after demarshalling, the data
> >> object was newly created from the soap message (the original value) so
> >> Tuscany should have no need to make another new copy of the data object
> >> because this will have huge impact on performance.
> >>
> >> Just want to make sure I am on the right track. Thanks.
> >>
> >> Fuhwei Lwo
> >>
> >>
> > Fuhwei,
> >
> > That makes sense to me. We need to avoid multiple transformations and
> > unnecessary copies from XML to the form expected by the target component
> > implementation. If the target component implementation expects an SDO
> > DataObject, the DataObject should be created directly from the XML
> stream
> > out of the SOAP body.
> >
> > --
> > Jean-Sebastien
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: [SCA Databinding] - Discussion on pass-by-value parameters and return values

Posted by Raymond Feng <en...@gmail.com>.
Hi,

I think we have agreed on this optimization strategy in previous discussions 
on this ML. Venkat, do you know if we have implemented it (to skip 
pass-by-value copy if the one end of the wire is a service or reference with 
remote binding)?

Thanks,
Raymond

----- Original Message ----- 
From: "Jean-Sebastien Delfino" <js...@apache.org>
To: <tu...@ws.apache.org>
Sent: Tuesday, March 06, 2007 8:45 AM
Subject: Re: [SCA Databinding] - Discussion on pass-by-value parameters and 
return values


> Fuhwei Lwo wrote:
>> Based on the SCA spec, there are two semantics for parameters and return 
>> values - pass-by-reference and pass-by-value. In the case of 
>> pass-by-value with Web Service binding, after demarshalling, the data 
>> object was newly created from the soap message (the original value) so 
>> Tuscany should have no need to make another new copy of the data object 
>> because this will have huge impact on performance.
>>
>> Just want to make sure I am on the right track. Thanks.
>>
>> Fuhwei Lwo
>>
>>
> Fuhwei,
>
> That makes sense to me. We need to avoid multiple transformations and 
> unnecessary copies from XML to the form expected by the target component 
> implementation. If the target component implementation expects an SDO 
> DataObject, the DataObject should be created directly from the XML stream 
> out of the SOAP body.
>
> -- 
> Jean-Sebastien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [SCA Databinding] - Discussion on pass-by-value parameters and return values

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Fuhwei Lwo wrote:
> Based on the SCA spec, there are two semantics for parameters and return values - pass-by-reference and pass-by-value. In the case of pass-by-value with Web Service binding, after demarshalling, the data object was newly created from the soap message (the original value) so Tuscany should have no need to make another new copy of the data object because this will have huge impact on performance.
>
> Just want to make sure I am on the right track. Thanks.
>
> Fuhwei Lwo
>
>   
Fuhwei,

That makes sense to me. We need to avoid multiple transformations and 
unnecessary copies from XML to the form expected by the target component 
implementation. If the target component implementation expects an SDO 
DataObject, the DataObject should be created directly from the XML 
stream out of the SOAP body.

-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org