Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

A node runs an SCA assembly described by one or more composite files. A node runs in a single JVM. You can start more than one node in a single JVM if you need to but we only tend to do this for testing purposes. In the first section of the user guide we built a calculator sample that included Calculator, Add, Subtract, Multiply and Divide components included in a single composite.

Image Modified

The composite was run using the following API;

...

Code Block
node.start();

Locating Services

If the mode node has been created from from within a piece of Java code using the node fatory interface a local service reference can be retrieved in the following way.

...

From the calculator sample you can see that the wires between the component references and services, formed by adding a target component name to a reference, are resolved inside an SCA domain comprising a single node.

Image Modified

For example, this section of the calculator composite file shows how the CalcuatorServiceComponent targets the AddServiceComponent.

...

In the distributed calculator samples sample the a composite defines the calculator component but not the add component;

...

is still be able to find the add component running on a separate node.

Image Modified

So a distributed SCA domain can consist of more than one node and hence /composite and wires can run between components defined in the separate composites.

...

Once the domain manager is running you can get to the web interface of the default domain point you by pointing your browser at http://localhost:9990/uiImage Removed. This provides a number of different pages allowing you to

...

When you start the domain manager for the distributed calcultor calculator sample you will see the pages already populated with the information needed to execture the sample.

...

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 SCANode instance will be started for each composite included in the virtual domain. Each SCANode2 SCANode 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 SCANode 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 files are updated when you make changes to the domain through the domain manager interface but they have a fairly simple XML format and can be edited manually or new utilities could be constructed to edit them automatically. In the distributed calculator sample you can find these files in the root directory.

Connection to non-SCA services

...

Code Block
SCANode2 node = SCANodeFactory.newInstance().createSCANodeFromURL("http://localhost:9990/node-config/NodeA");

The URL http://localhost:9990/node-config/NodeAImage Removed is the URL of the atom feed that the domain manager provides.

...

In the calculator-distributed sample java classes are provided which are set up ready to start the required nodes. Look a at the files.

Code Block
node.LaunchCalculatorNodeA
node.LaunchCalculatorNodeB
node.LaunchCalculatorNodeC

...