Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Table of contents

Overview

The Simple FIX Socket Transport Adaptor (hereinafter SFS) is intended for communication with FixEdge from third-part applications. The main goal of this adaptor is quick and easy building of the network applications that may use full advantage of FIX Protocol.

 

Requirements

Hardware

Hardware requirements of the SFS adaptor similar to the FixEdge hardware requirements.

Software

Software requirements of the SFS adaptor similar to the FixEdge software requirements.

 

Installation

Normally SFS adaptor is distributed as a zip-archive with the name SFSAdaptor_xx.zip, where xx stands for SFS adaptor version. The distribution package consists of:

File

Description

bin\SFSAddinDll.dll

SimpleFixSocket Transport Adaptor library

bin\SFS.properties

Sample properties of SimpleFixSocket Transport Adaptor

doc\SFSAdaptor_IntegrationGuide.html

SimpleFixSocket Transport Adaptor - Integration Guide

doc\SFSAdaptor_ProgrammingGuide.html

SimpleFixSocket Transport Adaptor — Programming Guide

doc\SFSAdaptor_FunctionalSpecification.html

SimpleFixSocket Transport Adaptor — Function Specification

doc\Taking_cost.gif

Auxiliary files related to the documentation

doc\SessionClosing.jpg

Auxiliary files related to the documentation

doc\SessionEsteblishing.jpg

Auxiliary files related to the documentation

sample\SFSClient

SimpleFixSocket Client application sample

To install SFS adaptor unpack the .zip file and copy SFSAddinDll.dll into the FixEdge's \bin folder. See the sections Configuration in order to learn how to configure SFS adaptor. After the SFS adaptor is configured the FixEdge need to be started.

 

Configuration

Properties

SFS adaptor configured using following properties:

Property name

Description

TransportLayer.SFSAdaptorDLL.DllName

Contains path and name of the SFS adaptor dll. Property is required.

TransportLayer.SFSAdaptorDLL.Description

Name of adaptor. Property is required.

TransportLayer.SFSAdaptorDLL.Type

Type of the adaptor library, has contains value 'DLL'. Property is required.

TransportLayer.SFSAdaptorDLL.ListenPort

Listen port, that SFS adaptor use to accept client's connections. Integer value, should be > 0. Property is required.

TransportLayer.SFSAdaptorDLL.NumberOfWorkers

Amount of the workers threads that concurrently handle client's messages. Integer value, should be > 0. Property is required.

TransportLayer.SFSAdaptorDLL.LogEnableTimestamp

Enable timestamp in the messages logging. By default value is ‘true’.

TransportLayer.SFSAdaptorDLL.LogUTCTimestamp

UTC format of timestamp in the messages logging. By default value is ‘false’, outputs in local time.

TransportLayer.SFSAdaptorDLL.AcceptConnectionsFromIP

Contains IP addresses of the acceptable connections. Property is optional.

TransportLayer.SFSAdaptorDLL.Sessions

Contains enumeration of registered SFS clients. Property is required.

TransportLayer.SFSAdaptorDLL.<ClientName>.LogDirectory

Absolute or relative path where incoming and outgoing messages will be logged to “*.in” and “.out” files accordingly. All relative values of path will be added toFIXEdge.RootDir directory.

TransportLayer.SFSAdaptorDLL.<ClientName>.SmartXmlMessageHandling

Enables mode of FIXML messages handling; must equal ‘true’ or ‘false’.

If mode enabled:

* For each outgoing FIX message type “n”, <213=XML Data> tag of (XML message) will be extracted; only FIXML data will be sent to SFS client.

* For each incoming from SFS client data that represent as FIXML will be packed into 213 tag of “n” message. By default value is ‘false’.

TransportLayer.SFSAdaptorDLL.<ClientName>.FileSession

For file output only. If parameter is ‘true’ then all outgoing messages will not be send to session. By default value is ‘false’.

Note: Set SmartXmlMessageHandling to ‘true’ for logging of extracted XML data from outgoing “n” messages.

TransportLayer.SFSAdaptorDLL.<ClientName>.SplitLogRecordsToFiles

