Skip to content

Commit 998e31b

Browse files
authored
Merge pull request #33 from mkipnis/misc_1025
Multi Matching Engine ATS and Docker Compose files
2 parents 8ffc2db + 5f507c4 commit 998e31b

File tree

6 files changed

+123
-4
lines changed

6 files changed

+123
-4
lines changed

MiscClients/spring_reactjs/src/main/resources/fixclient.cfg

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
[DEFAULT]
22
ConnectionType=initiator
33
TargetCompID=FIX_GWY_1
4-
#SocketConnectHost=distributed_ats
5-
SocketConnectHost=127.0.0.1
6-
#SocketConnectHost=165.22.179.176
4+
SocketConnectHost=distributed_ats
5+
#SocketConnectHost=127.0.0.1
76
StartTime=00:00:00
87
EndTime=24:00:00
98
HeartBtInt=30

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ services:
100100
restart: unless-stopped
101101
```
102102

103+
### Multi Matching Engine ATS, with each component running in a separate container
104+
* [Docker Compose - Multi Matching Engine ATS](docker/docker-compose-multi-matching-engine.yml)
105+
* [Docker Compose - WebTrader](docker/docker-compose-webtrader.yml)
106+
107+
103108
### Dependencies
104109

105110
|Dependency|Component|
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
version: '3.8'
2+
3+
services:
4+
5+
# DDS Discovery
6+
fast_dds_discovery:
7+
container_name: fast_dds_discovery
8+
image: ghcr.io/mkipnis/distributed_ats:latest
9+
command: >
10+
bash -c "LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/fastdds discovery -q 51000"
11+
ports:
12+
- "51000:51000"
13+
restart: no
14+
15+
16+
# FIX Gateways
17+
fix_gateway_1:
18+
container_name: distributed_ats
19+
image: ghcr.io/mkipnis/multi_matching_engine_ats:latest
20+
depends_on:
21+
- fast_dds_discovery
22+
command: >
23+
bash -c "/usr/local/bin/FIXGateway -c /usr/local/MiscATS/MultiMatchingEngineATS/config/fix_gwy_1.cfg"
24+
environment:
25+
- LOG_FILE_NAME=fix_gateway_1.log
26+
volumes:
27+
- ./logs:/var/log
28+
ports:
29+
- "15001:15001"
30+
restart: no
31+
32+
fix_gateway_2:
33+
container_name: fix_gateway_2
34+
image: ghcr.io/mkipnis/multi_matching_engine_ats:latest
35+
depends_on:
36+
- fast_dds_discovery
37+
command: >
38+
bash -c "/usr/local/bin/FIXGateway -c /usr/local/MiscATS/MultiMatchingEngineATS/config/fix_gwy_2.cfg"
39+
environment:
40+
- LOG_FILE_NAME=fix_gateway_2.log
41+
volumes:
42+
- ./logs:/var/log
43+
ports:
44+
- "16001:16001"
45+
restart: no
46+
47+
48+
# Data Services
49+
data_service_a:
50+
container_name: data_service_a
51+
image: ghcr.io/mkipnis/multi_matching_engine_ats:latest
52+
depends_on:
53+
- fast_dds_discovery
54+
command: >
55+
bash -c "/usr/local/bin/DataService -c /usr/local/MiscATS/MultiMatchingEngineATS/config/data_service_a.ini"
56+
environment:
57+
- LOG_FILE_NAME=data_service_a.log
58+
volumes:
59+
- ./logs:/var/log
60+
restart: no
61+
62+
data_service_b:
63+
container_name: data_service_b
64+
image: ghcr.io/mkipnis/multi_matching_engine_ats:latest
65+
depends_on:
66+
- fast_dds_discovery
67+
command: >
68+
bash -c "/usr/local/bin/DataService -c /usr/local/MiscATS/MultiMatchingEngineATS/config/data_service_b.ini"
69+
environment:
70+
- LOG_FILE_NAME=data_service_b.log
71+
volumes:
72+
- ./logs:/var/log
73+
restart: no
74+
75+
76+
# Matching Engines
77+
matching_engine_market_y:
78+
container_name: market_y
79+
image: ghcr.io/mkipnis/multi_matching_engine_ats:latest
80+
depends_on:
81+
- fast_dds_discovery
82+
command: >
83+
bash -c "/usr/local/bin/MatchingEngine -c /usr/local/MiscATS/MultiMatchingEngineATS/config/matching_engine_MARKET_Y.ini"
84+
environment:
85+
- LOG_FILE_NAME=matching_engine_MARKET_Y.ini
86+
volumes:
87+
- ./logs:/var/log
88+
restart: no
89+
90+
matching_engine_market_z:
91+
container_name: market_z
92+
image: ghcr.io/mkipnis/multi_matching_engine_ats:latest
93+
depends_on:
94+
- fast_dds_discovery
95+
command: >
96+
bash -c "/usr/local/bin/MatchingEngine -c /usr/local/MiscATS/MultiMatchingEngineATS/config/matching_engine_MARKET_Z.ini"
97+
environment:
98+
- LOG_FILE_NAME=matching_engine_MARKET_Z.ini
99+
volumes:
100+
- ./logs:/var/log
101+
restart: no
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: '2'
2+
3+
services:
4+
# WebTrader Front-End
5+
distributed_ats_webtrader:
6+
container_name: distributed_ats_webtrader
7+
image: ghcr.io/mkipnis/distributed_ats_webtrader:latest
8+
volumes:
9+
- ./webtrader_logs:/usr/local/tomcat/logs
10+
ports:
11+
- "8080:8080"
12+
restart: no

docker/dockerize_dats.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ set -x
55
# Core
66
docker build -t ghcr.io/mkipnis/distributed_ats_deps:latest -f Docker.Build_DATS_Deps .
77
docker build -t ghcr.io/mkipnis/distributed_ats:latest -f Docker.Build_Distributed_ATS .
8+
9+
# Exchanges
810
docker build --no-cache -t ghcr.io/mkipnis/dats_crypto_clob:latest -f Docker.Crypto_CLOB .
911
docker build --no-cache -t ghcr.io/mkipnis/dats_ust_clob:latest -f Docker.UST_CLOB .
12+
docker build --no-cache -t ghcr.io/mkipnis/multi_matching_engine_ats:latest -f Docker.MultiMatchingEngineATS .
1013

1114
docker push ghcr.io/mkipnis/distributed_ats_deps:latest
1215
docker push ghcr.io/mkipnis/distributed_ats:latest

docker/fixclient_docker.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ ConnectionType=initiator
33
TargetCompID=FIX_GWY_1
44
SocketConnectHost=distributed_ats
55
#SocketConnectHost=127.0.0.1
6-
#SocketConnectHost=165.22.179.176
76
StartTime=00:00:00
87
EndTime=24:00:00
98
HeartBtInt=30

0 commit comments

Comments
 (0)