You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Raymond Feng <en...@gmail.com> on 2009/05/09 02:07:25 UTC

SCA Node configuration: The XML and Java models

Hi,

I start to prototype a XML and Java model to configure SCA nodes to replace "implementation.node". To facilitate the discussion, I checked in a few java interfaces and XML files under [1].

Basically, we need to provide the following information for a node:

* The SCA domain URI
* The QName or URI of the node as the id
* A list of SCA contributions used by the node
* The deployment composite
* Base URIs for bindings used by the node

Please find the xml example at [2]. Some of the things to be further discussed are added as comments.

Thoughts?

Thanks,
Raymond

[1] http://svn.apache.org/viewvc?rev=773135&view=rev
[2] https://svn.apache.org/repos/asf/tuscany/java/sca/modules/implementation-node/src/test/resources/org/apache/tuscany/sca/node/configuration/node1.xml

Re: SCA Node configuration: The XML and Java models

Posted by Simon Laws <si...@googlemail.com>.
On Sat, May 9, 2009 at 1:07 AM, Raymond Feng <en...@gmail.com> wrote:
> Hi,
>
> I start to prototype a XML and Java model to configure SCA nodes to replace
> "implementation.node". To facilitate the discussion, I checked in a few java
> interfaces and XML files under [1].
>
> Basically, we need to provide the following information for a node:
>
> * The SCA domain URI
> * The QName or URI of the node as the id
> * A list of SCA contributions used by the node
> * The deployment composite
> * Base URIs for bindings used by the node
>
> Please find the xml example at [2]. Some of the things to be further
> discussed are added as comments.
>
> Thoughts?
>
> Thanks,
> Raymond
>
> [1] http://svn.apache.org/viewvc?rev=773135&view=rev
> [2]
> https://svn.apache.org/repos/asf/tuscany/java/sca/modules/implementation-node/src/test/resources/org/apache/tuscany/sca/node/configuration/node1.xml
>

Thanks for kicking this off Raymond.

Should we perhaps defined base URIs as...

<binding name="sca:binding.ws">
    <baseURI>http://localhost:8080/ws</baseURI>
    <baseURI>https://localhost:8081/ws</baseURI>
</binding>

Simon

Re: SCA Node configuration: The XML and Java models

Posted by Simon Laws <si...@googlemail.com>.
> Is there really a use case for a Base URIs per binding?

I think more accurately it's base URI per binding per node.


>If not then i think
> we should leave this off here for now. How the base uri works is always
> causing problems, we've a work item to sort it out in 2.x, and it doesn't

atm we rely on the base URI being translated into an actual binding
URI in the composite file. IIUC What trips people up is

1/ the default that is employed when no binding URI is specified
2/ the adoption of container URIs regardless of what the composite file says.

> work properly in 2.x right now anyway. So it seems like it would be better
> to not preempt how we fix it by including it here till we know whats going
> to happen.
>
>    ...ant

Re: SCA Node configuration: The XML and Java models

Posted by ant elder <an...@apache.org>.
On Mon, May 11, 2009 at 4:53 PM, Raymond Feng <en...@gmail.com> wrote:
> Please see my comments inline.
>
> Thanks,
> Raymond
>
>> Is there a reason this new code is in the old implementation-node module?
>> Its configuring the Node and comparable to the way we do model and XML
>> processors of extensions so seems more natural to just put it in the
>> node-api/impl modules.
>
> I was just lazy to use the "implementation-node" module. We'll have to find
> a module for it. The interfaces for the configuration can potentially go to
> the node-api to allow the node to be configured programmatically.
>
>> A node can have multiple deployable composites so this would need to
>> support that.
>
> There are a few cases:
>
> 1. The contribution contains META-INF/sca-contribution.xml (or
> sca-contribution-generated.xml) that defines a list of deployable
> composites.
> 2. The contribution contains a set of composite files but there is no
> META-INF/sca-contribution.xml (the composite files can potentially be used
> by deployable composites from other contributions, including a deployment
> composite that is attached to a contribution)
> 3. A deployment composite is defined to the contribution.
>
> For 1, the deployable composites should be honored by default. If we want to
> override that, we should probably use the "deployment composite" in case 3.
> For 2, I don't think we should treat the composites as deployable.
> For 3, a deployment composite should be treated as deployable and it
> overrides the META-INF/sca-contribution.xml.
>
> BTW, for a node, should we allow the attachments of more than one deployment
> composite to a single contribution? Should we allow multiple deployment
> composites
> to attach to multiple contributions?
>
>> Is there really a use case for a Base URIs per binding? If not then i
>> think we should leave this off here for now. How the base uri works is
>> always causing problems, we've a work item to sort it out in 2.x, and it
>> doesn't work properly in 2.x right now anyway. So it seems like it would be
>> better to not preempt how we fix it by including it here till we know whats
>> going to happen.
>
> I agree with Simon's explanation. It should be baseURI per protocol per
> binding per node. A binding may support more than one protocols such as http
> and https. The <binding> element is optional. If there is no specified
> baseURI, then a default one from the binding should be used.
>
>
>  ...ant
>

