You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Venkata Krishnan <fo...@gmail.com> on 2008/03/19 11:11:27 UTC

definitions.xml and the SCA Domain over a distributed runtime

Hi,

I am trying to run the bigbank sample from a distirbution and postulating a
multiple contirbutions situation as follow :

Let contribution CA and contribution CB each have their definitions.xml that
defines some policysets.  Now, can the composites defined in CB be able to
use the policysets defined in CA ?

If so, is there a discipline that needs to be followed in the order of
adding these contributions i.e. should CA be added first and then CB ?

In a distributed runtime, where CA and CB are added and deployed on two
different nodes, would the node that has CB should try to pull down parts
(just the defintions.xml) or whole of CA ?

Finally, if definitions are going to be applicable to an entire domain,
which I believe should be case, then how do we ensure that all
definitions.xml contributed are first read and processed before composites
are read and processed and how do we make this consolidate / aggregated
definitions available to all nodes in the domain ?

Thanks

- Venkat

Re: definitions.xml and the SCA Domain over a distributed runtime

Posted by Raymond Feng <en...@gmail.com>.
Please see my comments inline.

Thanks,
Raymond
--------------------------------------------------
From: "Venkata Krishnan" <fo...@gmail.com>
Sent: Wednesday, March 19, 2008 7:46 AM
To: <tu...@ws.apache.org>
Subject: Re: definitions.xml and the SCA Domain over a distributed runtime

> Hi Simon,
>
> Yes, the defintions contribution by the extensions are available for all
> composites since they get picked up before the contributions get 
> processed.

I agree. You have added the SCADefinitionsProvider (BTW, it's probably 
better to have it in core-spi because it's part of the Tuscany extension 
SPI) for this purpose.

>
> After that things are governed by the order in which contributions are
> added.  Composites in a contribution can use the policysets and intents 
> that
> are a part of contributions that have been added ahead of it.  The
> contributions that were loaded ahead cannot use the intents and policysets
> defined by contributions added later.

I think we need multiple steps to get the ordering right.

Step 1: Scan the list of required contributions for a deployable composite 
to find definitions.xml and load/merge them into in-memory model.
Step 2: Load the artifacts (including the composite files) from the 
contributions. Create proxies (QName) for the PolicySets and Intents.
Step 3: Resolve the policySet/intent references in the Composite against the 
model built in Step 1.

