Networking
A DataStorm node connects to other nodes to exchange data and to discover other nodes. Discovery can either use UDP multicast or TCP. Data exchange is only performed through TCP connections between nodes. The endpoint for both TCP and multicast are configurable with the DataStorm.Node.Server.Endpoints
and DataStorm.Node.Multicast.Endpoints
properties. We'll discuss here the different network deployments which are possible with DataStorm.
Multicast Endpoint
The multicast endpoint is only used to discover topics. Once a matching topic is discovered a TCP connection is established between the two nodes that provide the topic. To configure the multicast endpoint, refer to UDP Endpoint Syntax from Ice's documentation. If the DataStorm.Node.Multicast.Endpoints
property is not set, the DataStorm node will use by default the udp -h 239.255.0.1 -p 10000
endpoint value. A multicast address must be configured with this endpoint in order to received multicast datagrams.
The multicast endpoint is enabled by default. To disable it, the DataStorm.Node.Multicast.Enabled=0
property setting can be used.
Server Endpoint
The server endpoint is used to accept incoming connections from other DataStorm nodes in order to exchange data between the nodes if they have matching topic's data elements. To configure the server endpoint, refer to Proxy and Endpoint Syntax from Ice's documentation. If the DataStorm.Node.Server.Endpoints
property is not set, the DataStorm node will use by default the tcp
endpoint value.
The server endpoint is enabled by default. To disable it, the DataStorm.Node.Server.Enabled=0
property setting can be used. If the server endpoint is disabled, the DataStorm node won't be able to accept connections from other nodes and will only be able to exchange data with nodes it connects to or through nodes it connects to.
For example, with the configuration show in the diagram below, the writer can connect to the reader but the reader can't connect to the writer.
Such a configuration is useful if the writer is running on a machine which has network restrictions and doesn't allow incoming TCP/IP connections from the network.
Like for registry nodes described on the Discovery page, any DataStorm node can also be used as a bridge to forward data updates from a node to another node. This is particularly useful for nodes which disable their server endpoints and need to exchange with multiple other nodes. For example, with the deployment shown below, multiple nodes connect to a bridge node to communicate with other nodes:
And like for registry nodes, the bridge node can be replicated to ensure there's no single point of failure: