Dashboard > OpenFAST > Home > Examples
OpenFAST Log In | Sign Up   View a printable version of the current page.
Examples
Added by Jacob Northey, last edited by Jacob Northey on Oct 24, 2008  (view change)
Labels: 
(None)

Examples

Since the OpenFAST 1.0.1 release, the OpenFAST binary distribution includes a few sample command line tools to play with. This set of tools includes a utility to measure the decoding performance of OpenFAST, download messages from a FAST server, and convert XML to and from a compressed FAST format.

Running the Examples

Scripts to run the examples are located in the bin directory of the binary distribution. The scripts require the JAVA_HOME environment variable to set to the location of a valid Java installation. To see a list of options use the -? option.

Performance Runner

The performance runner decodes a file containing fast-encoded data using the given templates. The results are given in total decoding time as well as average time it takes to decode a message. It is recommended to set the repeat to at least 3 as the first run is slower due to class loading.

Options

option long description
-? --help Displays this message.
-c --continuous Keep repeating the test until the process is killed
-d --data <arg> FAST Encoded data
-e --error Show stacktrace information
-f --format <arg> Data format [hex|binary] default is binary
-n --ns Enables namespace awareness
-p --preload Preload data into memory instead of decoding directly from file
-r --repeat <arg> Re process data file X number of times
-t --template <arg> Message Template definition file

Use

To run the performance runner try:

perf.bat -t D:\data\templates.xml -d D:\data\data.fast -p -r 3

Hexadecimal format

By default the format of the FAST data file is expected to be binary. There is also support for files encoded using hexadecimal byte values. Use the "-f hex" option to use this format.

Message Consumer

The message consumer tool is used to test OpenFAST compatibility with a given data provider's FAST stream.

Options

options long description
-? --help Displays this message
-e --error Show stacktrace information
-h --host <arg> The host name of the server (or group name for multicast)
-m --template <arg> Message template definition file
-p --port <arg> Port to connect to
-t --protocol <arg> Protocol [tcp|udp] defaults to tcp

Use

TCP Connection

consumer.bat -h localhost -p 2001 -m templates.xml

UDP Connection

consumer.bat -t udp -h 224.0.0.1 -p 30000 -m templates.xml

XML Conversion Tools

The XML Conversion utilities are a proof of concept implementation of the proposed FAST extension Map operator. The Map operator is used to compress XML element names and attribute names.

Options

The XML Conversion tools simply takes an input file and output file.

Use

Convert XML to FAST

xml2fast.bat data.xml data.fast

Convert FAST to XML

fast2xml.bat data.fast data.xml

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.1.5a Build:#411 Mar 16, 2006) - Bug/feature request - Contact Administrators

SourceForge.net Logo