FastQuote is a currency trading platform that demonstrates how to build modular, low-latency services with Fabric3. FastQuote is organized into two parts:
- A liquidity provider (e.g. third-party bank or trading network) that publishes currency price feeds
- A pricing engine run by a bank that subscribes to the provider feeds, adds margin to the feeds, and publishes the margined prices to the bank's customers
FastQuote uses the Zero MQ messaging library and therefore only runs on Linux (RedHat or compatible), Windows 7+, and OS X. The Liquidity Provider and Price Engine services are run on two Fabric3 instances. Unlike the other samples, FastQuote must be deployed on the servers produced by the Maven modules under the
fastquote/servers directory. These servers demonstrate how to use the Fabric3 Assembly Plugin to build custom runtime images, in this case configured with extensions that provide low-latency features required to run the samples.
1. Build the FastQuote source
To build FastQuote, go to
apps/fastquote and execute:
mvn clean install.
The build will produce the FastQuote modules and runtime images in the
2. Start the servers
Boot the Provider and PE runtimes from the
server/vm/image/bin directories by executing:
java -jar server.jar
Alternatively, the servers can be started by providing the path to the
server.jar archive relative to the current directory. e.g.:
java -jar target/image/bin/server.jar
Understanding the Architecture
The next section explains the FastQuote application architecture in detail.