Configuring the end-to-end connection

Once you have the FX Professional Motif 2 front-end and back-end systems up and running, you’ll need to set up the connection between them. This page guides you through the configuration required to connect the back end to the front end.


Files required:


Configuring the web server to access the back end

You’ll have seen from the Setting up the front end guide, that BladeRunnerJS contains an instance of Jetty (a web server) used to serve a web trading application (e.g. NovoTrader), as you develop on it. In the Jetty web server XML configuration, you will need to define the machine address where you have the back-end system running. This will allow the front end to communicate with the back end.

Define the machine address for your back end in the web server XML:

  1. Locate the Caplin Trader root directory on your machine.

  2. Navigate to \CaplinTrader\apps\<YOUR_APP_NAME>\WEB-INF\jetty-env.xml, and open the XML file.

    For example, if you’ve used the example app namespace previously, then the path would be: \CaplinTrader \apps\NovoTrader\WEB-INF

  3. In the XML code, find the entry <Arg>LIBERATOR.PRIMARY.ADDRESS</Arg>.

  4. Underneath this entry, locate <Arg type="java.lang.String"></Arg>, and change to the IP Address of the machine you are using to run the Deployment Framework (and Caplin back-end components from Setting up the back end)

If you have changed the default port for the Liberator (18080) in the Deployment Framework, you will also need to change the port accordingly in the XML configuration for the Jetty web server. You can find more details on changing Liberator’s port numbers here. If you have not modified the port skip the next step.

Define the primary liberator port in the web server configuration:

  1. In the jetty-env.xml file, find the following entry <Arg>LIBERATOR.PRIMARY.PORT</Arg>

  2. Underneath this entry, define your Liberator port number in here <Arg type="java.lang.String">18080</Arg>

Configuring the front end to use KeyMaster

KeyMaster facilitates the process of logging into Liberator via StreamLink. Upon initial authentication of a user, KeyMaster implements Public-key cryptography to maintain secure access to financial data contained within Liberator. In this step you will configure the front-end system to use KeyMaster. You will need access to the file.

Configure KeyMaster for the front end:

  1. Navigate to your Caplin Trader root directory.

  2. Create a new folder under \CaplinTrader\conf\ and name it 'keymaster'.

  3. Now unzip Copy the file named and place it in inside the newly created folder under \CaplinTrader\conf\keymaster

Launching your Motif application

Now you will start up the back-end and front-end systems. Once they have been initiated, you will log into yourFX Professional Motif 2 application.

Run your FX Professional Motif 2 application:

  1. Open Cygwin

  2. From the root directory of your Deployment Framework, run the following command to start the backend components:

    ./dfw start
  3. In the \CaplinTrader\sdk directory, run the command to start the BladeRunner development server:

    brjs serve
  4. Open a web browser and navigate to localhost:7070.

  5. From the dashboard, select the application tile (e.g. NovoTrader) and click Open.

  6. In the top-right corner of the dashboard, click the Launch App icon

  7. You should now be directed to the FX Motif login page. Login to the application as with password 'password'.

    From this point on you are able to directly access this login page URL providing you have BladeRunnerJS started.
  8. Click Login

You should now have succesfully set up all Motif systems, and launched your application.

To shut down everything…​

  1. From the console window running the BladeRunner development server, press Ctrl+C to shut down the server

  2. From the root directory of your Deployment Framework, run the command below to shut down all Caplin Platform components:

    ./dfw stop

Exporting the web app as a WAR

Once you have the development environment fully set up - you can begin to develop on, and run test with the FX Motif web application. Post development, you can export your app from the BladeRunnerJS development environment, to your production environment. You can do this directly from the BladeRunnerJS dashboard by generating a WAR (Web Application Archive) containing your developed app for deployment onto an application server:

To export a WAR file

  1. Make sure BladeRunnerJS is running (see Setting up the front end)

  2. Navigate to the URL of the BladeRunnerJS dashboard (localhost:7070) and open your app by selecting Open on the app tile

  3. In the top-right corner of the screen find and select the Export WAR button Export WAR Icon

To deploy the WAR onto your app server, consult the documentation for your application server.

You can find more information on exporting and deployment at the BladeRunnerJS website.

Additional information

Location of logs

The logs for each of the adapter blades can be found in \active_blades\<ADAPTER_NAME>\DataSource\var

Location of Adapter Configurations

Adapter configurations are located in the following locations:

  • <framework_root>/active_blades/<adapter_name>/DataSource/etc/

  • <framework_root>/active_blades/<adapter_name>/Liberator/etc/

  • <framework_root>/active_blades/<adapter_name>/Transformer/etc/

For more information on changing a blade’s configuration, see here.

See also: