Skip to content

rqzrqh/matchengine_rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

It's a memory-matchengine, very simple. Written in rust, it's used for examing my rust-study . It referes to a c-language matchengine which runs long-term.

more detail see design.md

Usage

cd deploy

./db_market.sh localhost $dbuser $dbpasswd eth_btc
./kafka_market.sh eth_btc
./kafka_settle.sh
RUST_LOG=info cargo run --release ./deploy/eth_btc.conf
python3 ./tests/order_generator.py

FileList

console query matchengine info

src all code

deploy scripts of init database and messagequeue, config file

tests very useful test scripts, generate various orders

TODO

1.Replay from a specificed offset. But the rust-library of kafka and rdkafka aren't yet support this feature, the rocketmq also is incomplete.

2.Use a better decimal library for rescale a value. The rust_decimal's function of rescale only support decimal part, not support integer part.

3.Performance test and optimize

4.Automatically deletes old snapshot

5.use rocketmq, kafka is not a suitable message queue for more than 64 topics

About

A simple memory-matchengine written in rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published