John Colvin
e85cdcb453
refactor: Move SecurityMarketDataStatistics to lib_domain
2024-09-18 14:02:40 +00:00
John Colvin
2c7f47ef17
cleanup: Remove unnecessary code
2024-09-18 14:02:40 +00:00
John Colvin
b9f7d0b1a2
cleanup: Remove empty header FTXSecurity.h
2024-09-18 14:02:40 +00:00
John Colvin
7feed957a3
cleanup: Remove temporary redirect headers
...
These were used to make code migration smoother (to the new lib_system and lib_domain)
* spark/algorithm/TryCatch.h -> system/algorithm/try_catch.h
* spark/core/BoolName.h -> system/bool_name.h
* spark/core/EnumMacros.h -> system/enum_macros.h
* spark/core/FMT.h -> system/FMT.h
* spark/core/FMT_IMPL.h -> system/FMT_IMPL.h
* spark/core/TimeSpan.h -> system/time_span.h
* spark/core/TimeStamp.h -> system/time_stamp.h
* spark/domain/Price.h -> domain/price.h
* spark/io/JsonReader.h -> system/json/json_reader.h
* spark/io/JsonDumper.h -> system/json/json_dumper.h
2024-09-18 14:02:40 +00:00
John Colvin
14031da8eb
refactor: Move RFQ to lib_domain
2024-09-18 14:02:39 +00:00
John Colvin
6fee0d99d9
refactor: Move AggressorSide proto to lib_domain
...
Get rid of non-proto AggressorSide enum while we're at it (consolidate to 1 type)
2024-09-18 14:02:39 +00:00
John Colvin
5db7a20a41
cleanup: Remove more unused code
2024-09-18 14:02:39 +00:00
John Colvin
250f7d4b6d
refactor: Move a few Order types to lib_domain
2024-09-18 14:02:39 +00:00
John Colvin
dd02b83bc1
refactor: Move TimeInForce to lib_domain
2024-09-18 14:02:39 +00:00
John Colvin
26c3af44e0
cleanup: Remove unused code
2024-09-18 14:02:39 +00:00
John Colvin
90a59b764e
refactor: Move TradeRecord into lib_domain
2024-09-18 14:02:39 +00:00
John Colvin
df750c4dd0
refactor: Move TradingStatus enum to lib_domain
2024-09-18 14:02:39 +00:00
John Colvin
c35d7c90f6
build: Update webpack-cli in admin webapp
2024-09-18 14:02:39 +00:00
John Colvin
1c2dc2c39c
build: Configure admin webapp build entirely in CMakeLists
...
Get rid of build_admin_web_app.py
2024-09-18 14:02:39 +00:00
John Colvin
3faffbe22a
refactor: Move domain types into new lib_domain
...
Also rename files in snake_case (standard naming convention for protos)
https://protobuf.dev/programming-guides/style/
2024-09-18 14:02:39 +00:00
John Colvin
7864c3238c
refactor: Move collections into lib_system
2024-09-18 14:02:39 +00:00
John Colvin
cf4a8599e7
refactor: Move a handful of types/utils to lib_system
2024-09-18 14:02:39 +00:00
John Colvin
7459a4f224
build: Add preset to build with 6 jobs (-j 6)
...
Otherwise the devcontainer may hog too much cpu and cause the container to freeze
2024-09-18 14:02:39 +00:00
John Colvin
f1451b102d
cleanup: Remove unused includes
...
Mostly collection macro headers
2024-09-18 14:02:39 +00:00
John Colvin
23b2758a05
cleanup (build): Move protobuf service generation cmake into lib_spark
...
Because lib_spark owns all the services
2024-09-18 14:02:39 +00:00
John Colvin
5c3a57ceb5
refactor: Rename protobuf out dir "include" -> "protobufs"
...
This is a more accurate and precise name. The dir contains c++ code generated
from .proto files - both sources (.cc) and headers (.pb.h).
2024-09-18 14:02:39 +00:00
John Colvin
888a6bc536
refactor: Move ValueWrapper into lib_system
...
So other projects can use it
2024-09-18 14:02:39 +00:00
John Colvin
0514d8f434
Include bts_assert.h in bts_fatal.h
...
We shouldn't have to include bts_assert.h when we're already including bts_fatal.h
2024-09-18 14:02:39 +00:00
John Colvin
cf0adfd910
refactor: Split MarketDataGateway up into providers/sources
...
MarketDataGateway still exists, but is greatly simplified. It creates
several `IMarketDataProvider`s, each of which generates a list of
`IMarketDataSource`s. The market data sources provide market data to an
`IMarketDataListener`.
* EmumbaMarketDataProvider
* CCApiMarketDataProvider
* PyMarketDataProvider
* OnixsMarketDataProvider
* ReplayMarketDataProvider
As a side effect, individual py market data sources are now explicitly
limited to a single venue (it probably should have been this way all
along, since the shared memory writers do not expect updates to involve
multiple venues).
2024-09-18 14:02:39 +00:00
John Colvin
bfc87bfdf0
fix build: Remove leftover cmake setup
...
From before recent build refactoring.
2024-09-18 14:02:39 +00:00
John Colvin
d9c8c61e47
fix build: Remove old install target
...
Leftover from before recent build refactoring.
2024-09-18 14:02:39 +00:00
John Colvin
3398f44b33
fix: Include GNUInstallDirs in InstallBasicConfig
...
We reference variables defined therein (otherwise the burden of
inclusion falls to the caller).
2024-09-18 14:02:39 +00:00
John Colvin
f4cef5aadb
cleanup: Remove superfluous code
2024-09-18 14:02:39 +00:00
John Colvin
e12769df8e
improvement: Set SHARED_MEMORY_PREFIX to an environment variable
...
So we can effectively define it at runtime. We don't want to have to
produce different builds just to change the shared mem prefix.
2024-09-18 14:02:39 +00:00
John Colvin
6e5ddb734f
fix: Always prepend proc name to shared mem prefix
...
Our shared memory model isn't really designed to be shared across processes.
Maybe some day it will.
2024-09-18 14:02:39 +00:00
John Colvin
b4345cfa24
cleanup: Remove redundant macro def
2024-09-18 14:02:39 +00:00
John Colvin
54566ade60
Skip md recording thread loop if no recorders configured to run
2024-09-18 14:02:39 +00:00
John Colvin
06a80040ff
Handle signal interrupts explicitly in sparkd
...
Otherwise the python interpretter, which is instantiated when we load
python md plugins, prevents the application from exiting.
2024-09-18 14:02:39 +00:00
John Colvin
2e9b4c78f3
feat: Add support for python md plugins
2024-09-18 14:02:39 +00:00
John Colvin
2b62668df8
fix build: Ensure py scripts use unix line endings
...
I'm not sure why, but my sparkd build (linux) suddenly began failing to
generate cpp headers for protos. The error message indicated it was due
to an unexpected carriage return (\r) in plugin.py:
/usr/bin/env: ‘python\r’: No such file or directory
2024-09-18 14:02:39 +00:00
John Colvin
17ca432f87
refactor: Add lib_system proj for common utils
...
Migrates the following:
* Delegate.h
* bts_array_size.h
* string_utils.h
Note: File names in the new lib are snake_case (this seems to be the
standard naming convention for c++).
2024-09-18 14:02:39 +00:00
John Colvin
2c8833bdfe
vscode: Fix sparkd path in launch.json
2024-09-18 14:02:39 +00:00
John Colvin
e0ab5713b6
build: Clean up libspark CMakeLists
2024-09-18 14:02:39 +00:00
John Colvin
c31b52e1df
cleanup: Trivial whitespace cleanup in sparkd CMakeLists
2024-09-18 14:02:39 +00:00
John Colvin
2e7478629f
build: Add cmake fns to symlink and install local libs
...
The code needed to do this (inline) is ugly and verbose
2024-09-18 14:02:39 +00:00
John Colvin
3afc447538
cleanup: Use conventional UPPER_CASE var names in sparkd CMakeLists
2024-09-18 14:02:39 +00:00
John Colvin
56887327e1
cleanup: Trivial whitespace cleanup in Protobuf.cmake
2024-09-18 14:02:39 +00:00
John Colvin
6c89cd6717
build: Remove explicit targets from sparkd build preset
...
So it builds the default targets (all). They were only listed explicitly
in the first place so we could build specific targets in vs code using
the dropdown
2024-09-18 14:02:39 +00:00
John Colvin
5243490d5f
build: Set up necessary paths, symlinks for sparkd in sparkd cmake proj
...
Rather than performing this step in the root CMakeLists, as we previously did
in the "server_layout" target. This effectively replaces the "server_layout" target.
2024-09-18 14:02:39 +00:00
John Colvin
0d04eea483
build: Clean up data_files cmake proj (support --target clean)
2024-09-18 14:02:39 +00:00
John Colvin
3abfac1a20
fix build: Generate proto hdrs in "include" dir (child of proj's bin dir)
...
Reorganizing the sparkd proj with stuttering dirs broke the build because
the generated protos were being dumped into a dir with the same name
as the "sparkd" executable.
2024-09-18 14:02:38 +00:00
John Colvin
574694e06e
fix build: Update sparkd & risk webapp after moving libspark
2024-09-18 14:02:38 +00:00
John Colvin
c30bba7d5c
refactor: Parse input args in Protobuf_Generate_cpp
...
So we can be more precise when generating protobufs. For example, now we
can specify different include dirs when generating code for different
group of proto messages - an obvious improvement over the previous
system, which relied on a hardcoded superset of include dirs that would
support every proto message in our code base.
2024-09-18 14:02:38 +00:00
John Colvin
48695d3f7f
refactor: Orgnaize libspark proj w/ stuttering include
2024-09-18 14:02:38 +00:00
John Colvin
3ef40387f3
build: Add install targets for libspark
2024-09-18 14:02:38 +00:00