You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by ant elder <an...@gmail.com> on 2008/04/30 12:12:03 UTC

Fwd: Is there are simple straightforward way of creating a Compoisite

Bring this comment to the dev list:

"The tuscany web app support doesn't use this evolving node implementation
just yet. I don't imagine it would be difficult to plug it in ...."
  - http://apache.markmail.org/message/4hvdrcafhapy3kyy

Coincidentally i was having a look at this just the other day after that
user posted about support for Tomcat with multiple webapps in the same SCA
domain - http://apache.markmail.org/message/ttssxoruzpndkado.

Could you give any pointers at all on where to start with using this
evolving node implementation like this? Theres no doc and I'm a bit lost on
even which Tuscany modules, samples or tests are current. What I'd like to
do is start exploring the updating of the old runtime-tomcat code to use the
latest domain stuff so that as Tomcat starts up webapps are detected as SCA
contributions and added to a single Tomcat SCA domain. One issue that I
remember came up last time doing this is that as this happens during Tomcat
startup no http communication can take place so all the registrations of
contributions with the domain need to be in-vm.

   ...ant

Re: Is there are simple straightforward way of creating a Compoisite

Posted by Simon Laws <si...@googlemail.com>.
On Wed, Apr 30, 2008 at 1:52 PM, ant elder <an...@gmail.com> wrote:

