Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The two configuration files, node.xml and routingtable.xml will not be created, but the node will start without them.

Step 3: Create

...

node.xml

...

and routingtable.xml

  • Node.xml also contains various values for thresholds and timeouts.
  • Roundtable.xml contains information about the Node's place in the network topology.

If you are deploying SPIN with a plug-in, such as the eagle-i plugin, these files will be generated automatically and saved in the current directory. If you create the files, or they are generated, copy both files to the $SPIN_HOME/conf directory.

Examples of this files are You can find examples of this files located:

http://scm.chip.org/svn/repos/spin/base/trunk/examples/src/test/resources/node.xml

http://scm.chip.org/svn/repos/spin/base/trunk/examples/src/test/resources/routingtable.xml

Step 4:

Configuration

Node.xml Configuration Properties

Node.xml contains miscellaneous node-wide configuration information, such as the node's role in the network. The configuration identifies if the node performs the following tasks:

  •         Authenticates users
  •         Broadcasts queries
  •         Aggregates responses
  •         Performs queries
  •         Routes incoming and outgoing messages

Node.xml also contains various values for thresholds and timeouts.

Node.xml Configuration Properties

The order of the elements in the configuration file is important. Properties are required or optional.

...

Default: 3600000, or one hour

<broadcastTimeoutPeriod>

SPIN nodes attempt to broadcast queries they receive to other nodes defined as being children of, or downstream from the current node.  A timeout period for these broadcast attempts is defined by the <broadcastTimeoutPeriod> element.

The <duration> sub-element defines the amount of the timeout.

The <unit> sub element defines the unit for the value of the <duration> field.  enum constants in java.util.concurrent.TimeUnit define values for this field. Note the following examples:

Code Block

<broadcastTimeoutPeriod>

...


<broadcastTimeoutPeriod>

  <duration>5</duration>

...



  <unit>SECONDS</unit>

...



</broadcastTimeoutPeriod>

or

<broadcastTimeoutPeriod>

...

Code Block

<broadcastTimeoutPeriod>

  <duration>1</duration>

...



  <unit>HOURS</unit>

...



</broadcastTimeoutPeriod>

or

Code Block

<broadcastTimeoutPeriod>

...


<broadcastTimeoutPeriod>

  <duration>500</duration>

...



  <unit>MILLISECONDS</unit>

...



</broadcastTimeoutPeriod>

Default: 5 seconds

<resultStoreType>

The type of underlying result store used to cache query results.  Allowed values are 'SimpleInMemory' and 'Ehcache'.  The SimpleInMemory result store is generally faster, but fails un-gracefully when memory runs out.  The EHCache result store is generally slower, but fails more gracefully.

Default: SimpleInMemory

<queryActionMapClassName>

Defines the fully-qualified name of a JVM class that implements org.spin.node.QueryActionMap and provides QueryAction instances by name.  Useful for creating SPIN using Spring, Guice, or another dependency-injection framework, or for instantiating QueryActions lazily, instead of eagerly at node-startup time, which is the default behavior.

...

You will find an example of node.xml at: https://scm.chip.org/svn/repos/spin/base/trunk/examples/src/test/resources/node.xml

...

routingtable.xml

...

configuration properties

A SPIN node's place in a network topology is defined in routingtable.xml.  SPIN nodes may participate in different overlay networks, fulfilling different roles in a topology, by joining different peer groups. A peer group defines a group of nodes and how they fit into a network topology. In routingtable.xml, nodes specify their place in different network topologies for zero or more peer groups.

...

routingtable.xml contains zero or more <peerGroup> elements.  The structure of these elements is as follows:

peerGroup (optional)

LOCAL peer group named with no parent or children added implicitly

 <groupName>  <groupName> (required)

Unique name of the peer group

<parent> (optional)

The current node's parent

Default: null (no parent)

<children>

Zero or more child nodes that to which the current node should broadcast queries, if it receives a query destined for this peer group.
The structure of <parent> and <children> elements are identical.

<endpointType> (required)

Values: Only supports SOAP.  (Local used only for testing.)

<address> (required)

Identifies the URL of the referenced node's WSDL, such as http://my-node.med.harvard.edu:8080/node-server/node?wsdl

You can find an example routingtable.xml file at

...

keystore.xml configuration properties

A keystore is a repository of security certificates, either Certification Authority Certificates or Public key certificates. Keystore.xml contains information about the keystore file that contains the node's cryptographic keypair. The keypair includes the keystore file password and the keystore private key alias that you should use, if more than one private key exists.

...

PKCS12 and JKS keystore formats are supported

You can locate keystore.xml at http://spin.org/xml/res/keystore. Note that the order of elements in this file is important.

Required elements

  The file containing the keystore---<file>/opt/spin/main/conf/spin.keystore</file>

  The keystore's password ---<password>spinkeystore</password>

<File>

Path, either absolute or relative, to the keystore file containing cryptographic certificates.

<Password>

Password for the file referenced by the <file> element.

Optional elements

    The alias of the node's public/private keypair is optional.

        If no keyAlias is specified but a single public/private keypair exists, the alias of the keypair is used.

        If no keyAlias is specified but multiple pub/priv keypairs exist, PKITool's constructor throws an exception.

<keyAlias>

Identifies the alias of the certificate containing this node's private key.  If more than one public/private keypair is contained in the referenced keystore, this element can be used to choose one.  If only one public/private keypair exists in the referenced keystore, Spin choses that keypair, and this element is optional.

Default: Null. Node tries to detect the public/private keypair.

<caPublicKeyAlias>

May be present 0 or more times.  The aliases of the public keys of certificate authorities that this node trusts.  If a node trusts a particular certificate authority by importing the CA's public cert into the node's keystore and referencing it with the <caPublicKeyAlias> element, the node will implicitly trust all queriers for which the CA vouches.

Default: Null. No CAs are trusted.

<attachCertificateToSignature>

Relevant only if a <caPublicKeyAlias> element (or elements) is present.  If set to true, then the public cert of the CA that vouched for a querier is attached to outbound queries.

Default: False

<setSystemProperties>

Work around some failures with establishing SSL connections by modifying JVM-wide settings. Set to true as a last resort when troubleshooting SSL/HTTPS communication.  This element is deprecated and will likely go away in a future release of SPIN.

Default: False

<keystoreType>

The format of the referenced keystore file; See org.spin.tools.config.KeyStoreType for allowed values (currently 'JKS' and 'PKCS12')

Values: JKS (Default) or PKCS12.

Example keystore.xml: https://scm.chip.org/svn/repos/spin/base/trunk/examples/src/test/resources/keystore.xmlImage Added