You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Da...@empolis.com on 2008/04/08 16:19:50 UTC

Status of Load-Balancing, Failover and Service lookup.

Hi all,

I just read through some older postings concerning Load-Balancing,
Failover and Service lookup.

http://www.mail-archive.com/tuscany-user@ws.apache.org/msg01858.html
http://www.mail-archive.com/tuscany-user@ws.apache.org/msg01539.html

I'm interested in the status of these topics ?
What are the current ideas/plans or are there already any solutions ?
What about the Simon's toughts
http://cwiki.apache.org/TUSCANYWIKI/distributed-runtime.html

Bye,
Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Status of Load-Balancing, Failover and Service lookup.

Posted by Simon Laws <si...@googlemail.com>.
On Fri, Apr 11, 2008 at 11:28 AM, <Da...@empolis.com> wrote:

> Hi Simon,
>
> > Ah - That's a good piece of detective work. The new workspace
> > support  uses some new modules, e.g, node2-* that are
> > intended in due course to replace some of the existing
> > modules and this may be causing problems with the whole lib
> > dir in the classpath. Are you able to manually pull out the
> > correct dependencies and try that.
> >
> > I should point out that there is also some code in the
> > launcher we are using that calculates the classpath at
> > runtime. See the runtimeClassLoader method in  [1]. This uses
> > the location of the launcher jar to identify the directory of
> > other jars that need loading. So if you look in the ant
> > script use to run this from the binary distribution
> > (build.xml) you will see that the classpath is very short.
> > This is because the code takes this classpath and
> > automatically appends all of the runtime jars. The important
> > thing is that the stated node2 jars come first. While this
> > runtime classpath creation won't work from eclipse (because
> > the modules & lib dirs are not in the right
> > place) you may be able to play the trick of putting the node2
> > jars first on your classpath.
> >
>
>
> I just toyed with my classpath settings. At one point, the only jars
> included in my classpath were the ones from the build.xml:
> - tuscany-node2-api-1.2-incubating-SNAPSHOT.jar
> - tuscany-node2-launcher-1.2-incubating-SNAPSHOT.jar
> - tuscany-sca-api-1.2-incubating-SNAPSHOT.jar
>
> No 3rd party jars and no Tuscany lib.
>
> On console is the following output
>        11.04.2008 12:06:28
> org.apache.tuscany.sca.node.launcher.NodeLauncherUtil collectJARFiles
>        INFO: Runtime classpath: 93 JARs from
> C:\develop\tuscany\tuscany-sca-1.2-incubating-SNAPSHOT\modules
>        11.04.2008 12:06:28
> org.apache.tuscany.sca.node.launcher.NodeLauncherUtil collectJARFiles
>        INFO: Runtime classpath: 148 JARs from
> C:\develop\tuscany\tuscany-sca-1.2-incubating-SNAPSHOT\lib
>
> So the classpath calculation during runtime seems to work (how does it
> get the correct path? Based on the jars from the static classpath?).
> However, the sample still does not work and I don't get any error
> messages either.
>
> Bye,
> Daniel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>

Hi Daniel

It loads all of the jars from

1) the directory where the launcher class is found.
2) the ../modules directory
3) the ../libs directory

It then repeats the process looking for ../modules and ../lib dirs based on
the contents of  a TUSCANY_HOME environment variable

With the final list it creates a URLClassLoader with the current classloader
as the parent and enforces a parent first classloading strategy.

Thinking about this this generated classpath is not optimal as it will
contain jars that conflict with one another, e.g. host-tomcat and
host-jetty. Having said that this does work from the command line so I'm
struggling to see exactly what is causing it to fail in your Eclipse
project.  I'd like to take a two stage approach to this. Firstly just get it
working then secondly get it working in a way that you are comfortable with.


So is it possible  to  try generating the Eclipse project using the
-Peclipse approach just to convince ourselves that this sample is going to
work. I've appended at the bottom the contents of my .classpath file for the
calculator-distributed project in my Eclipse workspace if you want to see
how mine looks. We may then find that something else is causing problems
over and above classpath issues.

Assuming we get it working we can then look at how you can tailor the
configuration.

Regards

Simon

=====================

<classpath>
  <classpathentry kind="src" path="src/main/java"/>
  <classpathentry kind="src" path="src/main/resources"
excluding="**/*.java"/>
  <classpathentry kind="src" path="src/test/java"
output="target/test-classes"/>
  <classpathentry kind="output" path="target/classes"/>
  <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/abdera/abdera-core/0.3.0-incubating/abdera-core-0.3.0-incubating.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/abdera/abdera-i18n/0.3.0-incubating/abdera-i18n-0.3.0-incubating.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/abdera/abdera-parser/0.3.0-incubating/abdera-parser-0.3.0-incubating.jar"/>
  <classpathentry kind="var"
path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar"/>
  <classpathentry kind="var"
path="M2_REPO/annogen/annogen/0.1.0/annogen-0.1.0.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/tomcat/annotations-api/6.0.14/annotations-api-6.0.14.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/ws/commons/axiom/axiom-api/1.2.5/axiom-api-1.2.5.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/ws/commons/axiom/axiom-dom/1.2.5/axiom-dom-1.2.5.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/ws/commons/axiom/axiom-impl/1.2.5/axiom-impl-1.2.5.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/axis2/axis2-adb/1.3/axis2-adb-1.3.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/axis2/axis2-adb-codegen/1.3/axis2-adb-codegen-1.3.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/axis2/axis2-codegen/1.3/axis2-codegen-1.3.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/axis2/axis2-java2wsdl/1.3/axis2-java2wsdl-1.3.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/axis2/axis2-kernel/1.3/axis2-kernel-1.3.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/axis2/axis2-mtompolicy/1.3/axis2-mtompolicy-1.3.jar"/>
  <classpathentry kind="var"
path="M2_REPO/backport-util-concurrent/backport-util-concurrent/2.2/backport-util-concurrent-2.2.jar"/>
  <classpathentry kind="var"
path="M2_REPO/bouncycastle/bcprov-jdk15/132/bcprov-jdk15-132.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/tomcat/catalina/6.0.14/catalina-6.0.14.jar"/>
  <classpathentry kind="var"
path="M2_REPO/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar"/>
  <classpathentry kind="var"
path="M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3.jar"/>
  <classpathentry kind="var"
path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/>
  <classpathentry kind="var"
path="M2_REPO/commons-discovery/commons-discovery/0.2/commons-discovery-0.2.jar"/>
  <classpathentry kind="var"
path="M2_REPO/commons-fileupload/commons-fileupload/1.2/commons-fileupload-1.2.jar"/>
  <classpathentry kind="var"
path="M2_REPO/commons-httpclient/commons-httpclient/3.0.1/commons-httpclient-3.0.1.jar"/>
  <classpathentry kind="var"
path="M2_REPO/commons-io/commons-io/1.2/commons-io-1.2.jar"/>
  <classpathentry kind="var"
path="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/tomcat/coyote/6.0.14/coyote-6.0.14.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/geronimo/specs/geronimo-activation_1.0.2_spec/1.1/geronimo-activation_1.0.2_spec-1.1.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/geronimo/specs/geronimo-activation_1.1_spec/1.0-M1/geronimo-activation_1.1_spec-1.0-M1.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/geronimo/specs/geronimo-commonj_1.1_spec/1.0/geronimo-commonj_1.1_spec-1.0.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/geronimo/specs/geronimo-javamail_1.4_spec/1.0-M1/geronimo-javamail_1.4_spec-1.0-M1.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1/geronimo-jms_1.1_spec-1.1.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/httpcomponents/httpcore/4.0-alpha5/httpcore-4.0-alpha5.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/httpcomponents/httpcore-nio/4.0-alpha5/httpcore-nio-4.0-alpha5.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/httpcomponents/httpcore-niossl/4.0-alpha5/httpcore-niossl-4.0-alpha5.jar"/>
  <classpathentry kind="var"
path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar"/>
  <classpathentry kind="var"
path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/jvnet/jaxb/reflection/jaxb2-reflection/2.1.4/jaxb2-reflection-2.1.4.jar"/>
  <classpathentry kind="var"
path="M2_REPO/jaxen/jaxen/1.1-beta-9/jaxen-1.1-beta-9.jar"/>
  <classpathentry kind="var"
path="M2_REPO/javax/xml/ws/jaxws-api/2.1/jaxws-api-2.1.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/codehaus/jettison/jettison/1.0/jettison-1.0.jar"/>
  <classpathentry kind="var"
path="M2_REPO/com/metaparadigm/json-rpc/1.0/json-rpc-1.0.jar"/>
  <classpathentry kind="var"
path="M2_REPO/javax/jws/jsr181-api/1.0-MR1/jsr181-api-1.0-MR1.jar"/>
  <classpathentry kind="var"
path="M2_REPO/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/tomcat/juli/6.0.14/juli-6.0.14.jar"/>
  <classpathentry kind="var" path="M2_REPO/junit/junit/4.2/junit-4.2.jar"/>
  <classpathentry kind="var"
path="M2_REPO/log4j/log4j/1.2.12/log4j-1.2.12.jar"/>
  <classpathentry kind="var"
path="M2_REPO/logkit/logkit/1.0.1/logkit-1.0.1.jar"/>
  <classpathentry kind="var"
path="M2_REPO/javax/mail/mail/1.4/mail-1.4.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/neethi/neethi/2.0.2/neethi-2.0.2.jar"/>
  <classpathentry kind="var"
path="M2_REPO/opensaml/opensaml/1.1/opensaml-1.1.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/rampart/rampart-core/1.3/rampart-core-1.3.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/rampart/rampart-policy/1.3/rampart-policy-1.3.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/rampart/rampart-trust/1.3/rampart-trust-1.3.jar"/>
  <classpathentry kind="var"
path="M2_REPO/javax/xml/soap/saaj-api/1.3/saaj-api-1.3.jar"/>
  <classpathentry kind="var"
path="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar"/>
  <classpathentry kind="var"
path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar"/>
  <classpathentry kind="var"
path="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar"/>
  <classpathentry kind="src" path="/tuscany-assembly"/>
  <classpathentry kind="src" path="/tuscany-assembly-xml"/>
  <classpathentry kind="src" path="/tuscany-assembly-xsd"/>
  <classpathentry kind="src" path="/tuscany-binding-atom"/>
  <classpathentry kind="src" path="/tuscany-binding-atom-abdera"/>
  <classpathentry kind="src" path="/tuscany-binding-http"/>
  <classpathentry kind="src" path="/tuscany-binding-jsonrpc"/>
  <classpathentry kind="src" path="/tuscany-binding-sca"/>
  <classpathentry kind="src" path="/tuscany-binding-sca-axis2"/>
  <classpathentry kind="src" path="/tuscany-binding-sca-xml"/>
  <classpathentry kind="src" path="/tuscany-binding-ws"/>
  <classpathentry kind="src" path="/tuscany-binding-ws-axis2"/>
  <classpathentry kind="src" path="/tuscany-binding-ws-xml"/>
  <classpathentry kind="src" path="/tuscany-contribution"/>
  <classpathentry kind="src" path="/tuscany-contribution-impl"/>
  <classpathentry kind="src" path="/tuscany-contribution-java"/>
  <classpathentry kind="src" path="/tuscany-contribution-namespace"/>
  <classpathentry kind="src" path="/tuscany-contribution-resource"/>
  <classpathentry kind="src" path="/tuscany-contribution-xml"/>
  <classpathentry kind="src" path="/tuscany-core"/>
  <classpathentry kind="src" path="/tuscany-core-databinding"/>
  <classpathentry kind="src" path="/tuscany-core-spi"/>
  <classpathentry kind="src" path="/tuscany-databinding"/>
  <classpathentry kind="src" path="/tuscany-databinding-axiom"/>
  <classpathentry kind="src" path="/tuscany-databinding-jaxb"/>
  <classpathentry kind="src" path="/tuscany-databinding-json"/>
  <classpathentry kind="src" path="/tuscany-definitions"/>
  <classpathentry kind="src" path="/tuscany-definitions-xml"/>
  <classpathentry kind="src" path="/tuscany-domain"/>
  <classpathentry kind="src" path="/tuscany-domain-api"/>
  <classpathentry kind="src" path="/tuscany-extensibility"/>
  <classpathentry kind="src" path="/tuscany-host-embedded"/>
  <classpathentry kind="src" path="/tuscany-host-http"/>
  <classpathentry kind="src" path="/tuscany-host-tomcat"/>
  <classpathentry kind="src" path="/tuscany-implementation-data-api"/>
  <classpathentry kind="src" path="/tuscany-implementation-java"/>
  <classpathentry kind="src" path="/tuscany-implementation-java-runtime"/>
  <classpathentry kind="src" path="/tuscany-implementation-java-xml"/>
  <classpathentry kind="src" path="/tuscany-implementation-node"/>
  <classpathentry kind="src" path="/tuscany-implementation-node-runtime"/>
  <classpathentry kind="src" path="/tuscany-implementation-node-xml"/>
  <classpathentry kind="src" path="/tuscany-implementation-resource"/>
  <classpathentry kind="src" path="/tuscany-implementation-widget"/>
  <classpathentry kind="src" path="/tuscany-interface"/>
  <classpathentry kind="src" path="/tuscany-interface-java"/>
  <classpathentry kind="src" path="/tuscany-interface-java-jaxws"/>
  <classpathentry kind="src" path="/tuscany-interface-java-xml"/>
  <classpathentry kind="src" path="/tuscany-interface-wsdl"/>
  <classpathentry kind="src" path="/tuscany-interface-wsdl-java2wsdl"/>
  <classpathentry kind="src" path="/tuscany-interface-wsdl-xml"/>
  <classpathentry kind="src" path="/tuscany-node"/>
  <classpathentry kind="src" path="/tuscany-node-api"/>
  <classpathentry kind="src" path="/tuscany-node2-api"/>
  <classpathentry kind="src" path="/tuscany-node2-impl"/>
  <classpathentry kind="src" path="/tuscany-node2-launcher"/>
  <classpathentry kind="src" path="/tuscany-policy"/>
  <classpathentry kind="src" path="/tuscany-policy-security"/>
  <classpathentry kind="src" path="/tuscany-policy-xml"/>
  <classpathentry kind="src" path="/tuscany-sca-api"/>
  <classpathentry kind="src" path="/tuscany-workspace"/>
  <classpathentry kind="src" path="/tuscany-workspace-admin"/>
  <classpathentry kind="src" path="/tuscany-workspace-impl"/>
  <classpathentry kind="src" path="/tuscany-workspace-xml"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/woden/woden/1.0-incubating-M7b/woden-1.0-incubating-M7b.jar"/>
  <classpathentry kind="var"
path="M2_REPO/wsdl4j/wsdl4j/1.6.2/wsdl4j-1.6.2.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/ws/security/wss4j/1.5.3/wss4j-1.5.3.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/codehaus/woodstox/wstx-asl/3.2.1/wstx-asl-3.2.1.jar"/>
  <classpathentry kind="var"
path="M2_REPO/xalan/xalan/2.7.0/xalan-2.7.0.jar"/>
  <classpathentry kind="var"
path="M2_REPO/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar"/>
  <classpathentry kind="var"
path="M2_REPO/xml-apis/xml-apis/1.3.03/xml-apis-1.3.03.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/ws/commons/schema/XmlSchema/1.3.2/XmlSchema-1.3.2.jar"/>
  <classpathentry kind="var"
path="M2_REPO/org/apache/santuario/xmlsec/1.4.0/xmlsec-1.4.0.jar"/>
</classpath>

AW: Status of Load-Balancing, Failover and Service lookup.

Posted by Da...@empolis.com.
Hi Simon,

> Ah - That's a good piece of detective work. The new workspace 
> support  uses some new modules, e.g, node2-* that are 
> intended in due course to replace some of the existing 
> modules and this may be causing problems with the whole lib 
> dir in the classpath. Are you able to manually pull out the 
> correct dependencies and try that.
> 
> I should point out that there is also some code in the 
> launcher we are using that calculates the classpath at 
> runtime. See the runtimeClassLoader method in  [1]. This uses 
> the location of the launcher jar to identify the directory of 
> other jars that need loading. So if you look in the ant 
> script use to run this from the binary distribution 
> (build.xml) you will see that the classpath is very short. 
> This is because the code takes this classpath and 
> automatically appends all of the runtime jars. The important 
> thing is that the stated node2 jars come first. While this 
> runtime classpath creation won't work from eclipse (because 
> the modules & lib dirs are not in the right
> place) you may be able to play the trick of putting the node2 
> jars first on your classpath.
> 


I just toyed with my classpath settings. At one point, the only jars
included in my classpath were the ones from the build.xml:
- tuscany-node2-api-1.2-incubating-SNAPSHOT.jar
- tuscany-node2-launcher-1.2-incubating-SNAPSHOT.jar
- tuscany-sca-api-1.2-incubating-SNAPSHOT.jar

No 3rd party jars and no Tuscany lib.

On console is the following output
	11.04.2008 12:06:28
org.apache.tuscany.sca.node.launcher.NodeLauncherUtil collectJARFiles
	INFO: Runtime classpath: 93 JARs from
C:\develop\tuscany\tuscany-sca-1.2-incubating-SNAPSHOT\modules
	11.04.2008 12:06:28
org.apache.tuscany.sca.node.launcher.NodeLauncherUtil collectJARFiles
	INFO: Runtime classpath: 148 JARs from
C:\develop\tuscany\tuscany-sca-1.2-incubating-SNAPSHOT\lib

So the classpath calculation during runtime seems to work (how does it
get the correct path? Based on the jars from the static classpath?).
However, the sample still does not work and I don't get any error
messages either.