For file output only. If parameter is ‘true’ then each message will be logged into separate file with unique name. By default value is ‘false’.

Note: Set SmartXmlMessageHandling to ‘true’ for logging of extracted XML data from outgoing “n” messages.

Note that all changes in properties file are applied only after FIX Edge restart.

 

Integration with FixEdge

To integrate SFS adaptor into the FixEdge, following steps have to be executed:

1.      Open FixEdge properties file (FIXEdge.properties by default).

2.      Find 'TransportLayer.TransportAdapters' property

1.      Add 'TransportLayer.TransportAdapters' property in case it isn't exists

3.      Set 'TransportLayer.SFSAdaptorDLL' to the value of the 'TransportLayer.TransportAdapters' property:

TransportLayer.TransportAdapters = TransportLayer.SFSAdaptorDLL

1.      If 'TransportLayer.TransportAdapters' property already has value - append ',TransportLayer.SFSAdaptorDLL' to the value:

TransportLayer.TransportAdapters = ...,TransportLayer.SXSAdaptorDLL,TransportLayer.SFSAdaptorDLL

4.      Add property 'TransportLayer.SFSAdaptorDLL.Description' with value - SFS adaptor name:

TransportLayer.SFSAdaptorDLL.Description = SFS Transport Adaptor DLL

5.      Add property 'TransportLayer.SFSAdaptorDLL.DllName' with value - path to the SFS adaptor dll:

TransportLayer.SFSAdaptorDLL.DllName = bin/SFSAddinDll.dll

6.      Add property 'TransportLayer.SFSAdaptorDLL.Type' with value 'DLL':

TransportLayer.SFSAdaptorDLL.Type = DLL

7.      Add property 'TransportLayer.SFSAdaptorDLL.ListenPort' with value - port where SFS adaptor will accept incoming connections:

TransportLayer.SFSAdaptorDLL.ListenPort = 8145

8.      Add property 'TransportLayer.SFSAdaptorDLL.NumberOfWorkers' with value - thread's amount that handles connections:

TransportLayer.SFSAdaptorDLL.NumberOfWorkers = 10

9.     Add property 'TransportLayer.SFSAdaptorDLL.SFSClientName.LogDirectory ' with value – path to incoming and outgoing messages logging:

TransportLayer.SFSAdaptorDLL.SFSClientName.LogDirectory =FixEdge1/log

10.  Restart FixEdge to apply changes

After changes the FixEdge properties file may looks like this:

....

#------------------------------------------------------------
# Transport Layer Section
#------------------------------------------------------------

TransportLayer.TransportAdapters = TransportLayer.SFSAdaptorDLL

 

....
#------------------------------------------------------------

# SFS Adaptor settings

#------------------------------------------------------------

# SFS adaptor name

TransportLayer.SFSAdaptorDLL.Description = SFS Transport Adaptor DLL

# Contains path and name of the SFS adaptor dll. Property is required 
TransportLayer.SFSAdaptorDLL.DllName = ./SFSAddinDll.dll

# Type of the adaptor library, has contains value 'DLL'. Property is required 
TransportLayer.SFSAdaptorDLL.Type = DLL

# Listen port, that SFS adaptor use to accept client's connections. Integer value, should be > 0. Property is required 
TransportLayer.SFSAdaptorDLL.ListenPort = 8444

# Amount of the workers threads that concurrently handle client's messages. Integer value, should be > 0. Property is required 
TransportLayer.SFSAdaptorDLL.NumberOfWorkers = 10

# Absolute or relative path where incoming and outgoing messages will be logged to “*.in” and “.out” files accordingly. All relative values of path will be added to FIXEdge.RootDir directory. Property is optional. By default accept value of FIXEdge.RootDir
TransportLayer.SFSAdaptorDLL.NumberOfWorkers = 10
....

 

Administration

SFS adaptor support Administrative interface with action 'close_session':

Cases of XML commands using:

<?xml version="1.0" encoding="UTF-8"?>

<Action Name="CLOSE_SESSION" Target="FixEdge:Transport:ADMFIXED">

