Skip to content

kramano/fakex

Repository files navigation

FakeX Trading System

FakeX is a high-performance trading system that demonstrates the use of the LMAX Disruptor pattern for processing financial transactions.

Features

  • High-performance order matching engine
  • Account management with balance tracking
  • Support for buy and sell limit orders
  • Benchmarking tools for performance testing

Getting Started

Prerequisites

  • Java Development Kit (JDK) 23 or higher
  • Gradle (or use the included Gradle wrapper)

Building the Project

./gradlew build

Running the Application

./gradlew run

Benchmarks

The project includes JMH benchmarks to measure the performance of various components of the trading system.

Running All Benchmarks

./gradlew jmh

Running Specific Benchmarks

To run a specific benchmark, use the --includes parameter:

./gradlew jmh --includes=BasicOrderMatchingBenchmark

Project Structure

  • src/main/java: Main source code
    • com.fakex.core: Core trading engine components
    • com.fakex.domain: Domain models (Order, Trade, Account)
    • com.fakex.command: Command pattern implementation
    • com.fakex.wal: Write-Ahead Log implementation
  • src/jmh/java: Benchmark code
    • com.fakex.benchmark.end2end: End-to-end benchmarks
    • com.fakex.benchmark.gc: Garbage collection benchmarks

Libraries Used

The FakeX trading system uses the following libraries:

Core Libraries

  • LMAX Disruptor (4.0.0): High-performance inter-thread messaging library
  • Agrona (2.1.0): High-performance data structures and utility methods

Persistence

  • Chronicle Queue (5.27ea5): Ultra-low latency, persisted queue implementation for Write-Ahead Logging
  • Chronicle Wire (2.27ea5): Serialization library for Chronicle Queue
  • Chronicle Bytes (2.27ea2): Memory management library for Chronicle Queue
  • Chronicle Core (2.27ea3): Core utilities for Chronicle libraries

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages