This article describes the basics of how to configure a swSlaveServer. 


Prerequisites

  • Existing swServer (master server) is configured and running
  • swSlaveServer hardware meets the requirements in SystemWeaver Server - Software and Hardware Requirements
  • A swSlaveServer.ini file is located in the same folder as the swSlaveServer.exe
  • A swSlaveServer.props file, for logging, is located in the same folder as the swSlaveServer.exe
  • swSlaveServer installation (see below) is in place on the hardware that will host the swSlaveServer


swSlaveServer Installation

The following directory should be located on the slave server machine: 

swSlaveServer

cert directory

  • CAcert.pem
  • WSScert.pem
  • WSSkey.pem

libeay32.dll

liblz4.dll

ssleay32.dll

swSlaveServer.exe

vcruntime140.dll

swSlaveServer.ini

swSlaveServer.props


If your organization is considering a slave server for the first time, please contact support@systemite.se to obtain the necessary installation files. 


Configuring the Slave Server

The configuration of the slave server is defined in the swSlaveServer.ini file.


SWServerIP=
SWServerPort=
Port=
IP=
CertPassword=aaaa
LoadAllData=
SWUser=system
SWPassword=
SWPasswordEncrypted=
SimulateLatency=
WriteChannelCount=


  1. Open the swSlaveServer.ini in a text editor.
  2. Configure the settings (see table below). 
  3. Save your changes.


swSlaveServer.ini Configuration Options

The swSlaveServer.ini has the following content:


SWServerIP

The domain address of the SystemWeaver master server (swServer.exe) that the Slave Server should connect to. The address may be specified as either a fixed numerical address (123.456.789.012) or a domain name (EV198).


SWServerPort

The port number of the SystemWeaver master server that the Slave Server should connect to.


Port

The same entry as the .props files*


IP

The same entry as the .props files*


CertPassword

The same entry as the .props files*


AutoStart

The same entry as the .props files*


LoadAllData

Defines if the slave server should load the complete database from the main server upon startup (true) or not (false). 

  • False: (Loading data on demand) Upon startup, the slave server quickly connects to the master server and then data is loaded into the slave server memory on demand by the users. When a piece of data has been loaded to the slave server, it can be accessed locally from that point forward.
  • True: (Load all data) Upon startup, all data is loaded from the master server into the slave server memory so that all data from the master server is locally available to the slave server users from the start.


SWUser

Should be set to "system".


SWPassword

Should be set to the password of the "system" user.


SWPasswordEncrypted

An alternative to the SWPassword entry, where the password is entered in encrypted form. The SystemWeaver utility tool EncryptString.exe may be used for generating an encrypted password for this purpose. Contact support@systemite.se to obtain the tool if desired.


SimulateLatency

Simulates a network latency between the slave and main server. The integer value is set in ms.

Note that this option should never be used in production environments.  


WriteChannelCount

Set to the number of write channels to be used."0" implies 1 channel for all (Read and Write) operations,

"1" implies 1 channel for Read operations and 1 channel for Write operations,

"2-N" implies 1 channel for Read operations and multiple (N) channels for Write operations.


* See "Format of props file" in the SystemWeaver Help.

Example


Starting the Test Slave Server

The swTestSlaveServer.exe provides a user-friendly interface and log window. It will basically read the contents of the swSlaveServer.ini and present those settings in the interface. 

Before starting the swTestSlaveServer.exe, be sure that the swSlaveServer.ini is located in the same directory as the application.

  1. Test the Slave Server first by opening the swTestSlaveServer application. The configuration entries made will be viewable in the GUI. 
  2. Click Start. When start-up is completed, it will be indicated in the log window:



Starting the Slave Server

Before starting the swSlaveServer.exe, be sure that the swSlaveServer.ini is located in the same directory as the application.

  1. To start the slave server, double-click on the swSlaveServer.exe. A swSlaveServer window will display when it is up and running: 

Note: Depending on the selected settings, there may be a delay. For example, if LoadAllData is set to 'true', the slave server must first load all server data from the master server as part of its start-up process. You will see it loading the tables in the log and when it is completed, it will indicate "All data loaded."


Using the swServerMonitorService

A third alternative is to use the swMonitorService.exe to start/restart the slave server. The swServerMonitorService application supports multiple instances of the same SystemWeaver server as a service on the same server computer. Learn more about this option in the Help by searching for 'swServerMonitorService'.


What's Next?

Browse through the SystemWeaver Help to learn more about the SystemWeaver Slave Server.