John Colvin
ee4308cb73
build: Link boost_filesystem in lib_system
2024-11-26 04:33:05 +00:00
John Colvin
5af3b094fa
refactor: Move os.h/cpp and deps to lib_system
...
This is a prerequisite for the next objective: move logging into its own lib.
As logging is a core dependency for so much of our system, this will enable
us to move more complex services (like md providers) into smaller libs.
2024-11-26 04:33:05 +00:00
John Colvin
f18d00fd80
cleanup: Remove unused code
2024-11-25 21:37:29 +00:00
John Colvin
acb2bb7c1b
cleanup: Remove more unnecessary includes
2024-11-25 21:37:29 +00:00
John Colvin
56ca93c9d9
refactor: Move SecurityMarketDataStatistics to lib_domain
2024-11-25 21:37:29 +00:00
John Colvin
2c711a1224
cleanup: Remove unnecessary code
2024-11-25 21:37:29 +00:00
John Colvin
12bffe1cd4
cleanup: Remove empty header FTXSecurity.h
2024-11-25 21:37:29 +00:00
John Colvin
b6d7111f2d
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-11-25 21:37:29 +00:00
John Colvin
4113b02fb4
refactor: Move RFQ to lib_domain
2024-11-25 21:18:43 +00:00
John Colvin
c050f764a7
refactor: Move AggressorSide proto to lib_domain
...
Get rid of non-proto AggressorSide enum while we're at it (consolidate to 1 type)
2024-11-25 21:18:43 +00:00
John Colvin
065414cb2c
cleanup: Remove more unused code
2024-11-25 21:18:43 +00:00
John Colvin
c320fadffe
refactor: Move a few Order types to lib_domain
2024-11-25 21:18:43 +00:00
John Colvin
6899d4ea28
refactor: Move TimeInForce to lib_domain
2024-11-25 21:18:43 +00:00
John Colvin
4ce6c7930a
cleanup: Remove unused code
2024-11-25 21:18:43 +00:00
John Colvin
9964d36689
refactor: Move TradeRecord into lib_domain
2024-11-25 21:18:43 +00:00
John Colvin
d4da7a4e8f
refactor: Move TradingStatus enum to lib_domain
2024-11-25 21:18:43 +00:00
John Colvin
0c7ed9c384
build: Update webpack-cli in admin webapp
2024-11-25 20:58:11 +00:00
John Colvin
e402b8ad83
build: Configure admin webapp build entirely in CMakeLists
...
Get rid of build_admin_web_app.py
2024-11-25 20:58:11 +00:00
John Colvin
b523ab22f0
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-11-25 20:58:11 +00:00
John Colvin
2aa6ebac49
refactor: Move collections into lib_system
2024-11-25 19:35:03 +00:00
John Colvin
42f2727268
refactor: Move a handful of types/utils to lib_system
2024-11-25 19:35:03 +00:00
John Colvin
d3d79b5f2a
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-11-25 19:32:56 +00:00
John Colvin
44189a8371
cleanup: Remove unused includes
...
Mostly collection macro headers
2024-11-25 19:32:56 +00:00
John Colvin
a5bbb3b08e
cleanup (build): Move protobuf service generation cmake into lib_spark
...
Because lib_spark owns all the services
2024-11-25 19:32:56 +00:00
John Colvin
bc96653e77
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-11-25 19:32:56 +00:00
John Colvin
5657fc81e3
refactor: Move ValueWrapper into lib_system
...
So other projects can use it
2024-11-25 19:32:56 +00:00
John Colvin
4751372f9a
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-11-25 19:21:49 +00:00
John Colvin
0aaa6e18fd
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-11-25 19:21:48 +00:00
John Colvin
d68fe93422
cleanup: Remove superfluous code
2024-11-25 16:49:11 +00:00
John Colvin
9e294e7573
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-11-25 16:49:11 +00:00
John Colvin
37ef7e6369
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-11-25 16:49:11 +00:00
John Colvin
2d27abe4c3
cleanup: Remove redundant macro def
2024-11-25 16:49:11 +00:00
John Colvin
2bb3a2b6b5
Skip md recording thread loop if no recorders configured to run
2024-11-25 16:49:11 +00:00
John Colvin
1443007f93
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-11-25 16:49:11 +00:00
John Colvin
81b94a3857
feat: Add support for python md plugins
2024-11-25 16:49:11 +00:00
John Colvin
2ee020d505
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-11-25 16:49:11 +00:00
John Colvin
6b008ffd08
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-11-25 16:49:11 +00:00
John Colvin
c76adbe257
cleanup: Trivial whitespace cleanup in sparkd CMakeLists
2024-11-25 16:49:11 +00:00
John Colvin
09e3d00025
build: Add cmake fns to symlink and install local libs
...
The code needed to do this (inline) is ugly and verbose
2024-11-25 16:49:11 +00:00
John Colvin
063ce5be73
cleanup: Use conventional UPPER_CASE var names in sparkd CMakeLists
2024-11-25 16:49:11 +00:00
John Colvin
eff9bb399f
cleanup: Trivial whitespace cleanup in Protobuf.cmake
2024-11-25 16:49:11 +00:00
John Colvin
59afa2e2e1
build: Clean up data_files cmake proj (support --target clean)
2024-11-25 16:49:11 +00:00
John Colvin
38f6c71551
refactor: Organize libspark proj w/ stuttering include
...
This new structure provides several benefits:
* Allows us to install multiple CMake projects in the same destination
dir (without include path conflicts).
- This makes shipping the trading algo sdk a trivial excercise. Simply
copy the lib and include dirs from the install dest. That's it!
* Puts us in a position to break up the monolithic libspark into smaller
modules, which are easier to manage.
2024-11-25 16:49:10 +00:00
John Colvin
b303dfb80c
vscode: Add debug cfg to skip sparkd build
2024-11-25 15:26:59 +00:00
John Colvin
de44f120af
fix build: Add ShmSegmentName.cpp to windows client sources
2024-11-25 15:26:59 +00:00
John Colvin
eb2c620ad2
Make a few timestamp fns const
...
They should have been const in the first place
2024-11-25 15:26:59 +00:00
John Colvin
276414f38f
Add config profiles to libspark
...
This is part of a larger effort to unify the libspark build, and eliminate
compile time differences between the builds used by our various services
2024-11-25 15:26:59 +00:00
John Colvin
0248b73bde
Add api server to docker compose
2024-11-25 15:26:59 +00:00
John Colvin
5722272435
Rename pingtest "sparkd-ping-test", make it depend on sparkd
...
Add it to a "ping-test" profile, as we may add similar tests for other services
2024-11-25 15:26:59 +00:00
John Colvin
d95ffbcedc
cleanup: Remove unnecessary env vars from webapp docker compose
2024-11-25 15:26:59 +00:00