>
> In this context, I guess what you are observing about the workspace is
> precisely the way out.  Let me take a look at that.
>
> Thanks.
>
> - Venkat
>
>
>
> On Wed, Mar 19, 2008 at 5:24 PM, Simon Laws <si...@googlemail.com>
> wrote:
>
>> Hi Venkat
>>
>> I think that definitions.xml can be provided to Tuscany in two ways.
>> Either
>> in a contribution or in an extension library. I also think that the
>> contents
>> of definitions.xml files provided in either of these ways should be added
>> to
>> the domain wide pool of intents and policy sets and should be applied to
>> composites in the domain as appropriate.
>>
>> Is this correct?
>>
>> I think at the moment the code only treats the definitions.xml added with
>> extensions as being of domain scope. Definitions.xml added within a
>> contribution are only processed in the context of that contribution
>>
>> Is my reading of the code correct?
>>
>> If I'm correct on these two points we need to fix the case where the
>> definitions.xml file comes within a contribution. I think this is
>> independent of whether a node running a composite is remote or not as a
>> node
>> may require multiple contributions in order to support a single 
>> composite,
>> as you scenario suggests.
>>
>> I've put some comments in line.
>>
>> Simon
>>
>> [1]
>>
>> http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/workspace-admin/src/main/java/org/apache/tuscany/sca/workspace/admin/impl/DeployableCompositeCollectionImpl.java
>>
>> On Wed, Mar 19, 2008 at 10:11 AM, Venkata Krishnan 
>> <fo...@gmail.com>
>> wrote:
>>
>> > Hi,
>> >
>> > I am trying to run the bigbank sample from a distirbution and
>> postulating
>> > a
>> > multiple contirbutions situation as follow :
>> >
>> > Let contribution CA and contribution CB each have their
>> definitions.xmlthat
>> > defines some policysets.  Now, can the composites defined in CB be able
>> to
>> > use the policysets defined in CA ?
>>
>>
>> I think they should be able to .
>>
>>
>> >
>> > If so, is there a discipline that needs to be followed in the order of
>> > adding these contributions i.e. should CA be added first and then CB ?
>> >
>>
>> The code is like this at the moment when it comes to running a composite,
>> i.e. the contributions have to be added in the right order, but it would
>> be
>> good if that were not the case. More importantly the implication is that
>> we
>> need to load ALL of the contributions that are required before any
>> composites are processed.
>>
>>
>> > In a distributed runtime, where CA and CB are added and deployed on two
>> > different nodes, would the node that has CB should try to pull down
>> parts
>> > (just the defintions.xml) or whole of CA ?
>>
>>
>> It might need other things from CA so I would suggest that the whole of 
>> CA
>> is given to the node.
>>
>>
>> >
>> > Finally, if definitions are going to be applicable to an entire domain,
>> > which I believe should be case, then how do we ensure that all
>> > definitions.xml contributed are first read and processed before
>> composites
>> > are read and processed and how do we make this consolidate / aggregated
>> > definitions available to all nodes in the domain ?
>>
>>
>> I think we have to look at the ideas in the workspace. Here all of the
>> contributions are expected to be available before any nodes start running
>> composites. I put some code into the workspace code to calculate the URI
>> of
>> all service bindings before any nodes run [1], take a look at the doGet()
>> method. To work this relies on reading all of the contributions required
>> to
>> run the configured domain. This would seem to be a good point at which to
>> pull all definitions.xml files out of all contributions and aggregate the
>> policy sets before individual composites are processed.
>>
>>
>> >
>> > Thanks
>> >
>> > - Venkat
>> >
>>
> 

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


Re: definitions.xml and the SCA Domain over a distributed runtime

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

Yes, the defintions contribution by the extensions are available for all
composites since they get picked up before the contributions get processed.

After that things are governed by the order in which contributions are
added.  Composites in a contribution can use the policysets and intents that
are a part of contributions that have been added ahead of it.  The
contributions that were loaded ahead cannot use the intents and policysets
defined by contributions added later.

In this context, I guess what you are observing about the workspace is
precisely the way out.  Let me take a look at that.

Thanks.

- Venkat



On Wed, Mar 19, 2008 at 5:24 PM, Simon Laws <si...@googlemail.com>
wrote:

> Hi Venkat
>
> I think that definitions.xml can be provided to Tuscany in two ways.
> Either
> in a contribution or in an extension library. I also think that the
> contents
> of definitions.xml files provided in either of these ways should be added
> to
> the domain wide pool of intents and policy sets and should be applied to
> composites in the domain as appropriate.
>
> Is this correct?
>
> I think at the moment the code only treats the definitions.xml added with
> extensions as being of domain scope. Definitions.xml added within a
> contribution are only processed in the context of that contribution
>
> Is my reading of the code correct?
>
> If I'm correct on these two points we need to fix the case where the
> definitions.xml file comes within a contribution. I think this is
> independent of whether a node running a composite is remote or not as a
> node
> may require multiple contributions in order to support a single composite,
> as you scenario suggests.
>
> I've put some comments in line.
>
> Simon
>
> [1]
>
> http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/workspace-admin/src/main/java/org/apache/tuscany/sca/workspace/admin/impl/DeployableCompositeCollectionImpl.java
>
> On Wed, Mar 19, 2008 at 10:11 AM, Venkata Krishnan <fo...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I am trying to run the bigbank sample from a distirbution and
> postulating
> > a
> > multiple contirbutions situation as follow :
> >
> > Let contribution CA and contribution CB each have their
> definitions.xmlthat
> > defines some policysets.  Now, can the composites defined in CB be able
> to
> > use the policysets defined in CA ?
>
>
> I think they should be able to .
>
>
> >
> > If so, is there a discipline that needs to be followed in the order of
> > adding these contributions i.e. should CA be added first and then CB ?
> >
>
> The code is like this at the moment when it comes to running a composite,
> i.e. the contributions have to be added in the right order, but it would
> be
> good if that were not the case. More importantly the implication is that
> we
> need to load ALL of the contributions that are required before any
> composites are processed.
>
>
> > In a distributed runtime, where CA and CB are added and deployed on two
> > different nodes, would the node that has CB should try to pull down
> parts
> > (just the defintions.xml) or whole of CA ?
>
>
> It might need other things from CA so I would suggest that the whole of CA
> is given to the node.
>
>
> >
> > Finally, if definitions are going to be applicable to an entire domain,
> > which I believe should be case, then how do we ensure that all
> > definitions.xml contributed are first read and processed before
> composites
> > are read and processed and how do we make this consolidate / aggregated
> > definitions available to all nodes in the domain ?
>
>
> I think we have to look at the ideas in the workspace. Here all of the
> contributions are expected to be available before any nodes start running
> composites. I put some code into the workspace code to calculate the URI
> of
> all service bindings before any nodes run [1], take a look at the doGet()
> method. To work this relies on reading all of the contributions required
> to
> run the configured domain. This would seem to be a good point at which to
> pull all definitions.xml files out of all contributions and aggregate the
> policy sets before individual composites are processed.
>
>
> >
> > Thanks
> >
> > - Venkat
> >
>

