Replication tool: user guide

Replication tool: user guide

Replication tool distribution Package

The replication tool works on the following platforms: Windows (x64): Win7, Win8, Windows Server 2008, Windows Server 2012; Linux (x64): CentOS7, Ubuntu 16.04.

The distribution package of the Replication Tool is ZIP-archive for Windows and ZIP-archive for Linux containing the following files:

Windows

Script

Purpose

Script

Purpose

bin/admintool.bat

runs the admin tool mode

bin/b2b_replication.exe

application file

bin/client.bat

runs replication client

bin/client.service.install.bat

installs the replication tool as a Windows service in client mode

bin/client.service.run.bat

runs the replication tool as a Windows service in client mode

bin/client.service.stop.bat

stops the replication tool as a Windows service in client mode

bin/client.service.uninstall.bat

uninstalls the replication tool as a Windows service in client mode

bin/server.bat

runs replication server

bin/server.service.install.bat

installs the replication tool as a Windows service in server mode

bin/server.service.run.bat

runs the replication tool as a Windows service in server mode

bin/server.service.stop.bat

stops the replication tool as a Windows service in server mode

bin/server.service.uninstall.bat

uninstalls the replication tool as a Windows service in server mode

bin/standalone.bat

runs the standalone mode

bin/replication.properties

properties file

doc/Replication tool.docx

instructions file

Linux

Script

Purpose

Script

Purpose

bin/admintool.sh

runs the admin tool mode

bin/b2b_replication

application file

bin/server.sh

runs replication server

bin/client.sh

runs replication client

bin/standalone.sh

runs the standalone mode

bin/linux_replication.properties

properties file

doc/Replication tool.docx

instructions file

After the first launch of the replication tool, the following files will appear in the setup folder:

  • b2b_replication.pid - contains a process identifier, it is used by replication tool control scripts.

  • persistent.properties - stores statuses of FIX sessions being replicated.

  • replication.log - replication tool log file.

FIX Antenna based application settings

For correct usage of the Replication tool, the user must set the several properties of the current FIX Antenna-based application.

The settings for the FIX Antenna C++-based application

Property Name

Prohibited Value(s)

Allowed Value(s)

Property Name

Prohibited Value(s)

Allowed Value(s)

StorageType 

transient

splitPersistent

null

Persistent

PersistentMM

MessageStorage.TimestampUnit

microsecond

nanosecond

millisecond

LogIncomingMessages

false

true

The settings for the FIX Antenna Java-based application

Property Name

Prohibited Value(s)

Allowed Value(s)

Property Name

Prohibited Value(s)

Allowed Value(s)

storageFactory

SlicedFileStorageFactory

InMemoryStorageFactory

FilesystemStorageFactory

MMFStorageFactory

incomingStorageIndexed

false

true

outgoingStorageIndexed

false

true

timestampsInLogs

false

true

Resetting sequence numbers in the FIX Antenna Java's session is not supportable. A new session must be created instead.

Installation

RT supports two main working modes: 

  • Client-server mode allows synchronizing files between the primary and backup servers in real time.

  • Standalone mode allows copying files on the same machine in real time.

A detailed description of the setup process for each mode is given below.

For the Windows operating system

Client-Server Mode 

A client-server mode is used in the case when there is a need to replicate data to a different host(s).

The corresponding installation process is described below.

Configure the server instance of the replication tool on the host where the primary files are created:

  • Unzip the distribution package into the home directory of the replication tool.

  • Make the following changes in the Server configuration section of the replication.properties configuration file: 

    • Set replication.server.port where the server will listen to connections from clients. Make sure the port is open for external connections on your firewall.

    • Set replication.server.login and replication.server.password. Make sure you use the same values when configuring the client.

    • Define the location of logs to be replicated (source directory) and change path properties accordingly: 

List aliases of the logs folders to be replicated in the replication.server.folders property. 
If you replicate one directory you can leave this property empty.

Set the default path to the source logs directory in the replication.server.folder.default.path property. 
If you replicate one directory, use it here. If you replicate several directories, use one of them here.

Set path to each directory being replicated in the corresponding replication.server.folder.AAA.path property, where AAA is the directory alias from the replication.server.folders property.
If you replicate one directory, you can skip this step. The default value set in the  replication.server.folder.default.path property will be used instead.
If you replicate several directories set path to each of them under corresponding alias. 

  • Start the Replication tool in server mode for Windows. 

Start the replication manually. You can use the server.bat script from the bin folder of the distribution package. As well, the command "b2b_replication.exe"  is used to start the replication tool server.

Start the replication as a Windows service. For the installation of the Replication Tool as a Windows service and schedules its automatic launch, the command "b2b_replication.exe --installService -n <ServiceServerName>" should be used or the file "server.service.install.bat". Then the user can start the installed service by using the Windows application service or type the command "%SystemRoot%\system32\net.exe start <ServiceServerName>" or use the file "server.service.run.bat".

  • If the server is started successfully you will see the following message in the console and in the replication.log

Server console
[NOTE] 20141016-10:18:11.460 [7804] [ReplicationServer] - Waiting for incoming connection.
  • Make sure the port is open for external connections on your firewall.

  • Make sure the server is listening to clients on the port specified using the following command:

cmd
C:\B2BITS\replication_tool>netstat -na | find "1090"  TCP    0.0.0.0:1090           0.0.0.0:0              LISTENING

Configure client instance(s) of the replication tool on the destination host(s):

  • Unzip distribution package into the home directory of the replication tool.

  • Make the following changes in the "Client Configuration" section of the replication.properties configuration file: 

    • Set replication.client.host and replication.client.port . Make sure you use the same values as for the server replication.server.port property.

    • Set replication.client.login and replication.client.password. Make sure you use the same values as for the server replication.server.login and replication.server.password property.  

    • Define the location of logs to be replicated (source directory) and change path properties accordingly: 

List aliases of the logs folders to be replicated in the replication.client.folders property. 
Folders' aliases should match the ones from the replication.server.folders list from the server configuration file. If the property is empty or not specified, all folders represented by the server are accepted and replicated into the default destination folder.

Set the default path to the source logs directory in the replication.client.folder.default.path property.
If you replicate one directory, use it here. If you replicate several directories, use one of them here.

Set path to each directory being replicated in the corresponding replication.client.folder.AAA.path property, where AAA is the directory alias from replication.client.folder.default.path property.

If you skip this step, the default destination directory will be used for all logs being replicated.

  • Start the replication tool in client mode for Windows. 

    Start the replication manually. You can use the client.bat script from the bin folder of the distribution package. As well, the command "b2b_replication.exe --client"  is used to start the replication tool client.

    Start the replication as a Windows service. For the installation of the Replication Tool as a Windows service and schedules its automatic launch, the command "b2b_replication.exe --installService  -n <ServiceClientName> --serviceStartArgs --client" should be used or the file "client.service.install.bat". Then the user can start the installed service by using the Windows application service or type the command "%SystemRoot%\system32\net.exe start <ServiceClientName>" or use the file "client.service.run.bat".

  • If the client instance(s) is started successfully and set a connection to the server you will see the following message in the console and in the replication.log:

Client console
[NOTE]  20141016-10:35:31.623 [5508] [ReplicationClient] - Connected to server.

Standalone Mode

Standalone mode is a mode when the client (subscriber) and server (publisher) are running within the same process. There is no TCP/IP connection in this mode. Standalone mode is preferable in a case when logs being replicated and copy should be located on the same machine. In order to set up the replication tool you need:

  • Unzip distribution package into the home directory of the replication tool.

  • Define the location of logs to be replicated (source directory). Change server configuration in the replication.properties configuration file accordingly: 

List aliases of the logs folders to be replicated in the replication.server.folders property. 
If you replicate one directory you can leave the property empty.

Set the default path to the source logs directory in the replication.server.folder.default.path property. 
If you replicate one directory, use it here. If you replicate several directories, use one of them here.

Set path to each directory being replicated in the corresponding replication.server.folder.AAA.path property, where AAA is the directory alias from the replication.server.folders property.
If you replicate one directory, you can skip this step. The default value set in the replication.server.folder.default.path property will be used instead.
If you replicate several directories set path to each of them under corresponding alias. 

  • Create directory (or directories) to store logs copy (destination directory(ies)). Change client configuration in the replication.properties configuration file accordingly: 

Set default path to the destination directory in the replication.client.folder.default.path property.

Set destination directory for each source directory in the corresponding replication.client.folder.AAA.path property, where AAA is the directory alias from the replication.server.folders property. If you skip this step, the default destination directory will be used for all logs being replicated. 

  • Start the replication process for Windows.

Start the replication manually. You can use the standalone.bat script from the bin folder of the distribution package. As well, the command "b2b_replication.exe --standalone"  is used to start the replication tool in standalone mode.

Start the replication as a Windows service. For the installation of the Replication Tool as a Windows service and schedules its automatic launch, the command "b2b_replication.exe --installService  -n <ServiceStandaloneName> --serviceStartArgs --standalone" should be used. Then the user can start the installed service by using the Windows application service or type the command "%SystemRoot%\system32\net.exe start <ServiceStandaloneName>".

For the Linux operating system

Client-Server Mode 

A client-server mode is used in the case when there is a need to replicate data to a different host(s).

The corresponding installation process is described below.

 

Configure server instance of the replication tool on the host where the primary files are created:

  • Unzip distribution package into the home directory of the replication tool.

  • Make the following changes in the "Server configuration" section of the linux_replication.properties configuration file: 

    • Set replication.server.port where the server will listen to connections from clients. Make sure the port is open for external connections on your firewall.

    • Set replication.server.login and replication.server.password. Make sure you use the same values when configuring client.

    • Define the location of logs to be replicated (source directory) and change path properties accordingly: 

