Topology Configuration

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (23)

View Page History
* all service providers can be seen by all service consumers without restrictions,
* all service providers must be accessible directly to all service consumers.

Using a gateway, it is possible to interact between sub-domains pairs:
* by default, service endpoints of a sub-domain are not propagated to other sub-domains,
* Note: in the current version of Petals ESB, the notion "sub-domain" is not fully implemented, and the "gateway" is not yet available. The processing is as if the domain contains only one sub-domain: all service endpoints can be seen by all.*

h1. Configuring the sub-domain mode

Petals ESB supports three differents domain modes :
* standalone : the Petals ESB cluster is limited to one node, you can't add new ones.
* static : the topology is static, no new node can be added to a running Petals ESB cluster.
* dynamic : the topology is been updated regularly, so you can add new nodes to a running Petals ESB cluster.
A Petals sub-domain supports two different modes :
* static : no new container can be added to a running Petals sub-domain. All containers of the sub-domain must be stop and restart to take into account changes
* dynamic : a container can be attached to or detached from a running sub-domain, without requiring a full start/stop of the sub-domain

This chapter will explain you how to choose and configure the domain mode according your needs.
h2. Choosing the sub-domain mode

h2. Choosing the domain mode
The sub-domain mode 'static' is recommended in following use-case:
* you want to prevent to add or remove container from your sub-domain,
* you don't plan hot topology refactoring

*Standalone mode*
If you have a worst constraint about the availability of the Petals ESB (24/24, 7/7), you shoudl use the mode 'dynamic' to be able to apply topology changes without stopping the Petals ESB.

As explained earlier, when you just have one single Petals ESB node, and you do not need any other node, you might want to use the standalone mode.

{warning}
Since Petals ESB 3.0, this mode is not supported anymore. Use a the static domain with one subdomain in master/slave mode. The only node of the cluster should then be configured in master mode.
{warning}

\\
*Static mode*

Most of the time, you know how many nodes you have in your cluster, and this number does not change over time. This mode is the most suitable for most production environments.
If you need to add a new node to the cluster, you must stop all the nodes of your Petals ESB cluster and then change every {{topology.xml}} file to reflect the topology changes.

{info}
When a Petals ESB nodes crashes, this doesn't impact the topology, but all the messages sent to the services deployed on this node are lost since the Petals ESB container does not keep track of the execution context.
{info}

\\
*Dynamic mode*

In some very specific usecases, the number of nodes in your Petals ESB cluster may vary while the whole cluster is running.

{warning}
Since dynamic mode replace the {{topology.xml}} file at each topology update this mode is not suitable for production use.
{warning}

h2. Using the static mode

*Configuring the topology.xml file*
To use the static mode, in the sub-domain element of the topology definition, you just have to change the mode property to *static* :

To use the static mode, in the domain element of the topology.xml file, you just have to change the mode property to static :
{code:lang=xml}<tns:sub-domain name="your-subdomain-name" mode="static">{code}

{code:lang=xml}<tns:domain mode="static" name="PEtALS">{code}

See : [^static-topology-sample.xml]

h2. Using the dynamic mode

*Configuring the topology.xml file*
To use the dynamic mode, in the sub-domain element of the topology definition, you just have to change the mode property to *dynamic* :

To use the dynamic mode, in the domain element of the topology.xml file, you just have to change the mode property to dynamic :
{code:lang=xml}<tns:sub-domain name="your-sub-domain-name" mode="dynamic">{code}

{code:lang=xml}<tns:domain mode="dynamic" name="PEtALS">{code}

See : [^dynamic-topology-sample.xml]

\\
*Configuring the update period*

In dynamic mode, as we've explained earlier, the topology is been updated automatically. The first topology update took place 30 seconds after the node has finished its startup procedure. Then, the topology is been updated regularly at a period configured by the *topology.update.period* property of the {{$PETALS_HOME/conf/server.properties}} file.

{noformat}
#Topology update period (in seconds)
topology.update.period=101
{noformat}

h1. Configuring the subdomain mode