The Cascade DataHub can mirror data with one or more other DataHubs in running in Windows, as well as Linux or QNX, across a LAN, WAN, or the Internet, using TCP. Mirroring means that the data and any updates to that data on one DataHub are exactly mirrored across the network onto another DataHub, and vice-versa. The only difference between the master DataHub and slave DataHub is that the slave initiates the connection, and a connection license is consumed on the master. Once the connection is established, they function exactly the same.
Each participating DataHub must be configured as mirroring master (server) or mirroring slave (client), or in some cases, both. If your system requires it, a single DataHub can act as a master to one DataHub and as a slave to another.
![]() | Each master-slave pair must have matching port numbers and domain names. Specifying port numbers and domain names is explained below. |

There are three possible ways to set this up:

For this scenario, you would set up whichever DataHub you wanted to initiate the connection as a master, and set up the other DataHub as a slave.
You can set up the Cascade DataHub to act as a mirroring master on Linux or QNX in either of these two ways:
Run the DataHub with the -p option. This tells the Cascade DataHub to listen as a TCP master on the port or service you specify. Normally you would use port 4600, which we have arbitrarily chosen as the "normal" port, but any port number will do so long as the client (slave) uses the same port number.
[sh]$ datahub -p port/service
For example:
[sh]$ datahub -p 4600
Create a configuration file or use an existing one. Make sure the following lines are in the file:
(tcp_service 4600) (enable_tcp_server 1) (enable_mirror_master 1)
Then run the DataHub with the -f option:
[sh]$ datahub -f /path/to/my/configfile.cfg
For example:
[sh]$ datahub -f /usr/local/misc/dhconfig.cfg
You can set up the Cascade DataHub to act as a mirroring slave on Linux or QNX in either of these two ways:
Run the DataHub with the -m, -M and -n options.
[sh]$ datahub -m port -M address -n domain
For example:
[sh]$ datahub -m 4600 -M 192.168.3.15 -n test
Create a configuration file or use an existing one. Make sure the following lines are in the file:
(create_domain domainM) (mirror_master address port domainS domainM) (enable_mirror_slave 1)
The create_domain command is optional. It is used in this example to show how to make a domain on the slave DataHub that matches a domain on the master DataHub. The mirror_master command then sets up mirroring from domainM on the master to a different domain, domainS, on the slave. You can also mirror domains with the same name, say default, by simply specifying the same domain name for master and slave:
(mirror_master 192.168.3.15 4600 default default)
Once the file is ready, run the DataHub with the -f option:
[sh]$ datahub -f /path/to/my/configfile.cfg
For example:
[sh]$ datahub -f /usr/local/misc/dhconfig.cfg
You can configure your DataHub to act as a master for either plain-text tunnelling, secure tunnelling using SSL, or both. Each mode uses a separate port number or service name.

![]() | If you enter a name for the service/port instead of a number, that name must be listed in the Windows services file. Please refer to The Windows Services file Appendix for details. |
The DataHub installs an SSL Certificate for you. If you wish to move it or use a different one, you can change the directory path here. The SSL implementation uses the default SSL-3 encryption cipher: DHE-RSA-AES256-SHA. This is a 256-bit encryption. The server and client negotiate the best encryption based on what both can support. The DataHub does not validate the SSL certificate with any outside certificate authority. It uses the SSL connection for encryption only, not authentication.
You can also configure the master to attempt to send "old" data (superseded by more recent data). Check any or all of Boolean, Integer, Float, or String that apply to the kind of superseded data that you wish to have sent.
![]() | To optimize throughput using this option, please refer to Section 18.7, “How to Optimize”. |
Check the box to have the Cogent DataHub act as a slave.

To add a master for this mode, click the button. To edit a master, double-click it, or select it and press the button. Either button opens the Tunnel/Mirror Master window:

Type in the following information:
![]() | There is a DataHub running on Cogent's server that you can connect to for testing. Here are the parameters you will need to enter for it:
|
You now have several options for the mirrored connection.

![]() | To optimize throughput, check the Read-only: Receive data from the Master, but do not send option. Only do this if you actually want a read-only connection. If you do not require read-write access, a read-only tunnel will be faster. |
![]() | If you have configured When the connection is initiated as (see above), then this option must be set to to get correct data synchronization. |
Copyright © 1995-2012 by Cogent Real-Time Systems, Inc. All rights reserved.