Deployment

This section provides information deploying a DAQBroker server on your machine.

DAQBroker Server

This section contains information on different strategies for deploying a DAQBroker server environment. Controlling the launching of its persistent monitoring applications and/or web API.

Python CLI

The native Python version of DAQBroker exposes the daqbrokerServer. This class can be used to start the DAQBroker environment, controlling which DAQBroker services are launched:

class daqbrokerServer.daqbrokerServer(localSettings='localSettings', appPort=7000, logFileName='logFile.txt')

Main server application class. This class can be used to start the DAQBroker server environment and contains the following members

Variables:
  • localSettings – (string) name of the local settings database file (defaults to localSettings)
  • appPort – (integer) network port for the DAQBroker server REST API (defaults to 7000)
  • logFileName – (string) name of the logging file (defaults to logFIle)
start(detached=False)

Starts the DAQBroker server environment.

Warning

This is a long running process and blocks execution of the main task, it should therefore be called on a separate process.

Parameters:detached – Unusable in current version. Meant to be used to launch a background (daemon-like) environment to continue to be used in the same python session

Windows

The Windows version of the DAQBroker server, when properly installed (See Installation) installs on your machine an application called DAQBrokerServer on your operating system. This application can be started and stopped using the windows command line or visual interface.

Linux

The Linux version of the DAQBroker server, when properly installed (See Installation) creates a compressed folder that can be uncompressed using:

tar xvzf daqbroker_server_linux.tar.gz

This produces a folder with the binary version of the DAQBroker server application which can then be called from that directory by calling:

./daqbrokerServer

DAQBroker Client

This section contains information on different strategies for deploying a DAQBroker client.

Python CLI

The native Python version of DAQBroker exposes the daqbrokerClient. This class can be used to start the DAQBroker client application, which can interface with existing DAQBroker server applications on other networked machines:

class daqbrokerClient.daqbrokerClient(name='DESKTOP-NVQC165', commport=9091, logport=9094, **kwargs)

Main client application class. This class can be used in the Python CLI to start the client application or to register a machine with existing DAQBroker servers

Variables:
  • name – (string) name of the machine that will be used to identify it by the users. Defaults to platform.node()
  • commport – (integer) the network port for the main part of the client application. Defaults to 9091
  • logport – (integer) the network port for the logging process of the application. Defaults to 9094
register(server=None, username=None, password=None)

This function allows registering a client application with a DAQBroker server. This function can be used to register with servers outside the local network. This function provides an interactive command line interface to insert the relevant parameters for registering with a server that were not provided as parameters

Variables:
  • (optiona) (server) – (string) Server URL
  • (optional) (password) – (string) DAQBroker login username
  • (optional) – (string) DAQBroker login password
Returns:

(boolean) True if registration was completed successfully. False if not. Prints the error of the

registration request on failure

start()

Function to start the main client application

Warning

This is a long running process and blocks execution of the main task, it should therefore be called on a separate process.

Windows

The Windows version of the DAQBroker client, when properly installed (See Installation) installs on your machine an application called DAQBrokerClient on your operating system. This application can be started and stopped using the windows command line or visual interface.

Linux

The Linux version of the DAQBroker client, when properly installed (See Installation) creates a compressed folder that can be uncompressed using:

tar xvzf daqbroker_client_linux.tar.gz

This produces a folder with the binary version of the DAQBroker server application which can then be called from that directory by calling:

./daqbrokerClient