Commit Graph
12095 Commits
Author SHA1 Message Date
John Colvin e69c4782b5 refactor: Move TimeInForce to lib_domain 2024-10-30 19:31:41 +00:00
John Colvin 7ab045b120 cleanup: Remove unused code 2024-10-30 19:31:41 +00:00
John Colvin 9bd4bc421d refactor: Move TradeRecord into lib_domain 2024-10-30 19:31:41 +00:00
John Colvin 8b90debdd0 refactor: Move TradingStatus enum to lib_domain 2024-10-30 19:31:41 +00:00
John Colvin dc2e8b114a build: Update webpack-cli in admin webapp 2024-10-30 19:31:41 +00:00
John Colvin e064ab0433 build: Configure admin webapp build entirely in CMakeLists
Get rid of build_admin_web_app.py
2024-10-30 19:31:41 +00:00
John Colvin 42a9edbee3 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-30 19:31:41 +00:00
John Colvin 92ea362d1e refactor: Move collections into lib_system 2024-10-30 19:31:41 +00:00
John Colvin 750228355a refactor: Move a handful of types/utils to lib_system 2024-10-30 19:31:41 +00:00
John Colvin b286f81067 cleanup: Remove unused includes
Mostly collection macro headers
2024-10-30 19:31:41 +00:00
John Colvin 36795bd851 cleanup (build): Move protobuf service generation cmake into lib_spark
Because lib_spark owns all the services
2024-10-30 19:31:41 +00:00
John Colvin 857702fae7 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-30 19:31:41 +00:00
John Colvin 2702d0d32e refactor: Move ValueWrapper into lib_system
So other projects can use it
2024-10-30 19:31:40 +00:00
John Colvin 10e78b5e20 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-30 19:31:40 +00:00
John Colvin 74027fc9cc 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-30 19:31:40 +00:00
John Colvin af5af01b39 cleanup: Remove superfluous code 2024-10-30 19:31:40 +00:00
John Colvin 40bf2d8b43 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-30 19:31:40 +00:00
John Colvin 98fb021f3f cleanup: Remove redundant macro def 2024-10-30 19:31:40 +00:00
John Colvin b34a3421bb Skip md recording thread loop if no recorders configured to run 2024-10-30 19:31:40 +00:00
John Colvin 9dc61daefa 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-30 19:31:40 +00:00
John Colvin 32fe2533c7 feat: Add support for python md plugins 2024-10-30 19:31:40 +00:00
John Colvin b020939c99 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-30 19:31:40 +00:00
John Colvin c660c52c3d cleanup: Trivial whitespace cleanup in sparkd CMakeLists 2024-10-30 19:31:40 +00:00
John Colvin 40ae9ff7a0 cleanup: Use conventional UPPER_CASE var names in sparkd CMakeLists 2024-10-30 19:31:40 +00:00
John Colvin b983f80bfa build: Clean up data_files cmake proj (support --target clean) 2024-10-30 19:31:40 +00:00
John Colvin c58a2f90e0 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-30 19:31:40 +00:00
John Colvin 7146aca538 fix build: Add ShmSegmentName.cpp to windows client sources 2024-10-30 19:31:40 +00:00
John Colvin e0f01b6810 Make a few timestamp fns const
They should have been const in the first place
2024-10-30 19:31:40 +00:00
John Colvin 92e3094259 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-10-30 19:31:40 +00:00
John Colvin a9a5b563a0 Add api server to docker compose 2024-10-30 19:31:40 +00:00
John Colvin cb5c7d2012 Change api server ports so they don't conflict w/ ds webapp 2024-10-30 19:31:40 +00:00
John Colvin 3af14cecd7 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-10-30 19:31:40 +00:00
John Colvin 5df30e8857 Don't log "initializing spark config" if it has already been initialized 2024-10-30 19:31:40 +00:00
John Colvin b3e28d5f7f Use dependency injection in spark api server 2024-10-30 19:31:40 +00:00
John Colvin 5c11b83df5 Add SparkLoggerAdapter for Msft ILogger 2024-10-30 19:31:40 +00:00
John Colvin 5c5a0ca09a Display exception stack trace w/ 1 call per line in ds webapp 2024-10-30 19:31:40 +00:00
John Colvin 114873eb35 Remove unused ErrorView from ds webapp 2024-10-30 19:31:40 +00:00
John Colvin a9799b2a00 Propagate ViewStream errors to webapp frontend 2024-10-30 19:31:40 +00:00
John Colvin d5aeaa5e0f Add ErrorChanged event to propagate DataStream exceptions 2024-10-30 19:31:40 +00:00
John Colvin 8a8c491fb1 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-10-30 19:31:39 +00:00
John Colvin 450a6c62b6 Improve alignment/spacing in ds webapp 2024-10-30 19:31:39 +00:00
John Colvin a3887e6246 Configure datastream deployment with docker-compose
To deploy to aws, connect to our aws vpn then run:
tools/deploy-docker-compose.sh

The deploy script does the following:
* builds sparkd
* builds datastream apps (pubsub, md-publisher, and webapp)
* uploads the build to aws
* bounces all services (sparkd, pubsub, md-publisher, and webapp)

Note: the name 'md-publisher' refers to DataStreamPublisher w/ MarketData
configuration
2024-10-30 19:31:39 +00:00
John Colvin 982ddd24d4 Remove "BTS Cloud Streams" title from webapp
Space is precious when viewing on phone (tbh, it didn't look that good
anyways).
2024-10-30 19:31:39 +00:00
John Colvin 20e959fea3 fix: Ensure md-publisher waits for pubsub and sparkd
Bugs (fixed):
  * md-publisher silently fails if it tries to connect before those services are "ready".

The Docker compose "depends_on" property ensures sparkd and pubsub
containers are up, but doesn't prevent startup race bugs (e.g., if
md-publisher and pubsub start around the same time, and md-publisher
tries to connect before pubsub has started accepting connections). To
address these race conditions, we use a nifty tool called "dockerize"

References:
  * https://github.com/jwilder/dockerize
2024-10-30 19:31:39 +00:00
John Colvin a108823ea5 Replace ErrorView component w/ robust QueryStatusView 2024-10-30 19:31:39 +00:00
John Colvin 52c74cd800 Fix typos in query button theme 2024-10-30 19:31:39 +00:00
John Colvin a473cbc703 fix: Don't assert on exception in BooleanExpression.evaluate
Bugs (fixed):
  * DataStream WebApp Server sometimes crashes when the user enters a
    bad query.
2024-10-30 19:31:39 +00:00
John Colvin 63c648a659 Change VITE_DATASTREAM_WEBSOCKET_URL to localhost 2024-10-30 19:31:39 +00:00
John Colvin 3ffe02254e Assert that local ip address is successfully obtained 2024-10-30 19:31:39 +00:00
John Colvin f5de2b5355 improvement: Resolve hostnames when comparing ip addrs
So we can to configure pubsub routes by hostname or ipv4 (ipv6 hasn't been
tested yet...so we should assume it doesn't work).
2024-10-30 19:31:39 +00:00