List aliases of the logs folders to be replicated in the replication.server.folders property. 
If you replicate one directory you can leave this property empty.

Set the default path to the source logs directory in the replication.server.folder.default.path property. 
If you replicate one directory, use it here. If you replicate several directories, use one of them here.

Set path to each directory being replicated in the corresponding replication.server.folder.AAA.path property, where AAA is the directory alias from the replication.server.folders property.
If you replicate one directory, you can skip this step. The default value set in the  replication.server.folder.default.path property will be used instead.
If you replicate several directories set path to each of them under corresponding alias. 

  • Start the replication tool in server mode for Linux.

Run server.sh to start the replication process or use the command "./b2b_replication --propfile=./linux_replication.properties".

  • If the server is started successfully you will see the following message in the console and in the replication.log

Server console
[NOTE] 20141016-10:18:11.460 [7804] [ReplicationServer] - Waiting for incoming connection.
  • Make sure the port is open for external connections on your firewall.

  • Make sure the server is listening to clients on the port specified using the following command:

cmd
C:\B2BITS\replication_tool>netstat -na | find "1090"  TCP    0.0.0.0:1090           0.0.0.0:0              LISTENING

Configure client instance(s) of the replication tool on the destination host(s):

  • Unzip distribution package into the home directory of the replication tool.

  • Make the following changes in the "Client Configuration" section of the linux_replication.properties configuration file: 

    • Set replication.client.host and replication.client.port . Make sure you use the same values as for the server replication.server.port property.

    • Set replication.client.login and replication.client.password. Make sure you use the same values as for the server replication.server.login and replication.server.password property.  

    • Define the location of logs to be replicated (source directory) and change path properties accordingly: 

List aliases of the logs folders to be replicated in the replication.client.folders property. 
Folders' aliases should match the ones from the replication.server.folders list from the server configuration file. If the property is empty or not specified, all folders represented by the server are accepted and replicated into default destination folder.

Set the default path to the source logs directory in the replication.client.folder.default.path property.
If you replicate one directory, use it here. If you replicate several directories, use one of them here.

Set path to each directory being replicated in the corresponding replication.client.folder.AAA.path property, where AAA is the directory alias from replication.client.folder.default.path property.

If you skip this step, the default destination directory will be used for all logs being replicated.

  • Start the replication tool in client mode for Linux.

Run client.sh to start the replication process or use the command "./b2b_replication --client --propfile=./linux_replication.properties".

  • If the client instance(s) is started successfully and set a connection to the server you will see the following message in the console and in the replication.log:

Client console
[NOTE]  20141016-10:35:31.623 [5508] [ReplicationClient] - Connected to server.

Standalone Mode

Standalone mode is a mode when the client (subscriber) and server (publisher) are running within the same process. There is no TCP/IP connection in this mode. Standalone mode is preferable in a case when logs being replicated and copy should be located on the same machine. In order to set up the replication tool you need:

  • Unzip distribution package into the home directory of the replication tool.

  • Define the location of logs to be replicated (source directory). Change server configuration in the linux_replication.properties configuration file accordingly: 

List aliases of the logs folders to be replicated in the replication.server.folders property. 
If you replicate one directory you can leave the property empty.

Set the default path to the source logs directory in the replication.server.folder.default.path property. 
If you replicate one directory, use it here. If you replicate several directories, use one of them here.

Set path to each directory being replicated in the corresponding replication.server.folder.AAA.path property, where AAA is the directory alias from the replication.server.folders property.
If you replicate one directory, you can skip this step. The default value set in the replication.server.folder.default.path property will be used instead.
If you replicate several directories set path to each of them under corresponding alias. 

  • Create directory (or directories) to store logs copy (destination directory(ies)). Change client configuration in the replication.properties configuration file accordingly: 

Set default path to the destination directory in the replication.client.folder.default.path property.

Set destination directory for each source directory in the corresponding replication.client.folder.AAA.path property, where AAA is the directory alias from the replication.server.folders property. If you skip this step, the default destination directory will be used for all logs being replicated. 

  • Start the replication process for Linux.

Start the standalone.sh or use the command "b2b_replication --standalone --propfile=./linux_replication.properties" to start replication process.

       

FIX Logs Replicator Properties

Property

Is Required

Default Value

 Description

Property

Is Required

Default Value

 Description

Server configuration

The section is used in Standalone mode and Client-Server mode on the server side.

replication.server.port

Y

1090

Server listen port.

replication.server.password

Y

-

A password that must be used by the client to be able to log in to the server.

replication.server.login

Y

-

A client's login that must be used by the client to be able to log in to the server.

replication.server.folders

N

-

A comma-separated list of aliases of folders to be monitored.

If not specified or empty, default settings are used.

If not empty "replication.server.folder.AAA.path" property for each folder from the list should be specified, where "AAA" is the folder alias.