Coder Social home page Coder Social logo

iguoke / etherflyer_exchange_server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from etherflyer/etherflyer_exchange

0.0 2.0 0.0 704 KB

A trading engine with high-speed performance and real-time notification

License: MIT License

C 97.70% C++ 0.87% Makefile 0.97% Shell 0.29% Python 0.17%

etherflyer_exchange_server's Introduction

EtherFlyer Exchange Server

EtherFlyer Exchange Server is a trading backend with high-speed performance, designed for cryptocurrency exchanges. It can support up to 10000 trades every second and real-time user/market data notification though websocket.

Architecture

architecture

For this project, it is marked as Server in this picture.

code structure

Require system

  • MySQL: For saving operation log, user balance history, order history and trade history.

  • Redis: A redis sentinel group is for saving market data.

  • Kafka: A message system.

Base library

  • network: An event base and high performance network programming library, easily supporting 1000K TCP connections. Include TCP/UDP/UNIX SOCKET server and client implementation, a simple timer, state machine, thread pool.

  • utils: Some basic library, including log, config parse, some data structure and http/websocket/rpc server implementation.

Modules

  • matchengine: This is the most important part for it records user balance and executes user order. It is in memory database, saves operation log in MySQL and redoes the operation log when start. It also writes user history into MySQL, push balance, orders and deals message to kafka.

  • marketprice: Reads message(s) from kafka, and generates k line data.

  • readhistory: Reads history data from MySQL.

  • accesshttp: Supports a simple HTTP interface and hides complexity for upper layer.

  • accwssws: A websocket server that supports query and pushes for user and market data. By the way, you need nginx in front to support wss.

  • alertcenter: A simple server that writes FATAL level log to redis list so we can send alert emails.

etherflyer_exchange_server's People

Contributors

haipome avatar pplorins avatar tomisetsu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.