Setting up the back end
This page guides you through the steps required to set up the FX Professional Motif back-end systems; including a set of Integration Adapters that provide the data required by the front end.
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. -
The FX Professional Motif is supported by Caplin Platform versions 6.1 and under
-
For details on Hardware and Software requirements see here.
Files required:
-
DeploymentFramework.zip
-
FXIntegrationAPI.zip
-
Liberator.zip
-
Transformer.zip
-
CPB_RefinerService.zip
-
CPB_PermissioningService.zip
-
CaplinIntegrationSuite.zip
-
com.caplin.eclipse.site.zip (Caplin Eclipse Plugin)
Licenses required:
-
license-rttpd.conf
-
license-transformer.conf
1. Installing the Deployment Framework
The Deployment Framework allows you to swiftly set up and deploy various Caplin Platform (back end) components.
Firstly, If you are using a Microsoft Windows based environment, you need Cygwin installed. If you haven’t, follow these instructions: Installing Cygwin. When you’re done, install these additional Cygwin packages:
-
vi (the vim editor, under 'Editors')
-
dos2unix (under 'web')
-
wget (under 'web')
Unzip the file DeploymentFramework.zip to a location of your choice and then follow these instructions: Installing the Deployment Framework. For further guidance, see here.
Once you’ve installed and set up the Deployment Framework…
We’re now going 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 additional zip files you have been supplied with
2. 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:
-
Unzip the suite and copy the individual zip files contained into the \kits directory.
-
Now skip the next section (Novo Adapter Suite) and go straight to Deploying the Adapter Suite (Step 3).
…If you haven’t received an Adapter Suite
Novo Adapter Suite
You can use our example Adapter Suite comprised of Novo Adapters (Novo is simply an example namespace). There’s two ways to set this up:
Copy Suite directly from the FX Integration API
You can use the NovoAdapter.zip files which come supplied with the FXIntegrationAPI.zip :
Import a Novo Adapter zip file:
-
Unzip the FXIntegrationAP.zip to a location of your choice
-
Find the zipped Novo adapter project for each Novo prefixed adapter folder under: \examples\Novo<Adapter_Name>Adapter\distributions.
-
Copy each Novo adapter zip file to the \kits folder in your Deployment Framework’s root directory.
-
Once complete, skip the next section (Generate Suite using the FX Integration API) and go straight to Deploying the Adapter Suite (Step 3).
Generate the Suite using 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
-
NovoOrderAdapter
-
NovoPermissioningAdapter
-
NovoRatesAdapter
-
NovoTradingAdapter
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…
Import an adapter example as a Java-based project:
-
Unzip the FXIntegrationAPI.zip andcopy the contents of the \examples directory to a location of your choice.
-
Run Eclipse and click File > Import > General (Drop-down folder) > Existing Projects into Workspace
-
Now import the contents you copied in 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 (Eclipse plugin) file for this step.
Export an adapter project as a kit (zip file):
-
Select an adapter project in Eclipse and go to File > Export, from the menu bar
-
In the 'Export' window, find and expand the 'Caplin' drop-down folder to select Caplin Platform Blade, then click Next
-
In the next window, specify a desired location to output the blade, make sure Complete integration adapter blade is selected under' Export Options'
-
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
-
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.
3. 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 the each kit within Adapter Suite.
…In two simple steps!
Deploy all kits
(for a Windows-based environment)
-
Run Cygwin, and navigate to the upper-most folder of the Deployment Framework directory.
-
Run the command
./dfw deploy
(this unzips each kit in the _kits_ directory, activates the contained blade and archives the zip files. For more 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 refers to a blade that has been deployed in the kits folder and is currently active. For more information on actived and deactived 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 Caplin components to the Framework.
4. 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 want the adapter blades to run.
Define a new blade host:
-
Find the \global_config folder in your DFW installation directory, and open the hosts-defns.conf file
-
Look under # Blade hosts and remove the following lines of code:
define DemoDataSource_PRIMARY_HOST localhost
define DemoDataSource_SECONDARY_HOST localhost
-
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
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.
5. 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 in the previous guide, the next step will be to use the Deployment framework to start up both components.
6. Running the back end
For this step, you are 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:
-
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 beenactivated will be displayed in the Cygwin console.
-
Now access the Liberator home page and check if Liberator is running correctly by opening a Web browser and navigating to localhost:18080.
-
On the homepage select 'View Status' under Status. When prompted for user log in details, enter:
Username
admin
Password
admin
-
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.
-
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.
Now go to Configuring the end-to-end connection.