Bye,
Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Status of Load-Balancing, Failover and Service lookup.

Posted by Simon Laws <si...@googlemail.com>.
Hi Daniel

Some comments in line....

Regards

Simon

[1]
http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncherUtil.java

On Thu, Apr 10, 2008 at 4:37 PM, <Da...@empolis.com> wrote:

> Hi Simon,
>
> My colleague Jürgen and I did some further testing using the same codebase
> (upodated today):
>
> - he used mvn -Peclipse eclipse:eclipse to create the eclipse project
> - I set up the eclipse project manually
>
> His project runs fine, mine has the known issues. The only difference in
> both projects is the classpath
> - the mvn generated project uses project references and jars
> - my project uses the Tuscany lib (that means every jar in
> \tuscany-sca-1.2-incubating-SNAPSHOT\lib)
>
> Any ideas what could be wrong using the lib?


Ah - That's a good piece of detective work. The new workspace support  uses
some new modules, e.g, node2-* that are intended in due course to replace
some of the existing modules and this may be causing problems with the whole
lib dir in the classpath. Are you able to manually pull out the correct
dependencies and try that.

I should point out that there is also some code in the launcher we are using
that calculates the classpath at runtime. See the runtimeClassLoader method
in  [1]. This uses the location of the launcher jar to identify the
directory of other jars that need loading. So if you look in the ant script
use to run this from the binary distribution (build.xml) you will see that
the classpath is very short. This is because the code takes this classpath
and automatically appends all of the runtime jars. The important thing is
that the stated node2 jars come first. While this runtime classpath creation
won't work from eclipse (because the modules & lib dirs are not in the right
place) you may be able to play the trick of putting the node2 jars first on
your classpath.


>
> ----
>
> For a better understanding, could you please elaborate on the files
> workspace.xml. domain.composite and cloud.composite ?
> What are the differences and what are the files used for?


Sure.

workspace.xml - indicates the ID and location of each contributions that has
been added to the domain.

domain.composite - the virtual domain composite. This is an SCA composite
that represents the virtual domain which includes all of the composites that
will run in the domain. A URI is provided which indicates which contribution
each composite comes from. Ultimately an SCANode2 instance will be started
for each composite included in the virtual domain. Each SCANode2 instance
can be running on separate/distributed processors. So the virtual domain is
a consolidated description of you distributed SCA application

cloud.composite - describes the compute cloud (the set of distributed
SCANode2 instances) being used to run the SCA application. Each node is
assigned a composite and also has details of the configuration of bindings
when they run on that node, for example, the root URI is set. It's possibly
slightly confusing that this file is in SCA composite format also but this
is a convenience because firstly we didn't have to create a new file format
and secondly there may be some benefit in the future of representing this
network of nodes as a network of SCA services for management purposes
although we don't do that yet.

These three files come pre-loaded for this sample but they are the files
that hold all of the state behind the workspace admin app.


>
> Can the calculator sample already be used for failover (e.g. by starting
> multiple instances of LaunchCalculatorNodeC) or is failover only running in
> your local sandbox?


I believe that I should be able to get load balancing working fairly easily
(famous last words!) and as the calculator services are stateless this will
provide failover too. Failover of stateful services will not work yet and
will take more effort to investigate and implement a solution.


>
> Thanks a lot.
>
> Bye,
> Daniel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>

AW: Status of Load-Balancing, Failover and Service lookup.

Posted by Da...@empolis.com.
Hi Simon,

My colleague Jürgen and I did some further testing using the same codebase (upodated today):

- he used mvn -Peclipse eclipse:eclipse to create the eclipse project
- I set up the eclipse project manually

His project runs fine, mine has the known issues. The only difference in both projects is the classpath
- the mvn generated project uses project references and jars
- my project uses the Tuscany lib (that means every jar in \tuscany-sca-1.2-incubating-SNAPSHOT\lib)

Any ideas what could be wrong using the lib? 

----

For a better understanding, could you please elaborate on the files workspace.xml. domain.composite and cloud.composite ?
What are the differences and what are the files used for? 

Can the calculator sample already be used for failover (e.g. by starting multiple instances of LaunchCalculatorNodeC) or is failover only running in your local sandbox?

Thanks a lot.

Bye,
Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Status of Load-Balancing, Failover and Service lookup.

Posted by Simon Laws <si...@googlemail.com>.
Hi Daniel ...

On Thu, Apr 10, 2008 at 10:15 AM, <Da...@empolis.com> wrote:

> Hi Simon,
>
> You were right, there were wrong paths in my workspace.xml.
> However, after fixing them I still get the same exception if I start
> LaunchCalculatorNodeB.


Be interested to know what paths you used instead. The idea of the sample is
that people can run it without have to change these relative paths but
obviously this is not working in your case. It still looks from you output
below as if it's not finding the contribution directories successfully.


>
>
> This is the output of LaunchDomain. No errors, but some warnings:


These are Catalina warnings. I see them too. I think someone raised a JIRA
about adressing this but I can't put my finger on it just at the moment.

