Setting up the back end

This page guides you through the steps required to set up the FX Sales Motif back-end systems; including a set of Integration Adapters that provide the data required by the front end.

Summary

There are six steps in this guide for setting up the back end. Scroll down or see the links below to review the steps.

Prerequisites

  • It is recommended that you complete the previous guide (Setting up the front end) before continuing.

  • You need a Java 7 (32-bit) JDK or better installed, with the Java binary on the system path

  • The JAVA_HOME environment variable must be set to point to the Java Development Kit (JDK) installation directory, see here.

  • For details on Hardware and Software requirements see here.

Products and services required:

  1. Deployment Framework

  2. FX Integration API

  3. Liberator

  4. Transformer

  5. CPB_RefinerService

  6. CPB_PermissioningService

  7. CPB_FieldEnricherService

  8. Caplin Integration Suite

  9. Caplin Eclipse Plugin

Licenses required:

  • license-rttpd.conf

  • license-transformer.conf

Installing the Deployment Framework

The Deployment Framework allows you to swiftly set up and deploy Caplin Platform (back-end) components.

To install the Deployment Framework, see Installing the Deployment Framework.

Once you’ve installed and set up the Deployment Framework…​

You will need to copy and place various back-end components in the form of zipped files, into the newly set up installation directory. Besides the Liberator and Transformer zip files, the rest contain what we refer to as blades. Any additional zip files supplied to you will also contain blades.

Copy and paste the following zip files into the \kits folder:

  • Liberator.zip (this is a back-end component)

  • Transformer.zip (this is a back-end component)

  • CPB_Refiner.zip (this is a blade)

  • CPB_PermissioningService.zip (this is a blade)

  • Any other additional zip files you have been supplied with

Setting up the Adapter Suite

The Adapter Suite contains individual zip files known as kits; they contain packaged Adapter blades which require unpacking and deploying using the Deployment Framework. All Caplin Blades are supplied in kit form (zipped files).

If you were supplied with an Adapter Suite:

  1. Unzip the suite and copy the individual zip files contained into the \kits directory.

  2. Now skip the next section (Novo Adapter Suite) and go straight to Deploying the Adapter Suite (Step 3)

Novo Adapter Suite

If you haven’t received an Adapter Suite, you can use our example Adapter Suite which consists of Novo Adapters (Novo is simply an example namespace). There’s two ways to set this up:

Copy the Suite directly from the FX Integration API

You can use the NovoAdapter.zip files which come supplied with the FXIntegrationAPI.zip:

Import the Novo Adapter zip files:

  1. Unzip the FXIntegrationAP.zip to a location of your choice

  2. Find the zipped Novo adapter project for each Novo prefixed adapter folder under: \examples\Novo<Adapter_Name>Adapter\distributions.

  3. Copy each Novo adapter zip file to the \kits folder in your Deployment Framework’s root directory.

  4. Once complete, skip the next section (Generate the Suite using the FX Integration API) and go straight to Deploying the Adapter Suite (Step 3).

Generate the Suite using the FX Integration API

You can generate the Novo Adapter Suite using example code from the FXIntegrationAPI.zip. To do this, you’ll need to generate the following adapter blades using our Novo Adapter example projects:

  • NovoCalendarAdapter

  • NovoPermissioningAdapter

  • NovoRatesAdapter

  • NovoTradingAdapter

  • NovoClientSearchAdapter

We will import the above adapter examples as Java-based Eclipse projects, and then export these projects as kits, in the form of a zip file. To do this, you’re going to need an Eclipse IDE installed and running.

Here’s how to do it…​

Import an adapter example as a Java-based project:

  1. Unzip the FXIntegrationAPI.zip andcopy the contents of the \examples directory to a location of your choice.

  2. Run Eclipse and click File > Import > General (Drop-down folder) > Existing Projects into Workspace

  3. Now import the contents you copied from step 1, which contain all the Novo Adapter examples.

    The adapter examples will already have a .class and .project file, and are packaged with all the required libraries.

The Caplin Integration Suite (CIS) Toolkit enables you to develop Caplin blades. With support for Eclipse integration, the CIS Eclipse Plugin makes the process even easier. You’ll need the com.caplin.eclipse.site.zip (the Eclipse Plugin) file for the step below.

Install the CIS Toolkit and the CIS Eclipse Plugin:

  1. In Eclipse, select Help > Install New Software…​ then click Add…​ in the new dialog box that appears

  2. Click Archive... in the 'Add Repository' dialog box, then find and select the com.caplin.eclipse.site.zip file

  3. Give the plugin a name, e.g. 'Caplin Eclipse Plugin' and click OK

  4. In the 'Install' dialog box which appears next, you should now see Caplin Platform Plugins in the viewing area for 'Available Software'. Expand this item by clicking the small drop-down arrow on the right. Now ensure that the checkbox for Caplin Integration Suite plugin for Eclipse is selected.

  5. Keep clicking Next to continue until you reach the 'Review Licenses' window. Accept the terms by clicking 'I accept…​' and then click Finish. When the install has finished click Yes to restart Eclipse.

Export an adapter project as a kit (zip file):

  1. Select one adapter project in Eclipse and go to File > Export, from the menu bar

  2. In the 'Export' window, find and expand the 'Caplin' drop-down folder to select Caplin Platform Blade, then click Next

  3. In the next window specify a desired location to output the blade, making sure that Complete integration adapter blade is selected under' Export Options'

  4. Now click Finish. This will now have generated a zip file for the adapter at the desired export location; repeat steps 1-4 for each adapter project

  5. When you’re done, the last step is to copy all the generated zip files into the /kits folder of the Deployment Framework installation directory

