On Wed, May 7, 2008 at 9:55 AM, ant elder <[EMAIL PROTECTED]> wrote:

> On Wed, Apr 30, 2008 at 1:18 PM, Simon Laws <[EMAIL PROTECTED]>
> 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

Reply via email to