<Params>

<Param Name="ADAPTOR" Value="SFSAdaptorDLL"/>

<Param Name="CLIENT " Value="SFSClient"/>

</Params>

</Action>

FEAdminConsole command line example:

FEAdminConsole -ADAPTOR_EXEC -adaptor SFSAdaptorDLL -command CLOSE_SESSION -client SFSClient

Monitoring (view logs)

SFS adaptor puts log messages into the FIXEdge log. Besides adaptor always creates “SFSClientName-*.in” and “SFSClientName-*.out” files for logging of incoming or outgoing messages accordingly. Adaptor creates log files in the directory that specified in LogDirectory parameter, it is may be absolute or relative to path in theFIXEdge.RootDir parameter.

Each record in the log separated by linefeed and timestamp in form “YYYYMMDD-HH:MM:SS.sss : ”. But timestamp may be disabled in the records by option LogEnableTimestamp = false. Timestamp has local time by default. Use LogUTCTimestamp to enable UTC time format.

SFS adaptor can creates a simple file session without message sending into socket by specifying parameter FileSession = true. All outgoing messages will be logged in “SFSClientName-*.out”, but not sent to SFS client. If SmartXmlMessageHandling mode is enabled then XML data will be extracted from FIXML messages (MsgType = “n”, tag 213) into outgoing log.

 

  1. Open FixEdge property file
  2. Add property 'SFSAdaptor.SFSClientName.LogDirectory' with value - path to incoming and outgoing messages logging:

TransportLayer.SFSAdaptor.SFSClient.LogDirectory = FIXEdge1/log

  1. Add property ‘SFSAdaptor.SFSClientName.FileSession’ with value – ‘true’ to enable file session mode:

TransportLayer.SFSAdaptor.SFSClient.FileSession = true

  1. Add property ’SFSAdaptor.SFSClientName.SmartXmlMessageHandling’ with value – ‘true’ to enable the XML data extracting from FIXML messages (MsgType = “n”):

TransportLayer.SFSAdaptor.SFSClient.SmartXmlMessageHandling = true

  1. Restart FixEdge

When SFS adaptor start succeeds following record will be wrote into the log file (xxx - the version of the SFS adaptor):

[NOTE] 20070215-11:20:12.437 - SFS Adaptor v.xxx started.

 

FAQ

  1. Is it possible to use another prefix of the SFS adaptor properties (not 'TransportLayer.SFSAdaptorDLL')?

 

1. Is it possible to use another prefix of the SFS adaptor properties (not 'TransportLayer.SFSAdaptorDLL')?

SFS adaptor requires the prefix 'TransportLayer.SFSAdaptorDLL' for the adaptor's properties, another prefix is prohibited.

 

Troubleshooting

Problem

Solution

FixEdge start fails and FixEdge log file contains following record:

[FATAL] 20070215-11:42:25.250 - Transport Layer has failed to initialize: Error loading DLL './/../SFSAddinDll.dll '. : The specified module could not be found. (126)

FixEdge unable to find SFS adaptor library file. Verify that 'TransportLayer.SFSAdaptorDLL.DllName' contains valid path and name.

FixEdge start fails and FixEdge log file contains following record:

[FATAL] 20070215-11:45:12.312 - Transport Layer has failed to initialize: Cannot find the property 'TransportLayer.SFSAdaptorDLL.XXX'

SFS adaptor was not configured properly. Required property 'TransportLayer.SFSAdaptorDLL.XXX' doesn't exist in FixEdge property file.

FixEdge start fails and log file contains following record:

[FATAL] 20070215-11:47:29.812 - Initialization was not completed. Reason: ::accept : A non-blocking socket operation could not be completed immediately. (10035)

Verify that port mentioned at 'TransportLayer.SFSAdaptorDLL.ListenPort' property is not busy.

SFSAdaptor is started but “.in” and “.out” log files is not exists in the path specified by 'TransportLayer.SFSAdaptorDLL.SFSClient.LogDirecotory’

Verify that path in the LogDirectory is correct relatively FIXEdge.RootDir.

  • No labels