Giter VIP home page Giter VIP logo

ctp_redis's Introduction

ctp_Redis

注意: 以后本系统将第一时间在github上更新,请大家关注此处。

依赖

redis 3.2.x版本; ctp_redis依赖hiredis、xredis在使用xredis前需要安装hiredis库; xredis 使用了自己修改过的版本,RedisNode可配置; 默认安装即可;

make&sudo make install

编译

  • 把amake和pump工具放到环境变量;
  • 编译前需要先设置环境变量;
cat ~/.bash_profile
LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:.
export LD_LIBRARY_PATH
C_INCLUDE_PATH=/usr/include:/usr/local/include:/usr/local/include:/usr/local/include/zookeeper
export C_INCLUDE_PATH

CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/include:/usr/local/include:/usr/local/include/hiredis:/usr/local/include/zookeeper:/usr/local/include/xredis
export CPLUS_INCLUDE_PATH

启动

# start market
./market
# start trade
./trade
# start plot
./plot GroupA 1
./plot GroupB 2
./plot GroupB 3

系统架构

ctp_redis

功能点

  • 多环境支持;
  • trade 报单接口, market 行情转换, plot 策略进程;
  • plot [组别] [唯一标记],组别用于一个策略组的主备,一个组只有一个主,其它同步进行,只接受,不发送, 在主进程宕掉后,其它进程竞争为主后进行发送;
  • 唯一标识用于标识进程所在主机位置;
  • 使用lrange使性能达到报单240000笔/秒;
  • 支持配置多账号交易;
  • 提供API报单接入和socket.io行情接入

TODO

  • 内部通过protbuf和msgpack序列化数据,json只做策略报单接入使用;
  • 策略前置、路由、主备与灾备考虑;
  • 策略前端展现;

相关功能

[Simnow](http://www.simnow.com.cn/)注册网站;

[Redis](http://redis.io/)下载地址;

作者:showmsg

QQ群:12277157,因目前项目刚创建,还没什么人气哦~_~

感谢:

[xredis](https://github.com/0xsky/xredis)

[ctpService](https://coding.net/u/laozhu_zzy)

感谢其它C++开源常用库的贡献者!!!

捐赠作者:[支付宝账号] [email protected]

ctp_redis's People

Contributors

showmsg avatar

Watchers

 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.