Ok great, i'd be happy with all that.

   ...ant

Re: SCA Node configuration: The XML and Java models

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

Thanks,
Raymond

> Is there a reason this new code is in the old implementation-node module? 
> Its configuring the Node and comparable to the way we do model and XML 
> processors of extensions so seems more natural to just put it in the 
> node-api/impl modules.

I was just lazy to use the "implementation-node" module. We'll have to find 
a module for it. The interfaces for the configuration can potentially go to 
the node-api to allow the node to be configured programmatically.

> A node can have multiple deployable composites so this would need to 
> support that.

There are a few cases:

1. The contribution contains META-INF/sca-contribution.xml (or 
sca-contribution-generated.xml) that defines a list of deployable 
composites.
2. The contribution contains a set of composite files but there is no 
META-INF/sca-contribution.xml (the composite files can potentially be used 
by deployable composites from other contributions, including a deployment 
composite that is attached to a contribution)
3. A deployment composite is defined to the contribution.

For 1, the deployable composites should be honored by default. If we want to 
override that, we should probably use the "deployment composite" in case 3.
For 2, I don't think we should treat the composites as deployable.
For 3, a deployment composite should be treated as deployable and it 
overrides the META-INF/sca-contribution.xml.

BTW, for a node, should we allow the attachments of more than one deployment 
composite to a single contribution? Should we allow multiple deployment 
composites
to attach to multiple contributions?

> Is there really a use case for a Base URIs per binding? If not then i 
> think we should leave this off here for now. How the base uri works is 
> always causing problems, we've a work item to sort it out in 2.x, and it 
> doesn't work properly in 2.x right now anyway. So it seems like it would 
> be better to not preempt how we fix it by including it here till we know 
> whats going to happen.

I agree with Simon's explanation. It should be baseURI per protocol per 
binding per node. A binding may support more than one protocols such as http 
and https. The <binding> element is optional. If there is no specified 
baseURI, then a default one from the binding should be used.


   ...ant 


Re: SCA Node configuration: The XML and Java models

Posted by ant elder <an...@gmail.com>.
On Sat, May 9, 2009 at 1:07 AM, Raymond Feng <en...@gmail.com> wrote:

>  Hi,
>
> I start to prototype a XML and Java model to configure SCA nodes to replace
> "implementation.node". To facilitate the discussion, I checked in a few java
> interfaces and XML files under [1].
>
> Basically, we need to provide the following information for a node:
>
> * The SCA domain URI
> * The QName or URI of the node as the id
> * A list of SCA contributions used by the node
> * The deployment composite
> * Base URIs for bindings used by the node
>
> Please find the xml example at [2]. Some of the things to be further
> discussed are added as comments.
>
> Thoughts?
>
> Thanks,
> Raymond
>
> [1] http://svn.apache.org/viewvc?rev=773135&view=rev
> [2]
> https://svn.apache.org/repos/asf/tuscany/java/sca/modules/implementation-node/src/test/resources/org/apache/tuscany/sca/node/configuration/node1.xml
>

Cool, this will be a big help with the Node tidying up. A few comments:

Is there a reason this new code is in the old implementation-node module?
Its configuring the Node and comparable to the way we do model and XML
processors of extensions so seems more natural to just put it in the
node-api/impl modules.

A node can have multiple deployable composites so this would need to support
that.

Is there really a use case for a Base URIs per binding? If not then i think
we should leave this off here for now. How the base uri works is always
causing problems, we've a work item to sort it out in 2.x, and it doesn't
work properly in 2.x right now anyway. So it seems like it would be better
to not preempt how we fix it by including it here till we know whats going
to happen.

   ...ant