Re: definitions.xml and the SCA Domain over a distributed runtime

Posted by Simon Laws <si...@googlemail.com>.
Hi Venkat

I think that definitions.xml can be provided to Tuscany in two ways. Either
in a contribution or in an extension library. I also think that the contents
of definitions.xml files provided in either of these ways should be added to
the domain wide pool of intents and policy sets and should be applied to
composites in the domain as appropriate.

Is this correct?

I think at the moment the code only treats the definitions.xml added with
extensions as being of domain scope. Definitions.xml added within a
contribution are only processed in the context of that contribution

Is my reading of the code correct?

If I'm correct on these two points we need to fix the case where the
definitions.xml file comes within a contribution. I think this is
independent of whether a node running a composite is remote or not as a node
may require multiple contributions in order to support a single composite,
as you scenario suggests.

I've put some comments in line.

Simon

[1]
http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/workspace-admin/src/main/java/org/apache/tuscany/sca/workspace/admin/impl/DeployableCompositeCollectionImpl.java

On Wed, Mar 19, 2008 at 10:11 AM, Venkata Krishnan <fo...@gmail.com>
wrote:

> Hi,
>
> I am trying to run the bigbank sample from a distirbution and postulating
> a
> multiple contirbutions situation as follow :
>
> Let contribution CA and contribution CB each have their definitions.xmlthat
> defines some policysets.  Now, can the composites defined in CB be able to
> use the policysets defined in CA ?


I think they should be able to .


>
> If so, is there a discipline that needs to be followed in the order of
> adding these contributions i.e. should CA be added first and then CB ?
>

The code is like this at the moment when it comes to running a composite,
i.e. the contributions have to be added in the right order, but it would be
good if that were not the case. More importantly the implication is that we
need to load ALL of the contributions that are required before any
composites are processed.


> In a distributed runtime, where CA and CB are added and deployed on two
> different nodes, would the node that has CB should try to pull down parts
> (just the defintions.xml) or whole of CA ?


It might need other things from CA so I would suggest that the whole of CA
is given to the node.


>
> Finally, if definitions are going to be applicable to an entire domain,
> which I believe should be case, then how do we ensure that all
> definitions.xml contributed are first read and processed before composites
> are read and processed and how do we make this consolidate / aggregated
> definitions available to all nodes in the domain ?


I think we have to look at the ideas in the workspace. Here all of the
contributions are expected to be available before any nodes start running
composites. I put some code into the workspace code to calculate the URI of
all service bindings before any nodes run [1], take a look at the doGet()
method. To work this relies on reading all of the contributions required to
run the configured domain. This would seem to be a good point at which to
pull all definitions.xml files out of all contributions and aggregate the
policy sets before individual composites are processed.


>
> Thanks
>
> - Venkat
>