> On Wed, Apr 30, 2008 at 1:38 PM, Simon Laws <si...@googlemail.com>
> wrote:
>
> >
> >
> > On Wed, Apr 30, 2008 at 1:25 PM, ant elder <an...@apache.org> wrote:
> >
> > >
> > >
> > > On Wed, Apr 30, 2008 at 1:18 PM, Simon Laws <simonslaws@googlemail.com
> >
> > > wrote:
> > >
> > > > snip....
> > > >
> > > > >
> > > > > Cool thats really helpful. Ok so if we can have a Tomcat
> TuscanyHost
> > > > > (i.e.
> > > > > an extension of org.apache.catalina.core.StandardHost not related
> to
> > > > > the
> > > > > Tuscany host stuff)  that will get its addChild method called for
> > > > > each
> > > > > webapp and we can get a File to the root of the webbapp so call
> > > > > nodeFactory.createSCANode with that and treat each webapp as a
> > > > > seperate
> > > > > contribution which seems reasonable. That would give us a node per
> > > > > webapp
> > > > > which i'm not sure is good or bad till theres some answers to the
> > > > > "what is a
> > > > > node" question.
> > > >
> > > >
> > > > sounds ok to me.
> > > >
> > > >
> > > > >
> > > > >
> > > > > How do nodes talk to each other or become part of a bigger domain?
> > > > > Theres
> > > > > nothing in SCANode2Factory.newInstance().createSCANode or
> node.start
> > > > > that
> > > > > mentions anything about any domain?
> > > > >
> > > > >   ...ant
> > > > >
> > > >
> > > > They don't talk to each other, other other than at the application
> > > > level. If you want to have a node read it's configuration from the
> domain
> > > > you can use the
> > > > following factory method.
> > > >
> > > > public abstract SCANode2 createSCANode(String configurationURI);
> > > >
> > > > and provide the URI of the configuration that you want it to read.
> > > > e.g.
> > > >
> > > > node = factory.createSCANode("http://localhost:9990/node-image/NodeA
> > > > ");
> > > >
> > > > This URL is provided by the domain and is tailored specifically to
> > > > provide just the right configuration (the list of composite and
> contribution
> > > > URLs) for the node in question. NodeA in this case.
> > > >
> > > > Simon
> > > >
> > > >
> > > Now I'm lost again :)
> > >
> > > Stepping back a bit, what and how is the domain involved in this? What
> > > does it mean to "have a node read it's configuration from the domain"?
> > >
> > >    ...ant
> > >
> > >
> > Apologies. I'm probably confusing you here as I don't have a clear
> > picture. Two scenarios.
> >
> > 1 - the one we know and love where the webapp is self contained and runs
> a
> > node (SCADomain in our current host-webapp) to run the composite that it
> > contains.
> >
> > 2 - the distributed domain scenario. The last time we approached this we
> > had the node contacting the domain for endpoint information for those
> > targets that could not be resolved locally. This gave us start up
> problems.
> > This is still the role of the new domain but the way that the node gets
> this
> > information is different now. This is where I too am suggesting that the
> use
> > case is not clear.
> >
> > So if we agree that there are two slightly different scenarios we can
> > investigate them further.
> >
> > Simon
> >
>
> Agreed, here we are talking about that second one right? Or at least
> something different than the first anyway. Something like what we had
> described here - http://apache.markmail.org/message/ttssxoruzpndkado
>
> So  in the (2) above how does the "domain" get configured? In a previous
> email you said "the webapp will have been contributed to the domain for
> processing" is there any code i can look at showing that type of thing
> happening? And then how do you create a node from a configured domain?
>
>   ...ant
>

So there are three scenarios that have come up now

1 - Standalone webapp

2 - Distributed domiain webapp - reference/service connections to/from
components on other servers.
2a - Distributed domiain webapp - reference/service connection to/from
components running within the same container.

I have been considering that 2 and 2a take the same approach.

Looking at the webapp code now associated with node2 is seems that the
webapp servlet host constructs a URL based on

domainURL/nodeName

Where domainURL is configured through a property/environment var
(TUSCANY_DOMAIN) and nodeName is the context path of the webapp.

This URL is then used to call the domain implementation to retrieve the
fully configured composite and contributions that the node needs. In this
case the application that the webapp is going to run doesn't necessarily
need to be delivered with the webapp itself as the result of doing a GET on
domainURL/nodeName is a list of URLs and the running webapp can resolve
these URLs to anywhere. It could of course resolve them locally as well.

So this all seems OK but I'll have to try it out to really understand it.

Simon

Re: Is there are simple straightforward way of creating a Compoisite

Posted by ant elder <an...@gmail.com>.
On Wed, Apr 30, 2008 at 1:38 PM, Simon Laws <si...@googlemail.com>
wrote:

>
>
> On Wed, Apr 30, 2008 at 1:25 PM, ant elder <an...@apache.org> wrote:
>
> >
> >
> > On Wed, Apr 30, 2008 at 1:18 PM, Simon Laws <si...@googlemail.com>
> > wrote:
> >
> > > snip....
> > >
> > > >
> > > > Cool thats really helpful. Ok so if we can have a Tomcat TuscanyHost
> > > > (i.e.
> > > > an extension of org.apache.catalina.core.StandardHost not related to
> > > > the
> > > > Tuscany host stuff)  that will get its addChild method called for
> > > > each
> > > > webapp and we can get a File to the root of the webbapp so call
> > > > nodeFactory.createSCANode with that and treat each webapp as a
> > > > seperate
> > > > contribution which seems reasonable. That would give us a node per
> > > > webapp
> > > > which i'm not sure is good or bad till theres some answers to the
> > > > "what is a
> > > > node" question.
> > >
> > >
> > > sounds ok to me.
> > >
> > >
> > > >
> > > >
> > > > How do nodes talk to each other or become part of a bigger domain?
> > > > Theres
> > > > nothing in SCANode2Factory.newInstance().createSCANode or node.start
> > > > that
> > > > mentions anything about any domain?
> > > >
> > > >   ...ant
> > > >
> > >
> > > They don't talk to each other, other other than at the application
> > > level. If you want to have a node read it's configuration from the domain
> > > you can use the
> > > following factory method.
> > >
> > > public abstract SCANode2 createSCANode(String configurationURI);
> > >
> > > and provide the URI of the configuration that you want it to read.
> > > e.g.
> > >
> > > node = factory.createSCANode("http://localhost:9990/node-image/NodeA
> > > ");
> > >
> > > This URL is provided by the domain and is tailored specifically to
> > > provide just the right configuration (the list of composite and contribution
> > > URLs) for the node in question. NodeA in this case.
> > >
> > > Simon
> > >
> > >
> > Now I'm lost again :)
> >
> > Stepping back a bit, what and how is the domain involved in this? What
> > does it mean to "have a node read it's configuration from the domain"?
> >
> >    ...ant
> >
> >
> Apologies. I'm probably confusing you here as I don't have a clear
> picture. Two scenarios.
>
> 1 - the one we know and love where the webapp is self contained and runs a
> node (SCADomain in our current host-webapp) to run the composite that it
> contains.
>
> 2 - the distributed domain scenario. The last time we approached this we
> had the node contacting the domain for endpoint information for those
> targets that could not be resolved locally. This gave us start up problems.
> This is still the role of the new domain but the way that the node gets this
> information is different now. This is where I too am suggesting that the use
> case is not clear.
>
> So if we agree that there are two slightly different scenarios we can
> investigate them further.
>
> Simon
>

Agreed, here we are talking about that second one right? Or at least
something different than the first anyway. Something like what we had
described here - http://apache.markmail.org/message/ttssxoruzpndkado

So  in the (2) above how does the "domain" get configured? In a previous
email you said "the webapp will have been contributed to the domain for
processing" is there any code i can look at showing that type of thing
happening? And then how do you create a node from a configured domain?

   ...ant

Re: Is there are simple straightforward way of creating a Compoisite

Posted by ant elder <an...@apache.org>.
On Wed, Apr 30, 2008 at 1:18 PM, Simon Laws <si...@googlemail.com>
wrote:

> snip....
>
> >
> > Cool thats really helpful. Ok so if we can have a Tomcat TuscanyHost
> > (i.e.
> > an extension of org.apache.catalina.core.StandardHost not related to the
> > Tuscany host stuff)  that will get its addChild method called for each
> > webapp and we can get a File to the root of the webbapp so call
> > nodeFactory.createSCANode with that and treat each webapp as a seperate
> > contribution which seems reasonable. That would give us a node per
> > webapp
> > which i'm not sure is good or bad till theres some answers to the "what
> > is a
> > node" question.
>
>
> sounds ok to me.
>
>
> >
> >
> > How do nodes talk to each other or become part of a bigger domain?
> > Theres
> > nothing in SCANode2Factory.newInstance().createSCANode or node.start
> > that
> > mentions anything about any domain?
> >
> >   ...ant
> >
>
> They don't talk to each other, other other than at the application level.
> If you want to have a node read it's configuration from the domain you can
> use the
> following factory method.
>
> public abstract SCANode2 createSCANode(String configurationURI);
>
> and provide the URI of the configuration that you want it to read. e.g.
>
> node = factory.createSCANode("http://localhost:9990/node-image/NodeA");
>
> This URL is provided by the domain and is tailored specifically to provide
> just the right configuration (the list of composite and contribution URLs)
> for the node in question. NodeA in this case.
>
> Simon
>
>
Now I'm lost again :)

Stepping back a bit, what and how is the domain involved in this? What does
it mean to "have a node read it's configuration from the domain"?

   ...ant

Re: Is there are simple straightforward way of creating a Compoisite

Posted by ant elder <an...@gmail.com>.
On Wed, May 7, 2008 at 11:39 AM, ant elder <an...@gmail.com> wrote:

>
>
> On Wed, May 7, 2008 at 11:29 AM, Simon Laws <si...@googlemail.com>
> wrote:
>
> <snip>
>
>
>>> This is not quite what we need in the Tomcat case. I shouldn't need to
>>> write
>>> a NodeX.composite file for each webapp as we can say each webapp is a
>>> node,
>>> use the webapp name for the node name, and use the webapps
>>> meta-inf/sca-deployables or sca-contribution.xml to get all the
>>> composites.
>>>
>>> So i guess what i want is for the TuscanyStandardHost to start up an
>>> inial
>>
>>
>> What's the  "TuscanyStandardHost"? Does that exist yet?
>>
>
> Its the Tuscany implementation of the Tomcat StandardHost which is what
> gets control when Tomcat starts up and can cerate whatever domains and nodes
> are necessary for the webapps. There is an old one in the runtime-tomcat
> module but i'm right now trying to rewrite it to use all this new domain
> stuff.
>
>    ...ant
>
>
I've committed the updates i had for the TuscanyHost in r654467 its still
using just the old "standalone" SCADomain but it enables you to run SCA
webapps without any Tuscany stuff in the web.xml or webapp lib directory.
You point a Tomcat install at a Tuscany binary distribution install with two
updates to the Tomcat configuration:

- in tomcat conf/catalina.properties add the Tuscany Distro lib directory to
the common.loader path, eg:

common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar,/tuscany-sca-2.0-incubating-SNAPSHOT/lib/*.jar

- in tomcat conf/server.xml add the TuscanyHost class name to the localhost
definition, eg:
      <Host name="localhost"  appBase="webapps"
            className="org.apache.tuscany.sca.runtime.tomcat.TuscanyHost"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

Ideally we'd update org.apache.tuscany.sca.runtime.tomcat.TuscanyHost to use
the new distributed domain stuff, but Ive not been able to make much
progress with getting that to work, I'll start a new thread about that.

   ...ant

Re: Is there are simple straightforward way of creating a Compoisite

Posted by ant elder <an...@gmail.com>.
On Wed, May 7, 2008 at 11:29 AM, Simon Laws <si...@googlemail.com>
wrote:

<snip>


> > This is not quite what we need in the Tomcat case. I shouldn't need to
> > write
> > a NodeX.composite file for each webapp as we can say each webapp is a
> > node,
> > use the webapp name for the node name, and use the webapps
> > meta-inf/sca-deployables or sca-contribution.xml to get all the
> > composites.
> >
> > So i guess what i want is for the TuscanyStandardHost to start up an
> > inial
>
>
> What's the  "TuscanyStandardHost"? Does that exist yet?
>

Its the Tuscany implementation of the Tomcat StandardHost which is what gets
control when Tomcat starts up and can cerate whatever domains and nodes are
necessary for the webapps. There is an old one in the runtime-tomcat module
but i'm right now trying to rewrite it to use all this new domain stuff.

   ...ant

Re: Is there are simple straightforward way of creating a Compoisite

Posted by ant elder <an...@gmail.com>.
On Wed, May 7, 2008 at 11:29 AM, Simon Laws <si...@googlemail.com>
wrote:

>
> I'm not clear if the domain here is intended to be local to the webapp
> container, in which case it could reasonably do webapp processing on the
> local file system, or if it is a more general domain out there in the
> network somewhere. Asking the question in a different way, what is the use
> case here?
>
> 1. User creates a war including SCA artifacts
> 2. User contributes the war to the domain (Using the domian GUI)
> 3. Domain deploys the war to a webapp container chosen by the user
>
> or
>
> 1. User creates a war including SCA artifacts
> 2. User deploys the war to the webapp container, e.g. copies the war to
> the webapps folder
> 3. Tuscany/webapp integration configures Tuscany to run the artifacts in
> the war as part of a domain.
>
>
The second of those.

   ...ant

Re: Is there are simple straightforward way of creating a Compoisite

Posted by Simon Laws <si...@googlemail.com>.
On Wed, May 7, 2008 at 9:55 AM, ant elder <an...@apache.org> wrote:

> On Wed, Apr 30, 2008 at 1:18 PM, Simon Laws <si...@googlemail.com>
> wrote:
>
> > snip....
> >
> > >
> > > Cool thats really helpful. Ok so if we can have a Tomcat TuscanyHost
> > > (i.e.
> > > an extension of org.apache.catalina.core.StandardHost not related to
> the
> > > Tuscany host stuff)  that will get its addChild method called for each
> > > webapp and we can get a File to the root of the webbapp so call
> > > nodeFactory.createSCANode with that and treat each webapp as a
> seperate
> > > contribution which seems reasonable. That would give us a node per
> > > webapp
> > > which i'm not sure is good or bad till theres some answers to the
> "what
> > > is a
> > > node" question.
> >
> >
> > sounds ok to me.
> >
> >
> > >
> > >
> > > How do nodes talk to each other or become part of a bigger domain?
> > > Theres
> > > nothing in SCANode2Factory.newInstance().createSCANode or node.start
> > > that
> > > mentions anything about any domain?
> > >
> > >   ...ant
> > >
> >
> > They don't talk to each other, other other than at the application
> level.
> > If you want to have a node read it's configuration from the domain you
> can
> > use the
> > following factory method.
> >
> > public abstract SCANode2 createSCANode(String configurationURI);
> >
> > and provide the URI of the configuration that you want it to read. e.g.
> >
> > node = factory.createSCANode("http://localhost:9990/node-image/NodeA");
> >
> > This URL is provided by the domain and is tailored specifically to
> provide
> > just the right configuration (the list of composite and contribution
> URLs)
> > for the node in question. NodeA in this case.
> >
> > Simon
> >
> >
> Ok I've been digging around in the code a bit and think i understand that,
> but it will only work if there are pre-existing  .composite files
> describing
> each node when the domain starts up, right? Eg like the NodeA.composite,
> NodeB.composite etc in the calculator-distributed sample.


Agreed, that's the difference here compared to the old domain implementation
where nodes could "register" themselves. It was this registration process
that was causing the startup problems before. There are way of solving this
kind of problem, for example, there are several group membership protocols
out there, but the focus most recently has been on getting the contribution
model sorted rather than automating the creation of the node list.


>
> This is not quite what we need in the Tomcat case. I shouldn't need to
> write
> a NodeX.composite file for each webapp as we can say each webapp is a
> node,
> use the webapp name for the node name, and use the webapps
> meta-inf/sca-deployables or sca-contribution.xml to get all the
> composites.
>
> So i guess what i want is for the TuscanyStandardHost to start up an inial


What's the  "TuscanyStandardHost"? Does that exist yet?


> empty domain, then as each webapp is discovered to get the domain to
> create
> itself a node configuration from the webapp folder, and then have the
> TuscanyStandardHost call domain.createNode for the webapp and store that
> node in the webapps context.


I'm not clear if the domain here is intended to be local to the webapp
container, in which case it could reasonably do webapp processing on the
local file system, or if it is a more general domain out there in the
network somewhere. Asking the question in a different way, what is the use
case here?

1. User creates a war including SCA artifacts
2. User contributes the war to the domain (Using the domian GUI)
3. Domain deploys the war to a webapp container chosen by the user

or

1. User creates a war including SCA artifacts
2. User deploys the war to the webapp container, e.g. copies the war to the
webapps folder
3. Tuscany/webapp integration configures Tuscany to run the artifacts in the
war as part of a domain.

or something else.


>
> Does that sound reasonable? There doesn't seem to be APIs for that right
> now
> so if this approach sounds ok id like to try to add that.
>
>   ...ant
>

Simon

Re: Is there are simple straightforward way of creating a Compoisite

Posted by ant elder <an...@apache.org>.
On Wed, Apr 30, 2008 at 1:18 PM, Simon Laws <si...@googlemail.com>
wrote:

> snip....
>
> >
> > Cool thats really helpful. Ok so if we can have a Tomcat TuscanyHost
> > (i.e.
> > an extension of org.apache.catalina.core.StandardHost not related to the
> > Tuscany host stuff)  that will get its addChild method called for each
> > webapp and we can get a File to the root of the webbapp so call
> > nodeFactory.createSCANode with that and treat each webapp as a seperate
> > contribution which seems reasonable. That would give us a node per
> > webapp
> > which i'm not sure is good or bad till theres some answers to the "what
> > is a
> > node" question.
>
>
> sounds ok to me.
>
>
> >
> >
> > How do nodes talk to each other or become part of a bigger domain?
> > Theres
> > nothing in SCANode2Factory.newInstance().createSCANode or node.start
> > that
> > mentions anything about any domain?
> >
> >   ...ant
> >
>
> They don't talk to each other, other other than at the application level.
> If you want to have a node read it's configuration from the domain you can
> use the
> following factory method.
>
> public abstract SCANode2 createSCANode(String configurationURI);
>
> and provide the URI of the configuration that you want it to read. e.g.
>
> node = factory.createSCANode("http://localhost:9990/node-image/NodeA");
>
> This URL is provided by the domain and is tailored specifically to provide
> just the right configuration (the list of composite and contribution URLs)
> for the node in question. NodeA in this case.
>
> Simon
>
>
Ok I've been digging around in the code a bit and think i understand that,
but it will only work if there are pre-existing  .composite files describing
each node when the domain starts up, right? Eg like the NodeA.composite,
NodeB.composite etc in the calculator-distributed sample.

This is not quite what we need in the Tomcat case. I shouldn't need to write
a NodeX.composite file for each webapp as we can say each webapp is a node,
use the webapp name for the node name, and use the webapps
meta-inf/sca-deployables or sca-contribution.xml to get all the composites.

So i guess what i want is for the TuscanyStandardHost to start up an inial
empty domain, then as each webapp is discovered to get the domain to create
itself a node configuration from the webapp folder, and then have the
TuscanyStandardHost call domain.createNode for the webapp and store that
node in the webapps context.

Does that sound reasonable? There doesn't seem to be APIs for that right now
so if this approach sounds ok id like to try to add that.

   ...ant

Re: Is there are simple straightforward way of creating a Compoisite

Posted by Simon Laws <si...@googlemail.com>.
snip....

>
> Cool thats really helpful. Ok so if we can have a Tomcat TuscanyHost (i.e.
> an extension of org.apache.catalina.core.StandardHost not related to the
> Tuscany host stuff)  that will get its addChild method called for each
> webapp and we can get a File to the root of the webbapp so call
> nodeFactory.createSCANode with that and treat each webapp as a seperate
> contribution which seems reasonable. That would give us a node per webapp
> which i'm not sure is good or bad till theres some answers to the "what is
> a
> node" question.


sounds ok to me.


>
>
> How do nodes talk to each other or become part of a bigger domain? Theres
> nothing in SCANode2Factory.newInstance().createSCANode or node.start that
> mentions anything about any domain?
>
>   ...ant
>

They don't talk to each other, other other than at the application level. If
you want to have a node read it's configuration from the domain you can use
the
following factory method.

public abstract SCANode2 createSCANode(String configurationURI);

and provide the URI of the configuration that you want it to read. e.g.

node = factory.createSCANode("http://localhost:9990/node-image/NodeA");

This URL is provided by the domain and is tailored specifically to provide
just the right configuration (the list of composite and contribution URLs)
for the node in question. NodeA in this case.

Simon

Re: Is there are simple straightforward way of creating a Compoisite

Posted by ant elder <an...@gmail.com>.
On Wed, Apr 30, 2008 at 12:52 PM, Simon Laws <si...@googlemail.com>
wrote:

>
>
> On Wed, Apr 30, 2008 at 12:40 PM, ant elder <an...@apache.org> wrote:
>
> >
> >
> > On Wed, Apr 30, 2008 at 12:00 PM, Simon Laws <si...@googlemail.com>
> > wrote:
> >
> > >
> > >
> > > On Wed, Apr 30, 2008 at 11:12 AM, ant elder <an...@gmail.com>
> > > wrote:
> > >
> > > > Bring this comment to the dev list:
> > > >
> > > > "The tuscany web app support doesn't use this evolving node
> > > > implementation
> > > > just yet. I don't imagine it would be difficult to plug it in ...."
> > > >  - http://apache.markmail.org/message/4hvdrcafhapy3kyy
> > > >
> > > > Coincidentally i was having a look at this just the other day after
> > > > that
> > > > user posted about support for Tomcat with multiple webapps in the
> > > > same SCA
> > > > domain - http://apache.markmail.org/message/ttssxoruzpndkado.
> > > >
> > > > Could you give any pointers at all on where to start with using this
> > > > evolving node implementation like this? Theres no doc and I'm a bit
> > > > lost on
> > > > even which Tuscany modules, samples or tests are current. What I'd
> > > > like to
> > > > do is start exploring the updating of the old runtime-tomcat code to
> > > > use the
> > > > latest domain stuff so that as Tomcat starts up webapps are detected
> > > > as SCA
> > > > contributions and added to a single Tomcat SCA domain. One issue
> > > > that I
> > > > remember came up last time doing this is that as this happens during
> > > > Tomcat
> > > > startup no http communication can take place so all the
> > > > registrations of
> > > > contributions with the domain need to be in-vm.
> > > >
> > > >   ...ant
> > > >
> > >
> > > Hi Ant
> > >
> > > Am keen to work with you on this. While svn has been down I've spent
> > > time to resurrect a load balancing demo I have on my local disc (not checked
> > > in yet) and would like to update the webapps I'm using to the lasted domain
> > > code but of course I can't.
> > >
> > > Here's a summary of what I think is current in terms of
> > > domain/node/runtime support (but have to admit that there is an amount of
> > > guessing here).....
> > >
> > > sca/distribution/standalone - not sure but think it's redundant -
> > > forerunner of runtime-standalone?
> > > sca/distribution/tomcat - not sure but think it's redundant -
> > > forerunner of runtime-tomcat?
> > > sca/distribution/war - not sure but think it's redundant - forerunner
> > > of runtime-war?
> > > sca/distribution/webapp - not sure but think it's redundant
> > > sca/modules/domain - old domain SPI
> > > sca/modules/domain-api - old domain API
> > > sca/modules/domain-impl - old domain Implementation - has been
> > > superseded by domain-manager
> > > sca/modules/domain-manager - new domain management application -
> > > replaces domain-impl
> > > sca/modules/host-embedded - original single JVM domain implementation
> > > - still used in most samples
> > > sca/modules/host-webapp - original webapp runtime - fires up tuscany
> > > based on web.xml filter
> > > sca/modules/host-webapp-junit - not sure but have a feeling it's
> > > something to do with running itests in different web containers
> > > sca/modules/node - old node SPI
> > > sca/modules/node-api - old node API
> > > sca/modules/node-impl - old node implementation that runs one or more
> > > composites in a single JVM as part of a distributed domain
> > > sca/modules/node2-api - new node API
> > > sca/modules/node2-impl - new node implementation. This node is coded
> > > to read it's configuration as an atom feed from the new domain-manager
> > > sca/modules/node2-launcher - start up a node from the command line
> > > sca/modules/node2-launcher-webapp - had noticed this before - maybe
> > > node2 integration with webapps has been looked at. Let's see!
> > > sca/modules/runtime - I think this was the last attempt at providing a
> > > common runtime baseline to be specialized for different environments
> > > sca/modules/runtime-standalone - command line runtime
> > > sca/modules/runtime-tomcat - deep tomcat integration (IIRC)
> > > sca/modules/runtime-war - war rutime
> > > sca/modules/workspace - SPI for some of the machinery required to
> > > process contributions at the domain level. Used by domain-manager
> > > sca/modules/workspace-impl - Implementation of the workspace
> > > sca/modules/workspace-xml - Reading/writing workspace as XML
> > >
> > > So can we get together here and work out what the true picture is and
> > > how to mode modules/runtime* to node2. First things first I'm going to go
> > > look at node2-launcher-webapp.
> > >
> > > I think the start up process for nodes in a webapp will potentially be
> > > easier now as the node is just reading atom feeds and not making soap calls.
> > > Time will tell!
> > >
> > > Simon
> > >
> >
> > Great, working together would be good and i'm sure make getting
> > somewhere useful happen much quicker :)
> >
> > Thanks for the list of module statuses thats helpful, i'll also go look
> > the node2-launcher-webapp one.
> >
> > The comment on the use of atom feeds is interesting. To be honest i'd
> > hope we could have a way to avoid that being needed in this Tomcat use case,
> > or at least being optional. One issue we had last time when we tried to do
> > this was that there had to be a separate standalone "domain manager" running
> > before you could start up a Tomcat instance, and that sucks quite a bit IMHO
> > so i'd like to try to get a design from the beginning where its not needed.
> > This will all be happening in a single JVM and with the code bootstrapping
> > Tuscany being at the "top" classloader so everything should be accessible to
> > just make direct SPI calls to configure a domain instead of going via a
> > remote binding shouldn't it?  There have been some emails recently about the
> > domain/workspace SPIs i guess i need to go read more closely what they were
> > about.
> >
> >     ...ant
> >
> >
> Also, the node is setup so that there are several ways to provide the
> details of the composite/contributions that it needs (this is what started
> this off on the user list). When I say that the node is configured via an
> atom feed what this means is that the node reads the URL of the composite to
> run and the contributions that requires from and atom feed. It then uses
> these URLs to go get the composite/contributions in question. You can
> provide these URLs directly without using the feed. For example, I updated
> the validation tests, e.g  [1], to make the latest node read from the file
> system. No domain  manager involved. Here's the code...
>
> SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
> node = nodeFactory.createSCANode(new
> File("src/main/resources/DuplicateComponentName/Calculator.composite").toURL().toString(),
>                                                       new
> SCAContribution("TestContribution",
>
>                                                                       new
> File("src/main/resources/DuplicateComponentName").toURL().toString()));
> node.start();
> calculatorService = ((SCAClient)node).getService(CalculatorService.class,
> "CalculatorServiceComponent");
>
> So a little bit more complicated that what we have in host-embedded. The
> parameters to this version of createSCANode are
>
> URL to composite
> List of Contributions (each having a URI and a URL)
>
> I quite like this very explicit specification but we could add the helper
> method back in so, for sample running, we could do something like
>
> node =
> SCANode2Factory.createSCANodeWithComposite("DuplicateComponentName/Calculator.composite");
>
> Regards
>
> Simon
>
> [1]
> http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateComponentNameTestCase.java


Cool thats really helpful. Ok so if we can have a Tomcat TuscanyHost (i.e.
an extension of org.apache.catalina.core.StandardHost not related to the
Tuscany host stuff)  that will get its addChild method called for each
webapp and we can get a File to the root of the webbapp so call
nodeFactory.createSCANode with that and treat each webapp as a seperate
contribution which seems reasonable. That would give us a node per webapp
which i'm not sure is good or bad till theres some answers to the "what is a
node" question.

How do nodes talk to each other or become part of a bigger domain? Theres
nothing in SCANode2Factory.newInstance().createSCANode or node.start that
mentions anything about any domain?

   ...ant

Re: Is there are simple straightforward way of creating a Compoisite

Posted by ant elder <an...@apache.org>.
On Wed, Apr 30, 2008 at 12:00 PM, Simon Laws <si...@googlemail.com>
wrote:

>
>
> On Wed, Apr 30, 2008 at 11:12 AM, ant elder <an...@gmail.com> wrote:
>
> > Bring this comment to the dev list:
> >
> > "The tuscany web app support doesn't use this evolving node
> > implementation
> > just yet. I don't imagine it would be difficult to plug it in ...."
> >  - http://apache.markmail.org/message/4hvdrcafhapy3kyy
> >
> > Coincidentally i was having a look at this just the other day after that
> > user posted about support for Tomcat with multiple webapps in the same
> > SCA
> > domain - http://apache.markmail.org/message/ttssxoruzpndkado.
> >
> > Could you give any pointers at all on where to start with using this
> > evolving node implementation like this? Theres no doc and I'm a bit lost
> > on
> > even which Tuscany modules, samples or tests are current. What I'd like
> > to
> > do is start exploring the updating of the old runtime-tomcat code to use
> > the
> > latest domain stuff so that as Tomcat starts up webapps are detected as
> > SCA
> > contributions and added to a single Tomcat SCA domain. One issue that I
> > remember came up last time doing this is that as this happens during
> > Tomcat
> > startup no http communication can take place so all the registrations of
> > contributions with the domain need to be in-vm.
> >
> >   ...ant
> >
>
> Hi Ant
>
> Am keen to work with you on this. While svn has been down I've spent time
> to resurrect a load balancing demo I have on my local disc (not checked in
> yet) and would like to update the webapps I'm using to the lasted domain
> code but of course I can't.
>
> Here's a summary of what I think is current in terms of
> domain/node/runtime support (but have to admit that there is an amount of
> guessing here).....
>
> sca/distribution/standalone - not sure but think it's redundant -
> forerunner of runtime-standalone?
> sca/distribution/tomcat - not sure but think it's redundant - forerunner
> of runtime-tomcat?
> sca/distribution/war - not sure but think it's redundant - forerunner of
> runtime-war?
> sca/distribution/webapp - not sure but think it's redundant
> sca/modules/domain - old domain SPI
> sca/modules/domain-api - old domain API
> sca/modules/domain-impl - old domain Implementation - has been superseded
> by domain-manager
> sca/modules/domain-manager - new domain management application - replaces
> domain-impl
> sca/modules/host-embedded - original single JVM domain implementation -
> still used in most samples
> sca/modules/host-webapp - original webapp runtime - fires up tuscany based
> on web.xml filter
> sca/modules/host-webapp-junit - not sure but have a feeling it's something
> to do with running itests in different web containers
> sca/modules/node - old node SPI
> sca/modules/node-api - old node API
> sca/modules/node-impl - old node implementation that runs one or more
> composites in a single JVM as part of a distributed domain
> sca/modules/node2-api - new node API
> sca/modules/node2-impl - new node implementation. This node is coded to
> read it's configuration as an atom feed from the new domain-manager
> sca/modules/node2-launcher - start up a node from the command line
> sca/modules/node2-launcher-webapp - had noticed this before - maybe node2
> integration with webapps has been looked at. Let's see!
> sca/modules/runtime - I think this was the last attempt at providing a
> common runtime baseline to be specialized for different environments
> sca/modules/runtime-standalone - command line runtime
> sca/modules/runtime-tomcat - deep tomcat integration (IIRC)
> sca/modules/runtime-war - war rutime
> sca/modules/workspace - SPI for some of the machinery required to process
> contributions at the domain level. Used by domain-manager
> sca/modules/workspace-impl - Implementation of the workspace
> sca/modules/workspace-xml - Reading/writing workspace as XML
>
> So can we get together here and work out what the true picture is and how
> to mode modules/runtime* to node2. First things first I'm going to go look
> at node2-launcher-webapp.
>
> I think the start up process for nodes in a webapp will potentially be
> easier now as the node is just reading atom feeds and not making soap calls.
> Time will tell!
>
> Simon
>

Great, working together would be good and i'm sure make getting somewhere
useful happen much quicker :)

Thanks for the list of module statuses thats helpful, i'll also go look the
node2-launcher-webapp one.

The comment on the use of atom feeds is interesting. To be honest i'd hope
we could have a way to avoid that being needed in this Tomcat use case, or
at least being optional. One issue we had last time when we tried to do this
was that there had to be a separate standalone "domain manager" running
before you could start up a Tomcat instance, and that sucks quite a bit IMHO
so i'd like to try to get a design from the beginning where its not needed.
This will all be happening in a single JVM and with the code bootstrapping
Tuscany being at the "top" classloader so everything should be accessible to
just make direct SPI calls to configure a domain instead of going via a
remote binding shouldn't it?  There have been some emails recently about the
domain/workspace SPIs i guess i need to go read more closely what they were
about.

    ...ant

Re: Is there are simple straightforward way of creating a Compoisite

Posted by ant elder <an...@gmail.com>.
On Wed, Apr 30, 2008 at 1:08 PM, Simon Laws <si...@googlemail.com>
wrote:

>
>
> On Wed, Apr 30, 2008 at 12:49 PM, ant elder <an...@apache.org> wrote:
>
> > On Wed, Apr 30, 2008 at 12:00 PM, Simon Laws <si...@googlemail.com>
> > wrote:
> >
> > >
> > >
> > > On Wed, Apr 30, 2008 at 11:12 AM, ant elder <an...@gmail.com>
> > wrote:
> > >
> > > > Bring this comment to the dev list:
> > > >
> > > > "The tuscany web app support doesn't use this evolving node
> > > > implementation
> > > > just yet. I don't imagine it would be difficult to plug it in ...."
> > > >  - http://apache.markmail.org/message/4hvdrcafhapy3kyy
> > > >
> > > > Coincidentally i was having a look at this just the other day after
> > that
> > > > user posted about support for Tomcat with multiple webapps in the
> > same
> > > > SCA
> > > > domain - http://apache.markmail.org/message/ttssxoruzpndkado.
> > > >
> > > > Could you give any pointers at all on where to start with using this
> > > > evolving node implementation like this? Theres no doc and I'm a bit
> > lost
> > > > on
> > > > even which Tuscany modules, samples or tests are current. What I'd
> > like
> > > > to
> > > > do is start exploring the updating of the old runtime-tomcat code to
> > use
> > > > the
> > > > latest domain stuff so that as Tomcat starts up webapps are detected
> > as
> > > > SCA
> > > > contributions and added to a single Tomcat SCA domain. One issue
> > that I
> > > > remember came up last time doing this is that as this happens during
> > > > Tomcat
> > > > startup no http communication can take place so all the
> > registrations of
> > > > contributions with the domain need to be in-vm.
> > > >
> > > >   ...ant
> > > >
> > >
> > > Hi Ant
> > >
> > > Am keen to work with you on this. While svn has been down I've spent
> > time
> > > to resurrect a load balancing demo I have on my local disc (not
> > checked in
> > > yet) and would like to update the webapps I'm using to the lasted
> > domain
> > > code but of course I can't.
> > >
> > > Here's a summary of what I think is current in terms of
> > > domain/node/runtime support (but have to admit that there is an amount
> > of
> > > guessing here).....
> > >
> > > sca/distribution/standalone - not sure but think it's redundant -
> > > forerunner of runtime-standalone?
> > > sca/distribution/tomcat - not sure but think it's redundant -
> > forerunner
> > > of runtime-tomcat?
> > > sca/distribution/war - not sure but think it's redundant - forerunner
> > of
> > > runtime-war?
> > > sca/distribution/webapp - not sure but think it's redundant
> > > sca/modules/domain - old domain SPI
> > > sca/modules/domain-api - old domain API
> > > sca/modules/domain-impl - old domain Implementation - has been
> > superseded
> > > by domain-manager
> > > sca/modules/domain-manager - new domain management application -
> > replaces
> > > domain-impl
> > > sca/modules/host-embedded - original single JVM domain implementation
> > -
> > > still used in most samples
> > > sca/modules/host-webapp - original webapp runtime - fires up tuscany
> > based
> > > on web.xml filter
> > > sca/modules/host-webapp-junit - not sure but have a feeling it's
> > something
> > > to do with running itests in different web containers
> > > sca/modules/node - old node SPI
> > > sca/modules/node-api - old node API
> > > sca/modules/node-impl - old node implementation that runs one or more
> > > composites in a single JVM as part of a distributed domain
> > > sca/modules/node2-api - new node API
> > > sca/modules/node2-impl - new node implementation. This node is coded
> > to
> > > read it's configuration as an atom feed from the new domain-manager
> > > sca/modules/node2-launcher - start up a node from the command line
> > > sca/modules/node2-launcher-webapp - had noticed this before - maybe
> > node2
> > > integration with webapps has been looked at. Let's see!
> > > sca/modules/runtime - I think this was the last attempt at providing a
> > > common runtime baseline to be specialized for different environments
> > > sca/modules/runtime-standalone - command line runtime
> > > sca/modules/runtime-tomcat - deep tomcat integration (IIRC)
> > > sca/modules/runtime-war - war rutime
> > > sca/modules/workspace - SPI for some of the machinery required to
> > process
> > > contributions at the domain level. Used by domain-manager
> > > sca/modules/workspace-impl - Implementation of the workspace
> > > sca/modules/workspace-xml - Reading/writing workspace as XML
> > >
> > > So can we get together here and work out what the true picture is and
> > how
> > > to mode modules/runtime* to node2. First things first I'm going to go
> > look
> > > at node2-launcher-webapp.
> > >
> > > I think the start up process for nodes in a webapp will potentially be
> > > easier now as the node is just reading atom feeds and not making soap
> > calls.
> > > Time will tell!
> > >
> > > Simon
> > >
> >
> > One more question - what is a node?
> >
> > May seem like a silly question but i'm not sure there's ever been much
> > consensus on a clear definition. Is it something for running a single
> > composite, or a single contribution, or a collection of related
> > contributions? How many nodes would there be on a Tomcat instance doing
> > what
> > that user has posted about, one per webapp, one per Tomcat instance?
> >
> >   ...ant
> >
>
> I don't think there has been consensus on this. There has been a gradual
> evolution of the ideas though.
>
> The term "Node" was originally coined to allow us to separately describe
> the code that runs a composite as opposed to the code that manages the
> domain and in particular how composites are allocated to nodes.
>
> The node2 code runs a single composite. It is provided with the URL of the
> composite and the URL of all contributions required by that composite in
> order to run.
>
> Based on the above we need one node for each composite we want to run. So
> assuming our web app holds a composite we need a node to run it.
>
> Question in my mind is how does this node identify which composite to run.
> What do we do at the moment with webapps? Do we use the list of deployable
> composites. Let me go see.
>
> Simon
>
>
Ah ok, i'd misunderstood before. So the Tuscany StandardHost addChild method
would need to scan the webapp looking for composites. Thats easyish -they'd
either been in the meta-inf/sca-deployables folder or there will be an
sca-contributions.xml although in that case will need to look in all the
folders and jars in the webapp reading every .composite file to find the
ones named in the sca-contributions.xml so it may be easier to get just
support for the sca-deployables ones working as a first attempt.  Either way
then for each compostite found call  nodeFactory.createSCANode passing on
the composite File and the webapp root for the contribution File.

Sound ok?

   ...ant

Re: Is there are simple straightforward way of creating a Compoisite

Posted by Simon Laws <si...@googlemail.com>.
On Wed, Apr 30, 2008 at 12:49 PM, ant elder <an...@apache.org> wrote:

> On Wed, Apr 30, 2008 at 12:00 PM, Simon Laws <si...@googlemail.com>
> wrote:
>
> >
> >
> > On Wed, Apr 30, 2008 at 11:12 AM, ant elder <an...@gmail.com> wrote:
> >
> > > Bring this comment to the dev list:
> > >
> > > "The tuscany web app support doesn't use this evolving node
> > > implementation
> > > just yet. I don't imagine it would be difficult to plug it in ...."
> > >  - http://apache.markmail.org/message/4hvdrcafhapy3kyy
> > >
> > > Coincidentally i was having a look at this just the other day after
> that
> > > user posted about support for Tomcat with multiple webapps in the same
> > > SCA
> > > domain - http://apache.markmail.org/message/ttssxoruzpndkado.
> > >
> > > Could you give any pointers at all on where to start with using this
> > > evolving node implementation like this? Theres no doc and I'm a bit
> lost
> > > on
> > > even which Tuscany modules, samples or tests are current. What I'd
> like
> > > to
> > > do is start exploring the updating of the old runtime-tomcat code to
> use
> > > the
> > > latest domain stuff so that as Tomcat starts up webapps are detected
> as
> > > SCA
> > > contributions and added to a single Tomcat SCA domain. One issue that
> I
> > > remember came up last time doing this is that as this happens during
> > > Tomcat
> > > startup no http communication can take place so all the registrations
> of
> > > contributions with the domain need to be in-vm.
> > >
> > >   ...ant
> > >
> >
> > Hi Ant
> >
> > Am keen to work with you on this. While svn has been down I've spent
> time
> > to resurrect a load balancing demo I have on my local disc (not checked
> in
> > yet) and would like to update the webapps I'm using to the lasted domain
> > code but of course I can't.
> >
> > Here's a summary of what I think is current in terms of
> > domain/node/runtime support (but have to admit that there is an amount
> of
> > guessing here).....
> >
> > sca/distribution/standalone - not sure but think it's redundant -
> > forerunner of runtime-standalone?
> > sca/distribution/tomcat - not sure but think it's redundant - forerunner
> > of runtime-tomcat?
> > sca/distribution/war - not sure but think it's redundant - forerunner of
> > runtime-war?
> > sca/distribution/webapp - not sure but think it's redundant
> > sca/modules/domain - old domain SPI
> > sca/modules/domain-api - old domain API
> > sca/modules/domain-impl - old domain Implementation - has been
> superseded
> > by domain-manager
> > sca/modules/domain-manager - new domain management application -
> replaces
> > domain-impl
> > sca/modules/host-embedded - original single JVM domain implementation -
> > still used in most samples
> > sca/modules/host-webapp - original webapp runtime - fires up tuscany
> based
> > on web.xml filter
> > sca/modules/host-webapp-junit - not sure but have a feeling it's
> something
> > to do with running itests in different web containers
> > sca/modules/node - old node SPI
> > sca/modules/node-api - old node API
> > sca/modules/node-impl - old node implementation that runs one or more
> > composites in a single JVM as part of a distributed domain
> > sca/modules/node2-api - new node API
> > sca/modules/node2-impl - new node implementation. This node is coded to
> > read it's configuration as an atom feed from the new domain-manager
> > sca/modules/node2-launcher - start up a node from the command line
> > sca/modules/node2-launcher-webapp - had noticed this before - maybe
> node2
> > integration with webapps has been looked at. Let's see!
> > sca/modules/runtime - I think this was the last attempt at providing a
> > common runtime baseline to be specialized for different environments
> > sca/modules/runtime-standalone - command line runtime
> > sca/modules/runtime-tomcat - deep tomcat integration (IIRC)
> > sca/modules/runtime-war - war rutime
> > sca/modules/workspace - SPI for some of the machinery required to
> process
> > contributions at the domain level. Used by domain-manager
> > sca/modules/workspace-impl - Implementation of the workspace
> > sca/modules/workspace-xml - Reading/writing workspace as XML
> >
> > So can we get together here and work out what the true picture is and
> how
> > to mode modules/runtime* to node2. First things first I'm going to go
> look
> > at node2-launcher-webapp.
> >
> > I think the start up process for nodes in a webapp will potentially be
> > easier now as the node is just reading atom feeds and not making soap
> calls.
> > Time will tell!
> >
> > Simon
> >
>
> One more question - what is a node?
>
> May seem like a silly question but i'm not sure there's ever been much
> consensus on a clear definition. Is it something for running a single
> composite, or a single contribution, or a collection of related
> contributions? How many nodes would there be on a Tomcat instance doing
> what
> that user has posted about, one per webapp, one per Tomcat instance?
>
>   ...ant
>

I don't think there has been consensus on this. There has been a gradual
evolution of the ideas though.

The term "Node" was originally coined to allow us to separately describe the
code that runs a composite as opposed to the code that manages the domain
and in particular how composites are allocated to nodes.

The node2 code runs a single composite. It is provided with the URL of the
composite and the URL of all contributions required by that composite in
order to run.

Based on the above we need one node for each composite we want to run. So
assuming our web app holds a composite we need a node to run it.

Question in my mind is how does this node identify which composite to run.
What do we do at the moment with webapps? Do we use the list of deployable
composites. Let me go see.

Simon

Re: Is there are simple straightforward way of creating a Compoisite

Posted by ant elder <an...@apache.org>.
On Wed, Apr 30, 2008 at 12:00 PM, Simon Laws <si...@googlemail.com>
wrote:

>
>
> On Wed, Apr 30, 2008 at 11:12 AM, ant elder <an...@gmail.com> wrote:
>
> > Bring this comment to the dev list:
> >
> > "The tuscany web app support doesn't use this evolving node
> > implementation
> > just yet. I don't imagine it would be difficult to plug it in ...."
> >  - http://apache.markmail.org/message/4hvdrcafhapy3kyy
> >
> > Coincidentally i was having a look at this just the other day after that
> > user posted about support for Tomcat with multiple webapps in the same
> > SCA
> > domain - http://apache.markmail.org/message/ttssxoruzpndkado.
> >
> > Could you give any pointers at all on where to start with using this
> > evolving node implementation like this? Theres no doc and I'm a bit lost
> > on
> > even which Tuscany modules, samples or tests are current. What I'd like
> > to
> > do is start exploring the updating of the old runtime-tomcat code to use
> > the
> > latest domain stuff so that as Tomcat starts up webapps are detected as
> > SCA
> > contributions and added to a single Tomcat SCA domain. One issue that I
> > remember came up last time doing this is that as this happens during
> > Tomcat
> > startup no http communication can take place so all the registrations of
> > contributions with the domain need to be in-vm.
> >
> >   ...ant
> >
>
> Hi Ant
>
> Am keen to work with you on this. While svn has been down I've spent time
> to resurrect a load balancing demo I have on my local disc (not checked in
> yet) and would like to update the webapps I'm using to the lasted domain
> code but of course I can't.
>
> Here's a summary of what I think is current in terms of
> domain/node/runtime support (but have to admit that there is an amount of
> guessing here).....
>
> sca/distribution/standalone - not sure but think it's redundant -
> forerunner of runtime-standalone?
> sca/distribution/tomcat - not sure but think it's redundant - forerunner
> of runtime-tomcat?
> sca/distribution/war - not sure but think it's redundant - forerunner of
> runtime-war?
> sca/distribution/webapp - not sure but think it's redundant
> sca/modules/domain - old domain SPI
> sca/modules/domain-api - old domain API
> sca/modules/domain-impl - old domain Implementation - has been superseded
> by domain-manager
> sca/modules/domain-manager - new domain management application - replaces
> domain-impl
> sca/modules/host-embedded - original single JVM domain implementation -
> still used in most samples
> sca/modules/host-webapp - original webapp runtime - fires up tuscany based
> on web.xml filter
> sca/modules/host-webapp-junit - not sure but have a feeling it's something
> to do with running itests in different web containers
> sca/modules/node - old node SPI
> sca/modules/node-api - old node API
> sca/modules/node-impl - old node implementation that runs one or more
> composites in a single JVM as part of a distributed domain
> sca/modules/node2-api - new node API
> sca/modules/node2-impl - new node implementation. This node is coded to
> read it's configuration as an atom feed from the new domain-manager
> sca/modules/node2-launcher - start up a node from the command line
> sca/modules/node2-launcher-webapp - had noticed this before - maybe node2
> integration with webapps has been looked at. Let's see!
> sca/modules/runtime - I think this was the last attempt at providing a
> common runtime baseline to be specialized for different environments
> sca/modules/runtime-standalone - command line runtime
> sca/modules/runtime-tomcat - deep tomcat integration (IIRC)
> sca/modules/runtime-war - war rutime
> sca/modules/workspace - SPI for some of the machinery required to process
> contributions at the domain level. Used by domain-manager
> sca/modules/workspace-impl - Implementation of the workspace
> sca/modules/workspace-xml - Reading/writing workspace as XML
>
> So can we get together here and work out what the true picture is and how
> to mode modules/runtime* to node2. First things first I'm going to go look
> at node2-launcher-webapp.
>
> I think the start up process for nodes in a webapp will potentially be
> easier now as the node is just reading atom feeds and not making soap calls.
> Time will tell!
>
> Simon
>

One more question - what is a node?

May seem like a silly question but i'm not sure there's ever been much
consensus on a clear definition. Is it something for running a single
composite, or a single contribution, or a collection of related
contributions? How many nodes would there be on a Tomcat instance doing what
that user has posted about, one per webapp, one per Tomcat instance?

   ...ant

Re: Is there are simple straightforward way of creating a Compoisite

Posted by Simon Laws <si...@googlemail.com>.
On Wed, Apr 30, 2008 at 12:00 PM, Simon Laws <si...@googlemail.com>
wrote:

>
>
> On Wed, Apr 30, 2008 at 11:12 AM, ant elder <an...@gmail.com> wrote:
>
> > Bring this comment to the dev list:
> >
> > "The tuscany web app support doesn't use this evolving node
> > implementation
> > just yet. I don't imagine it would be difficult to plug it in ...."
> >  - http://apache.markmail.org/message/4hvdrcafhapy3kyy
> >
> > Coincidentally i was having a look at this just the other day after that
> > user posted about support for Tomcat with multiple webapps in the same
> > SCA
> > domain - http://apache.markmail.org/message/ttssxoruzpndkado.
> >
> > Could you give any pointers at all on where to start with using this
> > evolving node implementation like this? Theres no doc and I'm a bit lost
> > on
> > even which Tuscany modules, samples or tests are current. What I'd like
> > to
> > do is start exploring the updating of the old runtime-tomcat code to use
> > the
> > latest domain stuff so that as Tomcat starts up webapps are detected as
> > SCA
> > contributions and added to a single Tomcat SCA domain. One issue that I
> > remember came up last time doing this is that as this happens during
> > Tomcat
> > startup no http communication can take place so all the registrations of
> > contributions with the domain need to be in-vm.
> >
> >   ...ant
> >
>
> Hi Ant
>
> Am keen to work with you on this. While svn has been down I've spent time
> to resurrect a load balancing demo I have on my local disc (not checked in
> yet) and would like to update the webapps I'm using to the lasted domain
> code but of course I can't.
>
> Here's a summary of what I think is current in terms of
> domain/node/runtime support (but have to admit that there is an amount of
> guessing here).....
>
> sca/distribution/standalone - not sure but think it's redundant -
> forerunner of runtime-standalone?
> sca/distribution/tomcat - not sure but think it's redundant - forerunner
> of runtime-tomcat?
> sca/distribution/war - not sure but think it's redundant - forerunner of
> runtime-war?
> sca/distribution/webapp - not sure but think it's redundant
> sca/modules/domain - old domain SPI
> sca/modules/domain-api - old domain API
> sca/modules/domain-impl - old domain Implementation - has been superseded
> by domain-manager
> sca/modules/domain-manager - new domain management application - replaces
> domain-impl
> sca/modules/host-embedded - original single JVM domain implementation -
> still used in most samples
> sca/modules/host-webapp - original webapp runtime - fires up tuscany based
> on web.xml filter
> sca/modules/host-webapp-junit - not sure but have a feeling it's something
> to do with running itests in different web containers
> sca/modules/node - old node SPI
> sca/modules/node-api - old node API
> sca/modules/node-impl - old node implementation that runs one or more
> composites in a single JVM as part of a distributed domain
> sca/modules/node2-api - new node API
> sca/modules/node2-impl - new node implementation. This node is coded to
> read it's configuration as an atom feed from the new domain-manager
> sca/modules/node2-launcher - start up a node from the command line
> sca/modules/node2-launcher-webapp - had noticed this before - maybe node2
> integration with webapps has been looked at. Let's see!
> sca/modules/runtime - I think this was the last attempt at providing a
> common runtime baseline to be specialized for different environments
> sca/modules/runtime-standalone - command line runtime
> sca/modules/runtime-tomcat - deep tomcat integration (IIRC)
> sca/modules/runtime-war - war rutime
> sca/modules/workspace - SPI for some of the machinery required to process
> contributions at the domain level. Used by domain-manager
> sca/modules/workspace-impl - Implementation of the workspace
> sca/modules/workspace-xml - Reading/writing workspace as XML
>
> So can we get together here and work out what the true picture is and how
> to mode modules/runtime* to node2. First things first I'm going to go look
> at node2-launcher-webapp.
>
> I think the start up process for nodes in a webapp will potentially be
> easier now as the node is just reading atom feeds and not making soap calls.
> Time will tell!
>
> Simon
>

A couple more to add to the list...

sca/modules/implementation-node - a model of a node in the distributed
domain, assigns a composite to the node and provides default binding details
sca/modules/implementation-node-xml - readers/writers for the model
sca/modules/implementation-node-runtime - some launchers and some web app
stuff in here also
sca/samples/calculator-distributed - a basic sample that uses the new
domain/node code
sca/tutorial/* - a multi composite store application that uses the new
domain/node code

Simon

Re: Is there are simple straightforward way of creating a Compoisite

Posted by Simon Laws <si...@googlemail.com>.
On Wed, Apr 30, 2008 at 11:12 AM, ant elder <an...@gmail.com> wrote:

> Bring this comment to the dev list:
>
> "The tuscany web app support doesn't use this evolving node implementation
> just yet. I don't imagine it would be difficult to plug it in ...."
>  - http://apache.markmail.org/message/4hvdrcafhapy3kyy
>
> Coincidentally i was having a look at this just the other day after that
> user posted about support for Tomcat with multiple webapps in the same SCA
> domain - http://apache.markmail.org/message/ttssxoruzpndkado.
>
> Could you give any pointers at all on where to start with using this
> evolving node implementation like this? Theres no doc and I'm a bit lost
> on
> even which Tuscany modules, samples or tests are current. What I'd like to
> do is start exploring the updating of the old runtime-tomcat code to use
> the
> latest domain stuff so that as Tomcat starts up webapps are detected as
> SCA
> contributions and added to a single Tomcat SCA domain. One issue that I
> remember came up last time doing this is that as this happens during
> Tomcat
> startup no http communication can take place so all the registrations of
> contributions with the domain need to be in-vm.
>
>   ...ant
>

Hi Ant

Am keen to work with you on this. While svn has been down I've spent time to
resurrect a load balancing demo I have on my local disc (not checked in yet)
and would like to update the webapps I'm using to the lasted domain code but
of course I can't.

Here's a summary of what I think is current in terms of domain/node/runtime
support (but have to admit that there is an amount of guessing here).....

sca/distribution/standalone - not sure but think it's redundant - forerunner
of runtime-standalone?
sca/distribution/tomcat - not sure but think it's redundant - forerunner of
runtime-tomcat?
sca/distribution/war - not sure but think it's redundant - forerunner of
runtime-war?
sca/distribution/webapp - not sure but think it's redundant
sca/modules/domain - old domain SPI
sca/modules/domain-api - old domain API
sca/modules/domain-impl - old domain Implementation - has been superseded by
domain-manager
sca/modules/domain-manager - new domain management application - replaces
domain-impl
sca/modules/host-embedded - original single JVM domain implementation -
still used in most samples
sca/modules/host-webapp - original webapp runtime - fires up tuscany based
on web.xml filter
sca/modules/host-webapp-junit - not sure but have a feeling it's something
to do with running itests in different web containers
sca/modules/node - old node SPI
sca/modules/node-api - old node API
sca/modules/node-impl - old node implementation that runs one or more
composites in a single JVM as part of a distributed domain
sca/modules/node2-api - new node API
sca/modules/node2-impl - new node implementation. This node is coded to read
it's configuration as an atom feed from the new domain-manager
sca/modules/node2-launcher - start up a node from the command line
sca/modules/node2-launcher-webapp - had noticed this before - maybe node2
integration with webapps has been looked at. Let's see!
sca/modules/runtime - I think this was the last attempt at providing a
common runtime baseline to be specialized for different environments
sca/modules/runtime-standalone - command line runtime
sca/modules/runtime-tomcat - deep tomcat integration (IIRC)
sca/modules/runtime-war - war rutime
sca/modules/workspace - SPI for some of the machinery required to process
contributions at the domain level. Used by domain-manager
sca/modules/workspace-impl - Implementation of the workspace
sca/modules/workspace-xml - Reading/writing workspace as XML

So can we get together here and work out what the true picture is and how to
mode modules/runtime* to node2. First things first I'm going to go look at
node2-launcher-webapp.

I think the start up process for nodes in a webapp will potentially be
easier now as the node is just reading atom feeds and not making soap calls.
Time will tell!

Simon