Versions Compared

Key

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

There are different ways to build an network of Odysseus nodes. Some of them are only available, if worker nodes are OdysseusNet nodes, too. The master must always be an OdysseusNet node. A combination of different mechanismen is possible and needs to be configured in the OdysseusNet configuration (e.g. <entry key="net.discoverer.name">MulticastOdysseusNodeDiscoverer,BroadcastOdysseusNodeDiscoverer,IPListOdysseusNodeDiscoverer</entry>)

Table of Contents

Broadcast

This is only available for cases, where nodes are OdysseusNet nodes and all nodes are in the same subnet.

...

<entry key="net.discoverer.name">IPListOdysseusNodeDiscoverer</entry>

DEPRECATED:

Code Block
languagejs
[{
 "hostname": "192.168.8.124",
 "port": "8888",
 "username": "System",
 "password": "manager"
 },{
 "hostname": "192.168.8.128",
 "port": "8888",
 "username": "System",
 "password": "manager"
}]

NEW:

Code Block
[{
 "name": "worker_01",
 "serverAddress": "192.168.188.36",
 "serverPort": "18881",
 "username": "System",
 "password": "manager"
 },{
 "name": "worker_02",
 "serverAddress": "192.168.188.36",
 "serverPort": "18882",
 "username": "System",
 "password": "manager"
 },{
 "name": "worker_03",
 "serverAddress": "192.168.188.36",
 "serverPort": "18883",
 "username": "System",
 "password": "manager"
 }]

The "name"-attribute is mandatory now.


Odysseus Script Command

With the Odysseus Script Command #ADD_NODE/#REMOVE_NODE we provide a mechanism to add/remove nodes at runtime.

...

Code Block
#REMOVE_NODE (name=worker_1)
#REMOVE_NODE (name=worker_2)
#REMOVE_NODE (name=worker_3)


Remark: In a docker environment, do not use localhost! This will not work, when the nodes should interact with each other. Localhost would be interpreted als the localhost of the container! So it is best du use a fixed IP adress of the node where all containers are started (in a single host enviroment)

Persisting Nodes

By default, the nodes are only available at runtime and need to be connected again in case of a master restart. It is possible to persist node information via configuration:

...

This is an example for using a filestore. Other stores (e.g. Redis Feature) are possible, too. In this case provide the required configuration information with the key-prefix: net.nodemanager (e.g. net.nodemanager.host)