Commit Graph
13612 Commits
Author SHA1 Message Date
John Colvin 87722765db cleanup: Remove unused code 2024-10-12 19:53:27 +00:00
John Colvin b6961f558a refactor: Move TradeRecord into lib_domain 2024-10-12 19:53:27 +00:00
John Colvin 351fca18e1 refactor: Move TradingStatus enum to lib_domain 2024-10-12 19:53:27 +00:00
John Colvin 13a5f78ab1 build: Update webpack-cli in admin webapp 2024-10-12 19:53:27 +00:00
John Colvin 8735187963 build: Configure admin webapp build entirely in CMakeLists
Get rid of build_admin_web_app.py
2024-10-12 19:53:27 +00:00
John Colvin edda8ae20c 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-10-12 19:53:26 +00:00
John Colvin b48bfbae79 refactor: Move collections into lib_system 2024-10-12 19:30:05 +00:00
John Colvin 465b293e54 refactor: Move a handful of types/utils to lib_system 2024-10-12 19:30:04 +00:00
John Colvin 7b37c67568 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-10-12 19:30:04 +00:00
John Colvin a57e1d5cf3 cleanup: Remove unused includes
Mostly collection macro headers
2024-10-12 19:30:04 +00:00
John Colvin 97b99f87d1 cleanup (build): Move protobuf service generation cmake into lib_spark
Because lib_spark owns all the services
2024-10-12 19:30:04 +00:00
John Colvin d071021305 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-10-12 19:30:04 +00:00
John Colvin f2553695ea refactor: Move ValueWrapper into lib_system
So other projects can use it
2024-10-12 19:30:04 +00:00
John Colvin a2fab4afaf 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-10-12 19:30:04 +00:00
John Colvin 32a8b82cd4 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-10-12 19:30:03 +00:00
John Colvin eea830e9f8 cleanup: Remove superfluous code 2024-10-12 18:38:37 +00:00
John Colvin c5ca6ad712 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-10-12 18:38:37 +00:00
John Colvin fee7b7bc47 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-10-12 18:38:37 +00:00
John Colvin c06c768f76 cleanup: Remove redundant macro def 2024-10-12 18:38:37 +00:00
John Colvin 71710ae88c Skip md recording thread loop if no recorders configured to run 2024-10-12 18:38:37 +00:00
John Colvin 4671c12b6f 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-10-12 18:38:37 +00:00
John Colvin a5489e8fc7 feat: Add support for python md plugins 2024-10-12 18:38:36 +00:00
John Colvin 84432dd67a 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-10-12 18:37:16 +00:00
John Colvin b58be00de0 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-10-12 18:37:16 +00:00
John Colvin 427974f9cb cleanup: Trivial whitespace cleanup in sparkd CMakeLists 2024-10-12 18:37:16 +00:00
John Colvin 6ac36da920 build: Add cmake fns to symlink and install local libs
The code needed to do this (inline) is ugly and verbose
2024-10-12 18:37:16 +00:00
John Colvin fe0d1d1af1 cleanup: Use conventional UPPER_CASE var names in sparkd CMakeLists 2024-10-12 18:37:16 +00:00
John Colvin 98ecc530a0 cleanup: Trivial whitespace cleanup in Protobuf.cmake 2024-10-12 18:37:16 +00:00
John Colvin 1b71c62b0e 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-10-12 18:37:16 +00:00
John Colvin 5753e22968 build: Clean up data_files cmake proj (support --target clean) 2024-10-12 18:37:16 +00:00
John Colvin 5356b0694b 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-10-12 18:37:13 +00:00
John Colvin 8e59e43c39 vscode: Add debug cfg to skip sparkd build 2024-09-25 06:11:16 +00:00
John Colvin e3e6a6e794 fix build: Add ShmSegmentName.cpp to windows client sources 2024-09-25 06:11:16 +00:00
John Colvin 3eecb0e32b Make a few timestamp fns const
They should have been const in the first place
2024-09-25 06:11:16 +00:00
John Colvin b03790f9da 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-09-25 06:11:13 +00:00
John Colvin 2bde71f09b Add api server to docker compose 2024-09-22 18:47:05 +00:00
John Colvin af9c28a512 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-09-22 18:47:05 +00:00
John Colvin d6c80ca972 cleanup: Remove unnecessary env vars from webapp docker compose 2024-09-22 18:47:05 +00:00
John Colvin bdc439df62 Change api server ports so they don't conflict w/ ds webapp 2024-09-22 18:47:05 +00:00
John Colvin c99345fee0 vscode: Fix sparkd debug config 2024-09-22 18:47:05 +00:00
John Colvin b8b2318f2e build: Resolve app data dir and shared mem prefix at runtime
We really can't define them at compile time anymore as we build multiple
exes that depend on libspark in the same dir (e.g., spark api server,
pubsub, ds-publisher, webapp, etc.). That means one libspark.so (or dll)
must serve all exes. We should compile a consistent libspark to mitigate
the risk of running an exe with the wrong version (of libspark). For
example, running pubsub with a libspark configured for spark api server,
leftover from an earlier build.
2024-09-22 18:47:04 +00:00
John Colvin 1f85b124fb Don't log "initializing spark config" if it has already been initialized 2024-09-22 18:46:10 +00:00
John Colvin 2b12479c48 vscode: Add debug cfg for spark api server 2024-09-22 18:46:10 +00:00
John Colvin d9b2db778f Use dependency injection in spark api server 2024-09-22 18:46:10 +00:00
John Colvin 2acd911e39 Add SparkLoggerAdapter for Msft ILogger 2024-09-22 18:46:10 +00:00
John Colvin 898e5b5822 Display exception stack trace w/ 1 call per line in ds webapp 2024-09-22 18:46:10 +00:00
John Colvin a3eb3ea310 Remove unused ErrorView from ds webapp 2024-09-22 18:46:10 +00:00
John Colvin 8d8da22003 Propagate ViewStream errors to webapp frontend 2024-09-22 18:46:10 +00:00
John Colvin 30636606a0 Add ErrorChanged event to propagate DataStream exceptions 2024-09-22 18:46:10 +00:00
John Colvin a1caaf9c07 Set columns to empty array rather than null in ds webapp
If no data has been received. Since the 'columns' property was marked
'required', this eliminates a warning that was being logged to console.
2024-09-22 18:46:10 +00:00