See here for more detailed information on exporting Java-based Adapter Blade projects using the CIS Eclipse Plugin.

Deploying the Adapter Suite

Each Adapter within an Adapter Suite is a zip file containing a Java-based adapter blade project. These zip files are packaged as kits which require unpacking (unzipping) and deployment. We will use the Deployment Framework (DFW) to deploy each kit within the Adapter Suite.

…​ two simple steps!

Deploy all kits

(for a Windows-based environment)

  1. Run Cygwin, and navigate to the upper-most folder of the Deployment Framework directory.

  2. Run the command ./dfw deploy (this unzips each kit in the _kits_ directory, activates the contained blade and archives the zip files. For more details on this, see here)

    You may receive a warning reminding you to update the hosts-denfs.conf file in \global_config - don’t worry! We will do this in the next section.

Now when you look inside the \active_blades folder within your Deployment Framework’s root directory, you will see references to all kits deployed (blades and components). These referenced items are symbolic links (symlinks). Each link corresponds to a blade that has been deployed in the kits folder and is currently active. For more information on active and inactive blades, see here.

The \active_blades folder may contain additional references to other blades; additional blades come supplied with the Deployment framework package by default.

For more on this procedure, see Deploy Platform components to the Framework.

Configuring the adapter blades

In this section, you’re going to tell the Deployment Framework which blades you want to run from the /active_blades folder, and where to run them! You need to update the hosts-defns.conf file with some new configuration; You will do this by defining a new blade host for the server machine where we will want the adapter blades to run.

What to do…​

Define a new blade host:

  1. Find the \global_config folder in your DFW installation directory, and open the hosts-defns.conf file

  2. Look under # Blade hosts and remove the following lines of code:

    define DemoDataSource_PRIMARY_HOST            localhost
    define DemoDataSource_SECONDARY_HOST          localhost
  3. Configure a new blade host definition for each adapter blade in the \active_blades folder:

    define <ADAPTER_NAME>_PRIMARY_HOST            localhost

    For example:

    define NovoCalendarAdapter_PRIMARY_HOST       localhost

    Important note: Only do this for the adapter blades belonging to a supplied Adapter Suite or any adapter blades generated using the Novo Adapter examples previously (Creating an Adapter suite). Disregard any additional blades contained within the \active_blades folder.

…​All done!

The next time we start up the Deployment Framework, all new configuration defined in hosts-defns.conf will be copied to a file named hosts.conf. Warning: Never directly edit or modify the contents of hosts.conf.

The Deployment Framework documentation contains advanced information on facilitating failover across multiple machines, configuring hostnames for multiple server machines and troubleshooting adapter blades.

Setting up Liberator and Transformer

Liberator is a powerful streaming server used to deliver messages and financial data across network connections and platforms. Alongside Liberator, Transformer provides real time data processing using a high-speed data transformation engine; enabling you to filter and modify incoming market data streamed through Liberator.

Licensing

Without licensing Liberator and Transformer, the components will operate in a temporary evaluation mode; where both components automatically shut down after 30 minutes of operation. Set up the following licenses to remove the time-limit and fully activate Liberator and Transformer:

  • license-rttpd.conf (for Liberator)

  • license-transformer.conf (for Transformer)

Place both license files into your Deployment Framework installation directory under: <Framework-root>\global_config\licenses. These license files will have been provided to you by Caplin Support.

Deploying both components

If you previously followed the Installing the Deployment Framework and Deploying the Adapter Suite guides, you will have automatically deployed Liberator and Transformer as the ./dfw command deploys all kits within the \kits folder before archiving the unpacked kits to another location. Otherwise, see the following detailed guides on installing Liberator and Transformer which provide plenty of information, including Linux installations (disregard any steps already completed):

When you have deployed all kits and configured the hosts-defns.conf file from previous steps, you can begin initiating all components and blades, see below.

Running the back end

You are now going to use the Deployment Framework’s start and stop commands to start up Liberator, Transformer, the Adapter Blades and any additional blades contained within the \active_blades folder.

Let’s begin…​

Start and stop all components and blades:

  1. Open Cygwin and navigate to the upper-most level of your Deployment Framework installation directory. Run the following command:

    ./dfw start
    If in a Windows-based environment, you may receive a firewall warning for rttpd.exe and transformer.exe. Allow them access to continue.

    This command will simultaneously start- up all deployed components and blades; whenever this command is entered, any previous instances of components and

    blades that may already be running will be shut down, and re-started. Upon execution of this command, a list of items depicting the components and blades that have been

    activated will be displayed in the Cygwin console.

  2. Now access the Liberator home page and check if Liberator is running correctly by opening a Web browser and navigating to localhost:18080.

  3. On the homepage, select 'View Status' under Status. When prompted for user log in details, enter:

    Username admin

    Password admin

  4. The Liberator’s status page should now be displayed in your browser window. Check to see if all services and their corresponding adapters are up and running.

  5. To shut- down all blades and components, run the following command:

    ./dfw stop

…​Finished!

For additional information on these steps, see the Start and stop components and blades guide. For a full list of all DFW commands see here.