On Wed, Apr 30, 2008 at 1:52 PM, ant elder <[EMAIL PROTECTED]> wrote:

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

Reply via email to