Thanks, Raymond. I'll investigate your suggestions, and post back with
any more
questions.
--Rich
________________________________
From: Raymond Feng [mailto:[EMAIL PROTECTED]
Sent: Monday, August 04, 2008 8:55 AM
To: [email protected]
Subject: Re: Question on dynamic configuration of distributed
application
Hi,
Thank you for your interest in Tuscany. I have two quick comments
inline.
Raymond
From: Rich Smith (rjsmith2) <mailto:[EMAIL PROTECTED]>
Sent: Monday, August 04, 2008 7:57 AM
To: [email protected]
Subject: Question on dynamic configuration of distributed application
Resending this question now that I am able to get on the mailing list.
Apologies to
anyone who gets it twice.
Hi, all. I'm working on evaluation of Tuscany Java, and need some
advice on a
particular configuration/use-case that we are planning for our
application.
The application will be scalable from a low-end deployment where it runs
on a
single server to a high-end, distributed deployment, running on several
servers.
SCA and Tuscany seem like a good fit for this.
In the high-end case, there will be several instances of "back-end
servers", each
of which will run different instances of the same components. The
front-end will
keep a mapping of which back-end server to use for which resources, and
so this
is _not_ going to require any kind of load balancing.
So far, I've figured out that I can register the back-end server
components using
separate service names, and just get those service references using the
appropriate
names.
<rfeng>In a SCA domain, the components in top-level composites should
have unique names. But we can configure more than one components to use
the same implementation. Would it help for your use case?</rfeng>
However, I want to configure the back-ends using our application and not
using
static files (as in the calculator-distributed sample) because it will
be necessary
to allow customers to add back-end servers as they need to increase
capacity.
The thought of having to regenerate all of the .composite files does not
appeal to
me, and I don't really want to generate five copies of the same file
with different
service names.
What is the best approach for this? Is there something I can do using
SPI to
dynamically configure a distributed Tuscany Java application? (It's
probably okay
if restart is required somewhere, but it would be even better if not.)
<rfeng>SCA does have the deployment composite concept. It allows we use
a dynamically configured composite (instead of being packaged in a SCA
contribution) to deploy the application. In Tuscany, we have the
following API:
org.apache.tuscany.sca.node.SCANode2Factory.createSCANode(String,
String, SCAContribution...)
The 2nd argument is a String representing the XML for the deployment
composite.
We also have a SCA Domain Manager in Tuscany which provides the
administration capability. It's built as a SCA composite application
with Web 2.0 front end. The function can be used programmatically to
introspect contributions/composites, resolve wirings and configure nodes
for deployment. You might be able to explore it for your purpose.
Please try the store tuturial to get a better understanding:
https://svn.apache.org/repos/asf/tuscany/java/sca/tutorials/store/domain
</rfeng>
Please let me know.
--Rich