Skip to content

Commit

Permalink
Replace docker and proto by crate orchestra (#264)
Browse files Browse the repository at this point in the history
* Replaces `docker` and `proto` by crate orchestra.

* Fixes gitmodules to use `https`.

* Updates to use orchestra proto file.

* Updates `orchestra`.
  • Loading branch information
silathdiir authored Aug 11, 2021
1 parent 2bafc29 commit 84900a3
Show file tree
Hide file tree
Showing 35 changed files with 41 additions and 3,314 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,11 @@ jobs:
cd ./examples/js/
npm install
- name: Pull git submodule
run: git submodule update --init --recursive

- name: Up docker-compose
run: docker-compose --file "./docker/docker-compose.yaml" up --detach # db zookeeper kafka
run: docker-compose --file "./orchestra/docker/docker-compose.yaml" up --detach

# 1. we build the binary after starting docker-compose, to ensure time for running services in docker-compose
# 2. we avoid nohup cargo run directly, to make sure server is running before starting trading tests
Expand All @@ -106,7 +109,7 @@ jobs:
run: |
sleep 5
make taillogs
docker-compose --file "./docker/docker-compose.yaml" logs --tail=20
docker-compose --file "./orchestra/docker/docker-compose.yaml" logs --tail=20
- name: Run trading tests
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "orchestra"]
path = orchestra
url = https://github.com/Fluidex/orchestra.git
60 changes: 18 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ lazy_static = "1.4.0"
log = "0.4.14"
nix = "0.20.0"
num_enum = "0.5.1"
prost = "0.7.0"
prost-types = "0.8.0"
orchestra = { git = "https://github.com/Fluidex/orchestra.git", branch = "master", features = [ "exchange" ] }
qstring = "0.7.2"
rand = "0.8.3"
serde = { version = "1.0.124", features = [ "derive" ] }
Expand All @@ -43,10 +42,6 @@ tracing-appender = "0.1"
tracing-subscriber = "0.2"
ttl_cache = "0.5.1"

[build-dependencies]
prost = "0.7.0"
tonic-build = "0.4.0"

[[bin]]
name = "restapi"
path = "src/bin/restapi.rs"
Expand Down
8 changes: 1 addition & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ lint:
cargo fmt --all -- --check
cargo clippy -- -D warnings

fmtproto:
clang-format -i proto/exchange/matchengine.proto

fmtsql:
find migrations -type f | xargs -L 1 pg_format --type-case 2 -i

Expand All @@ -23,7 +20,7 @@ fmtrs:
fmtjs:
cd examples/js && yarn fmt

fmt: fmtproto fmtsql fmtrs fmtjs
fmt: fmtsql fmtrs fmtjs

startall:
cargo build
Expand Down Expand Up @@ -52,6 +49,3 @@ cleardb:
# https://stackoverflow.com/a/13823560/2078461
psql $(DB) -X -a -f $(DB_RESET_DIR)/down.sql
psql $(DB) -X -a -f $(DB_RESET_DIR)/up.sql

genpb:
cd proto && protoc -Ithird_party/googleapis -I. --include_imports --include_source_info --descriptor_set_out=matchengine.pb exchange/matchengine.proto
14 changes: 0 additions & 14 deletions build.rs

This file was deleted.

4 changes: 2 additions & 2 deletions config/development.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
debug: true
db_log: postgres://exchange:exchange_AA9944@127.0.0.1/exchange
db_history: postgres://exchange:exchange_AA9944@127.0.0.1/exchange
db_log: postgres://exchange:exchange_AA9944@127.0.0.1/exchange
db_history: postgres://exchange:exchange_AA9944@127.0.0.1/exchange
brokers: '127.0.0.1:9092'
1 change: 0 additions & 1 deletion docker/.gitignore

This file was deleted.

19 changes: 0 additions & 19 deletions docker/configs/proxy.conf

This file was deleted.

51 changes: 0 additions & 51 deletions docker/docker-compose.yaml

This file was deleted.

81 changes: 0 additions & 81 deletions docker/envoy.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion examples/js/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
VERBOSE
} from "./config";

const file = "../../proto/exchange/matchengine.proto";
const file = "../../orchestra/proto/exchange/matchengine.proto";
const load = {
keepCase: true,
longs: String,
Expand Down
1 change: 1 addition & 0 deletions orchestra
Submodule orchestra added at b3b45c
Loading

0 comments on commit 84900a3

Please sign in to comment.