>
>
> 10.04.2008 10:45:44
> org.apache.tuscany.sca.node.launcher.DomainManagerLauncher main
> INFO: Apache Tuscany SCA Domain Manager starting...
> 10.04.2008 10:45:44
> org.apache.tuscany.sca.node.launcher.NodeLauncherUtil collectJARFiles
> INFO: Runtime classpath: 148 JARs from
> C:\develop\tuscany\tuscany-sca-1.2-incubating-SNAPSHOT\lib
> 10.04.2008 10:45:44
> org.apache.tuscany.sca.node.launcher.NodeLauncherUtil collectJARFiles
> INFO: Runtime classpath: 93 JARs from
> C:\develop\tuscany\tuscany-sca-1.2-incubating-SNAPSHOT\modules
> 10.04.2008 10:45:46 org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
> 10.04.2008 10:45:47 org.apache.catalina.startup.ContextConfig
> defaultWebConfig
> INFO: No default web.xml
> 10.04.2008 10:45:47 org.apache.catalina.startup.DigesterFactory register
> WARNUNG: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd
> 10.04.2008 10:45:47 org.apache.catalina.startup.DigesterFactory register
> WARNUNG: Could not get url for /javax/servlet/jsp/resources/jsp_2_1.xsd
> 10.04.2008 10:45:47 org.apache.catalina.startup.DigesterFactory register
> WARNUNG: Could not get url for
> /javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd
> 10.04.2008 10:45:47 org.apache.catalina.startup.DigesterFactory register
> WARNUNG: Could not get url for
> /javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd
> 10.04.2008 10:45:47 org.apache.catalina.startup.DigesterFactory register
> WARNUNG: Could not get url for
> /javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd
> 10.04.2008 10:45:47 org.apache.catalina.startup.DigesterFactory register
> WARNUNG: Could not get url for
> /javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd
> 10.04.2008 10:45:47 org.apache.catalina.startup.DigesterFactory register
> WARNUNG: Could not get url for
> /javax/servlet/resources/j2ee_web_services_1_1.xsd
> 10.04.2008 10:45:47 org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-9990
> 10.04.2008 10:45:47 org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-9990
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/ui/home/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/ui/workspace/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/ui/files/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/ui/composite/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/ui/cloud/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/workspace/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/contribution/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/feed/files/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/files/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/composite/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/composite-source/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/deployable/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/composite-resolved/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/cloud/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/cloud-source/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/composite-image/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/node-image/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/quickstart/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/processes/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/node/processes/*
> 10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
> addServletMapping
> INFO: Added Servlet mapping: http://AFA-19393:9990/ping/*
> 10.04.2008 10:45:47
> org.apache.tuscany.sca.node.launcher.DomainManagerLauncher main
> INFO: SCA Domain Manager started.
> 10.04.2008 10:45:47
> org.apache.tuscany.sca.node.launcher.DomainManagerLauncher main
> INFO: Press enter to shutdown.
>
>
> But the workspace admin screens now contain some objects (yesterday
> there were all empty):
>
> Contributions:
>        Contribution Dependencies Deployable Composites
>        nodeA
>        nodeB
>        nodeC
>
> Composites:
>        Composite                               Contribution
> Components
>        http://sample;CalculatorA       nodeA           Problem:
> Composite not found
>        http://sample;CalculatorB       nodeB           Problem:
> Composite not found
>        http://sample;CalculatorC       nodeC           Problem:
> Composite not found
>
> Cloud:
>        Node            Composite
> Contribution
>        NodeA   Problem: Composite not found    unknown
>        NodeB   Problem: Composite not found    unknown
>        NodeC   Problem: Composite not found    unknown
>
> Files:
>        - empty


It looks like it's successfully readind workspace.xml now but that it's not
getting any further. So maybe those paths are still not correct. So in my
case I have the sample installed at

C:\simon\tuscany\java-head\sca\samples\calculator-distributed

I used mvn -Peclipse eclipse:eclipse to create an Eclipse project for this
and import it into my workspace (which is located elsewhere on my disk). My
workspace.xml file is the default file that comes with the sample. So, for
example,

<contribution location="file:./src/main/resources/nodeA"  uri="nodeA"/>

Should, at runtime, start at
C:\simon\tuscany\java-head\sca\samples\calculator-distributed\target and
then navigate back up and down to the contribution in question. NodeA in
this case.


>
> If I click on any of the links in the admin screens (besides the
> navigation) I get HTTP errors (404 or 500).
> I wonder why it starts a Tomcat in my environment and not a Jetty.
>

It depends on whether you have host-tomcat or host-jetty on the classpath.
This sample depends on host-tomcat by default.


>
> Bye,
> Daniel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>

AW: Status of Load-Balancing, Failover and Service lookup.

Posted by Da...@empolis.com.
Hi Simon,

You were right, there were wrong paths in my workspace.xml.
However, after fixing them I still get the same exception if I start
LaunchCalculatorNodeB.

This is the output of LaunchDomain. No errors, but some warnings:

10.04.2008 10:45:44
org.apache.tuscany.sca.node.launcher.DomainManagerLauncher main
INFO: Apache Tuscany SCA Domain Manager starting...
10.04.2008 10:45:44
org.apache.tuscany.sca.node.launcher.NodeLauncherUtil collectJARFiles
INFO: Runtime classpath: 148 JARs from
C:\develop\tuscany\tuscany-sca-1.2-incubating-SNAPSHOT\lib
10.04.2008 10:45:44
org.apache.tuscany.sca.node.launcher.NodeLauncherUtil collectJARFiles
INFO: Runtime classpath: 93 JARs from
C:\develop\tuscany\tuscany-sca-1.2-incubating-SNAPSHOT\modules
10.04.2008 10:45:46 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
10.04.2008 10:45:47 org.apache.catalina.startup.ContextConfig
defaultWebConfig
INFO: No default web.xml
10.04.2008 10:45:47 org.apache.catalina.startup.DigesterFactory register
WARNUNG: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd
10.04.2008 10:45:47 org.apache.catalina.startup.DigesterFactory register
WARNUNG: Could not get url for /javax/servlet/jsp/resources/jsp_2_1.xsd
10.04.2008 10:45:47 org.apache.catalina.startup.DigesterFactory register
WARNUNG: Could not get url for
/javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd
10.04.2008 10:45:47 org.apache.catalina.startup.DigesterFactory register
WARNUNG: Could not get url for
/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd
10.04.2008 10:45:47 org.apache.catalina.startup.DigesterFactory register
WARNUNG: Could not get url for
/javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd
10.04.2008 10:45:47 org.apache.catalina.startup.DigesterFactory register
WARNUNG: Could not get url for
/javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd
10.04.2008 10:45:47 org.apache.catalina.startup.DigesterFactory register
WARNUNG: Could not get url for
/javax/servlet/resources/j2ee_web_services_1_1.xsd
10.04.2008 10:45:47 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-9990
10.04.2008 10:45:47 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-9990
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/ui/home/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/ui/workspace/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/ui/files/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/ui/composite/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/ui/cloud/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/workspace/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/contribution/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/feed/files/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/files/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/composite/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/composite-source/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/deployable/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/composite-resolved/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/cloud/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/cloud-source/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/composite-image/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/node-image/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/quickstart/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/processes/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/node/processes/*
10.04.2008 10:45:47 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://AFA-19393:9990/ping/*
10.04.2008 10:45:47
org.apache.tuscany.sca.node.launcher.DomainManagerLauncher main
INFO: SCA Domain Manager started.
10.04.2008 10:45:47
org.apache.tuscany.sca.node.launcher.DomainManagerLauncher main
INFO: Press enter to shutdown.


But the workspace admin screens now contain some objects (yesterday
there were all empty):

Contributions:
	Contribution Dependencies Deployable Composites 
	nodeA   
	nodeB   
	nodeC 

Composites:
	Composite 				Contribution
Components 
	http://sample;CalculatorA 	nodeA 		Problem:
Composite not found 
	http://sample;CalculatorB 	nodeB 		Problem:
Composite not found 
	http://sample;CalculatorC 	nodeC 		Problem:
Composite not found 

Cloud:
	Node		Composite
Contribution
	NodeA 	Problem: Composite not found	unknown   
	NodeB 	Problem: Composite not found	unknown   
	NodeC 	Problem: Composite not found	unknown 

Files:
	- empty

If I click on any of the links in the admin screens (besides the
navigation) I get HTTP errors (404 or 500).
I wonder why it starts a Tomcat in my environment and not a Jetty.


Bye,
Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Status of Load-Balancing, Failover and Service lookup.

Posted by Simon Laws <si...@googlemail.com>.
Hi Daniel.

Some more comments inline

Simon

On Wed, Apr 9, 2008 at 5:25 PM, <Da...@empolis.com> wrote:

> Hi Simon,
>
> Thanks for your elaborate answer.
> It's good to hear that these topics are work in progress!
>
>
> > This is my view of where we are.
> >
> > Service lookup - We are moving to a domain model now that
> > doesn't rely on service lookup internally. If you take a look
> > at the workspace code and sample/calculator-distributed as it
> > now stands the service endpoints in the domain are calculated
> > in the workspace, i.e. before the individual composites are
> > deployed and don't need looking up by each of the nodes that
> > are running composites. It seemed like a simpler solution as
> > the service lookup piece was causing unwanted complexity. The
> > workspace code is new so there aren't docs yet. There is the
> > calculator-distributed sample though and the Tutorial code
> > gives it a good workout. Ask here if you want to know more
> > :-)
>
> I just tried to get the new calculator-distributed sample working in my
> eclipse (the old version worked fine).
> LaunchDomain starts but when I start LaunchCalculatorNodeB I get the
> following Exception:
>
> INFO: Creating node: http://localhost:9990/node-image/NodeB
> 09.04.2008 18:15:42 org.apache.tuscany.sca.node.launcher.NodeLauncherUtil
> node
> SCHWERWIEGEND: SCA Node could not be created
> java.lang.reflect.InvocationTargetException
>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>        at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>        at
> org.apache.tuscany.sca.node.launcher.NodeLauncherUtil.node(NodeLauncherUtil.java:297)
>        at
> org.apache.tuscany.sca.node.launcher.NodeLauncher.createNode(NodeLauncher.java:60)
>        at
> org.apache.tuscany.sca.node.launcher.NodeLauncher.main(NodeLauncher.java:109)
>        at node.LaunchCalculatorNodeB.main(LaunchCalculatorNodeB.java:26)
> Caused by: org.osoa.sca.ServiceRuntimeException:
> java.io.FileNotFoundException: http://localhost:9990/node-image/NodeB
>        at
> org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:120)
>        at
> org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANode(NodeFactoryImpl.java:37)
>        at
> org.apache.tuscany.sca.implementation.node.launcher.NodeImplementationLauncherBootstrap.<init>(NodeImplementationLauncherBootstrap.java:95)
>        ... 8 more
> Caused by: java.io.FileNotFoundException:
> http://localhost:9990/node-image/NodeB
>        at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
>        at java.net.URL.openStream(URL.java:1007)
>        at
> org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:100)
>        ... 10 more
> Exception in thread "main"
> org.apache.tuscany.sca.node.launcher.LauncherException:
> java.lang.reflect.InvocationTargetException
>        at
> org.apache.tuscany.sca.node.launcher.NodeLauncherUtil.node(NodeLauncherUtil.java:318)
>        at
> org.apache.tuscany.sca.node.launcher.NodeLauncher.createNode(NodeLauncher.java:60)
>        at
> org.apache.tuscany.sca.node.launcher.NodeLauncher.main(NodeLauncher.java:109)
>        at node.LaunchCalculatorNodeB.main(LaunchCalculatorNodeB.java:26)
> Caused by: java.lang.reflect.InvocationTargetException
>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>        at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>        at
> org.apache.tuscany.sca.node.launcher.NodeLauncherUtil.node(NodeLauncherUtil.java:297)
>        ... 3 more
> Caused by: org.osoa.sca.ServiceRuntimeException:
> java.io.FileNotFoundException: http://localhost:9990/node-image/NodeB
>        at
> org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:120)
>        at
> org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANode(NodeFactoryImpl.java:37)
>        at
> org.apache.tuscany.sca.implementation.node.launcher.NodeImplementationLauncherBootstrap.<init>(NodeImplementationLauncherBootstrap.java:95)
>        ... 8 more
> Caused by: java.io.FileNotFoundException:
> http://localhost:9990/node-image/NodeB
>        at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
>        at java.net.URL.openStream(URL.java:1007)
>        at
> org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:100)
>        ... 10 more
>
> If I open http://localhost:9990/ui/workspace/ in my browser, I can't see
> any Contributions, Composites, Clouds or Files. So it's not remarkable that
> http://localhost:9990/node-image/NodeB cannot be found.
>
> Do I first have to configure the workspace by manually uploading
> contributions ?


No it should all be set up so all you need to do from Eclipse is as you are
suggesting, i.e. run

LaunchDomain
LaunchCalculatorNodeB
LaunchCalculatorNodeC
LaunchCalculatorNodeA

When I run LaunchDomain this is the output I see:

09-Apr-2008 18:51:42
org.apache.tuscany.sca.node.launcher.DomainManagerLauncher main
INFO: Apache Tuscany SCA Domain Manager starting...
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/ui/home/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/ui/workspace/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/ui/files/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/ui/composite/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/ui/cloud/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/workspace/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/contribution/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/feed/files/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/files/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/composite/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/composite-source/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/deployable/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/composite-resolved/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/cloud/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/cloud-source/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/composite-image/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/node-image/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/quickstart/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/processes/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/node/processes/*
09-Apr-2008 18:51:55 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:9990/ping/*
09-Apr-2008 18:51:55
org.apache.tuscany.sca.node.launcher.DomainManagerLauncher main
INFO: SCA Domain Manager started.
09-Apr-2008 18:51:55
org.apache.tuscany.sca.node.launcher.DomainManagerLauncher main
INFO: Press enter to shutdown.

Are you seeing any errors when the domain starts?

In your browser do you see the workspace admin screens but with no content
or do you not see any screens?


> BTW, I just tried to manually upload a sca.contribution.xml (in Files) and
> got another Exception:


You shouldn't need to do this but it should work. Its interesting here that
it's looking for \C:\resources\nodeB\META-INF\sca-contribution.xml. It
should be looking in the resources directory under the
calculator-distributed sample. In my case this is
C:\simon\tuscany\java-head\sca\samples\calculator-distributed\src\main\resources\nodeB.
This is pre-configured by the entries in the file workspace.xml at the top
level of the calculator-distributed sample. Looking in there the reference
is to ./src/main/resources/nodeB. Could that path be causing a problem for
you somehow?


>
>
> HTTP Status 500 - java.io.IOException: java.io.FileNotFoundException:
> files\C:\resources\nodeB\META-INF\sca-contribution.xml (Die Syntax für den
> Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch)
> The german error message reads "the syntax for filename, pathname or
> volume is wrong".
>
> So any help or additional documentation would be appreciated.


No docs just yet I'm afraid:-(


>
>
>
> > Load balancing and failover - The default plan for load
> > balancing is to run composites in a cluster. I got close to
> > having a simple sample running on my own machine in a Tomcat
> > cluster with the old domain  approach. I haven't converted
> > this over to the new workspace yet but here is how I expect
> > it to work.
> >
> > - The details of the head of the cluster are provided to the
> > workspace as a node to which composites can be deployed
> > - This configuration causes references targeting services
> > that will run in the cluster to have their bindings
> > configured with the URI of the head node of the cluster
> > - All of the real nodes in the cluster request the same
> > composite from the workspace and hence start the same
> > services but of course on different physical addresses
> > - Service requests are dispatched to the head node of the
> > cluster based on the configuration provided by the workspace
> > - The head node sprays out requests to the cluster as appropriate.
> >
> > This should (!) work for stateless service but I haven't
> > actually tried it yet. Stateful services, e.g. conversations
> > or services with COMPOSITE scope are a little more
> > problematic as the problem of affinity and fail over comes
> > up. To make fail over work in the stateful case we will have
> > to provide persistance of the conversation state etc. This is
> > still not there yet
>
>
> Sounds good so far. Load balancing and especially failover are crucial for
> our EILF project so we are looking foreward that Tuscany will provide
> solutions for those topics. The majority of services we employ will be
> stateless. But several may need to be stateful, so this will get an issue
> sooner or later. At the moment I can only offer to take part in discussions
> about those topics and test your implementations (like I did with my various
> Conversational examples).


No problem Daniel. The level of help  you have been giving us so far is very
much appreciated. I'll take a look at the tomcat cluster example again at
some point (won't be this week though) and we can discuss.


>
> Thanks.
>
> Bye,
> Daniel
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>

AW: Status of Load-Balancing, Failover and Service lookup.

Posted by Da...@empolis.com.
Hi Simon,

Thanks for your elaborate answer.
It's good to hear that these topics are work in progress!

 
> This is my view of where we are.
> 
> Service lookup - We are moving to a domain model now that 
> doesn't rely on service lookup internally. If you take a look 
> at the workspace code and sample/calculator-distributed as it 
> now stands the service endpoints in the domain are calculated 
> in the workspace, i.e. before the individual composites are 
> deployed and don't need looking up by each of the nodes that 
> are running composites. It seemed like a simpler solution as 
> the service lookup piece was causing unwanted complexity. The 
> workspace code is new so there aren't docs yet. There is the 
> calculator-distributed sample though and the Tutorial code 
> gives it a good workout. Ask here if you want to know more
> :-)

I just tried to get the new calculator-distributed sample working in my eclipse (the old version worked fine).
LaunchDomain starts but when I start LaunchCalculatorNodeB I get the following Exception:

INFO: Creating node: http://localhost:9990/node-image/NodeB
09.04.2008 18:15:42 org.apache.tuscany.sca.node.launcher.NodeLauncherUtil node
SCHWERWIEGEND: SCA Node could not be created
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
	at org.apache.tuscany.sca.node.launcher.NodeLauncherUtil.node(NodeLauncherUtil.java:297)
	at org.apache.tuscany.sca.node.launcher.NodeLauncher.createNode(NodeLauncher.java:60)
	at org.apache.tuscany.sca.node.launcher.NodeLauncher.main(NodeLauncher.java:109)
	at node.LaunchCalculatorNodeB.main(LaunchCalculatorNodeB.java:26)
Caused by: org.osoa.sca.ServiceRuntimeException: java.io.FileNotFoundException: http://localhost:9990/node-image/NodeB
	at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:120)
	at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANode(NodeFactoryImpl.java:37)
	at org.apache.tuscany.sca.implementation.node.launcher.NodeImplementationLauncherBootstrap.<init>(NodeImplementationLauncherBootstrap.java:95)
	... 8 more
Caused by: java.io.FileNotFoundException: http://localhost:9990/node-image/NodeB
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
	at java.net.URL.openStream(URL.java:1007)
	at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:100)
	... 10 more
Exception in thread "main" org.apache.tuscany.sca.node.launcher.LauncherException: java.lang.reflect.InvocationTargetException
	at org.apache.tuscany.sca.node.launcher.NodeLauncherUtil.node(NodeLauncherUtil.java:318)
	at org.apache.tuscany.sca.node.launcher.NodeLauncher.createNode(NodeLauncher.java:60)
	at org.apache.tuscany.sca.node.launcher.NodeLauncher.main(NodeLauncher.java:109)
	at node.LaunchCalculatorNodeB.main(LaunchCalculatorNodeB.java:26)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
	at org.apache.tuscany.sca.node.launcher.NodeLauncherUtil.node(NodeLauncherUtil.java:297)
	... 3 more
Caused by: org.osoa.sca.ServiceRuntimeException: java.io.FileNotFoundException: http://localhost:9990/node-image/NodeB
	at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:120)
	at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANode(NodeFactoryImpl.java:37)
	at org.apache.tuscany.sca.implementation.node.launcher.NodeImplementationLauncherBootstrap.<init>(NodeImplementationLauncherBootstrap.java:95)
	... 8 more
Caused by: java.io.FileNotFoundException: http://localhost:9990/node-image/NodeB
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
	at java.net.URL.openStream(URL.java:1007)
	at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:100)
	... 10 more

If I open http://localhost:9990/ui/workspace/ in my browser, I can't see any Contributions, Composites, Clouds or Files. So it's not remarkable that http://localhost:9990/node-image/NodeB cannot be found.

Do I first have to configure the workspace by manually uploading contributions ?
BTW, I just tried to manually upload a sca.contribution.xml (in Files) and got another Exception:

HTTP Status 500 - java.io.IOException: java.io.FileNotFoundException: files\C:\resources\nodeB\META-INF\sca-contribution.xml (Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch)
The german error message reads "the syntax for filename, pathname or volume is wrong".

So any help or additional documentation would be appreciated.

 
> Load balancing and failover - The default plan for load 
> balancing is to run composites in a cluster. I got close to 
> having a simple sample running on my own machine in a Tomcat 
> cluster with the old domain  approach. I haven't converted 
> this over to the new workspace yet but here is how I expect 
> it to work.
> 
> - The details of the head of the cluster are provided to the 
> workspace as a node to which composites can be deployed
> - This configuration causes references targeting services 
> that will run in the cluster to have their bindings 
> configured with the URI of the head node of the cluster
> - All of the real nodes in the cluster request the same 
> composite from the workspace and hence start the same 
> services but of course on different physical addresses
> - Service requests are dispatched to the head node of the 
> cluster based on the configuration provided by the workspace
> - The head node sprays out requests to the cluster as appropriate.
> 
> This should (!) work for stateless service but I haven't 
> actually tried it yet. Stateful services, e.g. conversations 
> or services with COMPOSITE scope are a little more 
> problematic as the problem of affinity and fail over comes 
> up. To make fail over work in the stateful case we will have 
> to provide persistance of the conversation state etc. This is 
> still not there yet


Sounds good so far. Load balancing and especially failover are crucial for our EILF project so we are looking foreward that Tuscany will provide solutions for those topics. The majority of services we employ will be stateless. But several may need to be stateful, so this will get an issue sooner or later. At the moment I can only offer to take part in discussions about those topics and test your implementations (like I did with my various Conversational examples).

Thanks.

Bye,
Daniel



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Status of Load-Balancing, Failover and Service lookup.

Posted by Simon Laws <si...@googlemail.com>.
Hi Daniel

This is my view of where we are.

Service lookup - We are moving to a domain model now that doesn't rely on
service lookup internally. If you take a look at the workspace code and
sample/calculator-distributed as it now stands the service endpoints in the
domain are calculated in the workspace, i.e. before the individual
composites are deployed and don't need looking up by each of the nodes that
are running composites. It seemed like a simpler solution as the service
lookup piece was causing unwanted complexity. The workspace code is new so
there aren't docs yet. There is the calculator-distributed sample though and
the Tutorial code gives it a good workout. Ask here if you want to know more
:-)

Load balancing and failover - The default plan for load balancing is to run
composites in a cluster. I got close to having a simple sample running on my
own machine in a Tomcat cluster with the old domain  approach. I haven't
converted this over to the new workspace yet but here is how I expect it to
work.

- The details of the head of the cluster are provided to the workspace as a
node to which composites can be deployed
- This configuration causes references targeting services that will run in
the cluster to have their bindings configured with the URI of the head node
of the cluster
- All of the real nodes in the cluster request the same composite from the
workspace and hence start the same services but of course on different
physical addresses
- Service requests are dispatched to the head node of the cluster based on
the configuration provided by the workspace
- The head node sprays out requests to the cluster as appropriate.

This should (!) work for stateless service but I haven't actually tried it
yet. Stateful services, e.g. conversations or services with COMPOSITE scope
are a little more problematic as the problem of affinity and fail over comes
up. To make fail over work in the stateful case we will have to provide
persistance of the conversation state etc. This is still not there yet

Hope that helps and please feel free to jump in if you want to help out with
any of this.

Regards

Simon

On Tue, Apr 8, 2008 at 3:19 PM, <Da...@empolis.com> wrote:

> Hi all,
>
> I just read through some older postings concerning Load-Balancing,
> Failover and Service lookup.
>
> http://www.mail-archive.com/tuscany-user@ws.apache.org/msg01858.html
> http://www.mail-archive.com/tuscany-user@ws.apache.org/msg01539.html
>
> I'm interested in the status of these topics ?
> What are the current ideas/plans or are there already any solutions ?
> What about the Simon's toughts
> http://cwiki.apache.org/TUSCANYWIKI/distributed-runtime.html
>
> Bye,
> Daniel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>