Skip to content

Implement a small project with LMAX to show the concepts

Notifications You must be signed in to change notification settings

AkbarDizaji/LMAX-TradingSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

Powered by Laravel Powered by .NET Powered by PHP C# LMAX Architecture High Performance Asynchronous License: MIT GitHub stars

LMAX Trading System

This project provides a multi-language implementation of the LMAX Disruptor architecture for building high-performance trading platforms. The LMAX architecture is a low-latency, high-throughput system designed for handling millions of trades per second. It is an in-memory, event-sourced system using a pattern known as Disruptor to achieve high concurrency without the need for traditional locks.

Implemented Languages

**PHP (Laravel): **Full implementation of LMAX architecture. **C# (.NET): **Full implementation of LMAX architecture.

Overview of LMAX Architecture

LMAX is a highly efficient architecture, designed to process a high volume of transactions in financial trading systems. The core components include:

  • In-memory Business Logic Processor: Handles all business logic in a single-threaded manner for simplicity and speed.
  • **Disruptor Pattern: **A high-performance concurrency framework that replaces traditional queues with a lock-free ring buffer.
  • Event Sourcing: All changes are captured as a series of events, making the system resilient to failures by replaying events from a durable store.

Features

  • In-memory processing: All transactions are processed in memory, reducing I/O overhead and increasing speed.
  • Event Sourcing: Ensures system state can always be rebuilt by replaying events.
  • Concurrency: Utilizes the Disruptor pattern to handle concurrent tasks without the need for locks.
  • Multi-language support: Current implementations in:
    • PHP (Laravel)
    • C# (.NET)

Project Structure

/Laravel-PHP: Contains the LMAX implementation using the Laravel framework in PHP. /.NET-C#: Contains the LMAX implementation using .NET in C#.

Each language folder contains its own implementation, including the core architecture and a sample application demonstrating how LMAX can be used for handling high-frequency transactions.

How to Use

PHP (Laravel) Setup

  1. Clone the repository.
  2. Navigate to the /Laravel-PHP
  3. Install the dependencies:
composer install

4.Configure your .env file. 5.Run the migrations: php artisan migrate

php artisan migrate

6.Run the application:

php artisan serve

C# (.NET) Setup

  1. Clone the repository.
  2. Navigate to the csharp-dotnet/ directory.
  3. Restore the dependencies:
dotnet restore

4.Build and run the application:

dotnet run

ContributingContributing

If you’d like to contribute to this project, please feel free to submit a pull request or open an issue.

About

Implement a small project with LMAX to show the concepts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published