Compare commits
57
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
781fa97b55 | ||
|
|
fd50050064 | ||
|
|
6ac43881ae | ||
|
|
4af1419748 | ||
|
|
7cfcdc3770 | ||
|
|
d03a705077 | ||
|
|
58eccad70d | ||
|
|
5f8ec04ff1 | ||
|
|
05e2107655 | ||
|
|
d41f613e32 | ||
|
|
bcbb598423 | ||
|
|
e88c44f9db | ||
|
|
93625957d1 | ||
|
|
8eccb869e1 | ||
|
|
40f4333fc7 | ||
|
|
319d5c2384 | ||
|
|
4a74713369 | ||
|
|
082beef1da | ||
|
|
f92d789e90 | ||
|
|
cd3e845dd9 | ||
|
|
a5b704eef1 | ||
|
|
afee63e061 | ||
|
|
fc9356d1a0 | ||
|
|
a85f22c6a8 | ||
|
|
2024eba4d0 | ||
|
|
1a49a828ad | ||
|
|
c0448c7c8d | ||
|
|
a6c6e7faf3 | ||
|
|
56445d2d66 | ||
|
|
ccf1bd51c2 | ||
|
|
fd21269df7 | ||
|
|
fe85c3e648 | ||
|
|
e1d33ecadf | ||
|
|
83df96c70f | ||
|
|
f718f5b15c | ||
|
|
5d752f3b73 | ||
|
|
d308dbf15a | ||
|
|
21c43b9240 | ||
|
|
e1553f1b04 | ||
|
|
a26918efe9 | ||
|
|
f729fc4c59 | ||
|
|
fa67adbe36 | ||
|
|
72f9ec582e | ||
|
|
8fea31bdf6 | ||
|
|
ca96e41391 | ||
|
|
d4e5c95fde | ||
|
|
f6e0ec3617 | ||
|
|
3fa5284838 | ||
|
|
4dcaa565f6 | ||
|
|
75ecfa89d6 | ||
|
|
1c930439a4 | ||
|
|
25084b8cd9 | ||
|
|
5b8a8a8882 | ||
|
|
21052090a2 | ||
|
|
9bd32b8225 | ||
|
|
e8e234f420 | ||
|
|
be23237a45 |
No files matched your search
@@ -29,6 +29,9 @@
|
|||||||
# tools/deploy.sh --help
|
# tools/deploy.sh --help
|
||||||
#
|
#
|
||||||
|
|
||||||
|
### Host/Runtime ###
|
||||||
|
TZ=Etc/UTC
|
||||||
|
|
||||||
### Sparkd ###
|
### Sparkd ###
|
||||||
# The internal image for sparkd to use. For more info, view:
|
# The internal image for sparkd to use. For more info, view:
|
||||||
# src/server/sparkd/Dockerfile
|
# src/server/sparkd/Dockerfile
|
||||||
@@ -38,6 +41,9 @@ SPARKD__CONFIG_DIR=src/app_sparkd/configurations/dev
|
|||||||
# Mount a specific volume or dir to "~/sparkdata/data" inside the docker.
|
# Mount a specific volume or dir to "~/sparkdata/data" inside the docker.
|
||||||
# Defaults to a volume named "sparkd_<config_port>" (e.g., sparkd_8000).
|
# Defaults to a volume named "sparkd_<config_port>" (e.g., sparkd_8000).
|
||||||
# SPARKD__DATA_DIR=/home/bts/sparkdata/data
|
# SPARKD__DATA_DIR=/home/bts/sparkdata/data
|
||||||
|
# Mount volume or dir to "/md_recording" inside the docker. Defaults to volume
|
||||||
|
# "sparkd_md_recording_<config_port>" (e.g., sparkd_md_recording_8000).
|
||||||
|
# SPARKD__MD_RECORDING_DIR=/home/bts/md_recording
|
||||||
SPARKD__SOURCE_DIR=install/sparkd-release-gcc
|
SPARKD__SOURCE_DIR=install/sparkd-release-gcc
|
||||||
SPARKD__RUNTIME_CONF_DIR=/home/ubuntu/8000/sparkdata/conf/
|
SPARKD__RUNTIME_CONF_DIR=/home/ubuntu/8000/sparkdata/conf/
|
||||||
SPARKD__CONFIG_PORT=8000
|
SPARKD__CONFIG_PORT=8000
|
||||||
@@ -45,6 +51,8 @@ SPARKD__QUICKBUS_PORT=8001
|
|||||||
SPARKD__SIM_FIX_PORT=8002
|
SPARKD__SIM_FIX_PORT=8002
|
||||||
SPARKD__SHM_SIZE=4gb
|
SPARKD__SHM_SIZE=4gb
|
||||||
SPARKD__PYTHON_REQUIREMENTS=requirements.txt
|
SPARKD__PYTHON_REQUIREMENTS=requirements.txt
|
||||||
|
SPARKD__SPARKD_ENTRYPOINT=src/app_sparkd/sparkd-entrypoint.sh
|
||||||
|
SPARKD__MAIN_ENTRYPOINT=./sparkd-entrypoint.sh
|
||||||
|
|
||||||
### PubSubServer ###
|
### PubSubServer ###
|
||||||
PUBSUB__CONFIG_DIR=src/DataStreamSuite/PubSubServer/Configurations/Development
|
PUBSUB__CONFIG_DIR=src/DataStreamSuite/PubSubServer/Configurations/Development
|
||||||
|
|||||||
Vendored
+9
-9
@@ -183,11 +183,10 @@
|
|||||||
"windows": {
|
"windows": {
|
||||||
"program": "PubSubServer.exe",
|
"program": "PubSubServer.exe",
|
||||||
},
|
},
|
||||||
"args": [
|
|
||||||
"--config",
|
|
||||||
"${workspaceFolder}/src/DataStreamSuite/PubSubServer/Configurations/${input:pubSubServerConfig}.json"
|
|
||||||
],
|
|
||||||
"cwd": "build/Debug/bin/net8.0",
|
"cwd": "build/Debug/bin/net8.0",
|
||||||
|
"env": {
|
||||||
|
"DOTNET_ENVIRONMENT": "${input:pubSubServerEnvironment}",
|
||||||
|
},
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"console": "integratedTerminal"
|
"console": "integratedTerminal"
|
||||||
},
|
},
|
||||||
@@ -449,14 +448,15 @@
|
|||||||
"default": "Local",
|
"default": "Local",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "pubSubServerConfig",
|
"id": "pubSubServerEnvironment",
|
||||||
"type": "pickString",
|
"type": "pickString",
|
||||||
"description": "PubSub Configuration",
|
"description": "PubSubServer Configuration",
|
||||||
"options": [
|
"options": [
|
||||||
"PubSubServer",
|
"Development",
|
||||||
"SimpleEchoClient",
|
"EchoServer",
|
||||||
|
"Local",
|
||||||
],
|
],
|
||||||
"default": "PubSubServer",
|
"default": "Development",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "sdkDemoEnvironment",
|
"id": "sdkDemoEnvironment",
|
||||||
|
|||||||
@@ -17,14 +17,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Spark.Sdk", "src\cs\Bts
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Spark.Sdk.Demo", "src\cs\Bts.Spark.Sdk.Demo\Bts.Spark.Sdk.Demo.csproj", "{FCFDBDBE-74B0-41C4-9011-C651B21056D4}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Spark.Sdk.Demo", "src\cs\Bts.Spark.Sdk.Demo\Bts.Spark.Sdk.Demo.csproj", "{FCFDBDBE-74B0-41C4-9011-C651B21056D4}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Collections", "src\cs\Bts.Collections\Bts.Collections.csproj", "{3BF4DF96-5AFF-4674-866A-71A8090627FF}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Core", "src\cs\Bts.Core\Bts.Core.csproj", "{CD0A3EEF-303A-44EE-85F2-76F4CE632A3B}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Disposables", "src\cs\Bts.Disposables\Bts.Disposables.csproj", "{62067659-AA2E-4CB5-B7CE-0B38EAA92080}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Numerics", "src\cs\Bts.Numerics\Bts.Numerics.csproj", "{2FE1E5D0-168A-4D83-9B18-0D48250B4BFE}"
|
|
||||||
EndProject
|
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -95,54 +87,6 @@ Global
|
|||||||
{FCFDBDBE-74B0-41C4-9011-C651B21056D4}.Release|x64.Build.0 = Release|Any CPU
|
{FCFDBDBE-74B0-41C4-9011-C651B21056D4}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{FCFDBDBE-74B0-41C4-9011-C651B21056D4}.Release|x86.ActiveCfg = Release|Any CPU
|
{FCFDBDBE-74B0-41C4-9011-C651B21056D4}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{FCFDBDBE-74B0-41C4-9011-C651B21056D4}.Release|x86.Build.0 = Release|Any CPU
|
{FCFDBDBE-74B0-41C4-9011-C651B21056D4}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{3BF4DF96-5AFF-4674-866A-71A8090627FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{3BF4DF96-5AFF-4674-866A-71A8090627FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{3BF4DF96-5AFF-4674-866A-71A8090627FF}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{3BF4DF96-5AFF-4674-866A-71A8090627FF}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{3BF4DF96-5AFF-4674-866A-71A8090627FF}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{3BF4DF96-5AFF-4674-866A-71A8090627FF}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{3BF4DF96-5AFF-4674-866A-71A8090627FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{3BF4DF96-5AFF-4674-866A-71A8090627FF}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{3BF4DF96-5AFF-4674-866A-71A8090627FF}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{3BF4DF96-5AFF-4674-866A-71A8090627FF}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{3BF4DF96-5AFF-4674-866A-71A8090627FF}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{3BF4DF96-5AFF-4674-866A-71A8090627FF}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{CD0A3EEF-303A-44EE-85F2-76F4CE632A3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{CD0A3EEF-303A-44EE-85F2-76F4CE632A3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{CD0A3EEF-303A-44EE-85F2-76F4CE632A3B}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{CD0A3EEF-303A-44EE-85F2-76F4CE632A3B}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{CD0A3EEF-303A-44EE-85F2-76F4CE632A3B}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{CD0A3EEF-303A-44EE-85F2-76F4CE632A3B}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{CD0A3EEF-303A-44EE-85F2-76F4CE632A3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{CD0A3EEF-303A-44EE-85F2-76F4CE632A3B}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{CD0A3EEF-303A-44EE-85F2-76F4CE632A3B}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{CD0A3EEF-303A-44EE-85F2-76F4CE632A3B}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{CD0A3EEF-303A-44EE-85F2-76F4CE632A3B}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{CD0A3EEF-303A-44EE-85F2-76F4CE632A3B}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{62067659-AA2E-4CB5-B7CE-0B38EAA92080}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{62067659-AA2E-4CB5-B7CE-0B38EAA92080}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{62067659-AA2E-4CB5-B7CE-0B38EAA92080}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{62067659-AA2E-4CB5-B7CE-0B38EAA92080}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{62067659-AA2E-4CB5-B7CE-0B38EAA92080}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{62067659-AA2E-4CB5-B7CE-0B38EAA92080}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{62067659-AA2E-4CB5-B7CE-0B38EAA92080}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{62067659-AA2E-4CB5-B7CE-0B38EAA92080}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{62067659-AA2E-4CB5-B7CE-0B38EAA92080}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{62067659-AA2E-4CB5-B7CE-0B38EAA92080}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{62067659-AA2E-4CB5-B7CE-0B38EAA92080}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{62067659-AA2E-4CB5-B7CE-0B38EAA92080}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{2FE1E5D0-168A-4D83-9B18-0D48250B4BFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{2FE1E5D0-168A-4D83-9B18-0D48250B4BFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{2FE1E5D0-168A-4D83-9B18-0D48250B4BFE}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{2FE1E5D0-168A-4D83-9B18-0D48250B4BFE}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{2FE1E5D0-168A-4D83-9B18-0D48250B4BFE}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{2FE1E5D0-168A-4D83-9B18-0D48250B4BFE}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{2FE1E5D0-168A-4D83-9B18-0D48250B4BFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{2FE1E5D0-168A-4D83-9B18-0D48250B4BFE}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{2FE1E5D0-168A-4D83-9B18-0D48250B4BFE}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{2FE1E5D0-168A-4D83-9B18-0D48250B4BFE}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{2FE1E5D0-168A-4D83-9B18-0D48250B4BFE}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{2FE1E5D0-168A-4D83-9B18-0D48250B4BFE}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -154,9 +98,5 @@ Global
|
|||||||
{37E4E890-D025-4729-90F9-6F95862F47BC} = {C5A3B5EA-BE9F-76E5-E9B8-8A22B289B295}
|
{37E4E890-D025-4729-90F9-6F95862F47BC} = {C5A3B5EA-BE9F-76E5-E9B8-8A22B289B295}
|
||||||
{A5FF3FAF-43CB-496B-AF4B-F61EFD645579} = {C5A3B5EA-BE9F-76E5-E9B8-8A22B289B295}
|
{A5FF3FAF-43CB-496B-AF4B-F61EFD645579} = {C5A3B5EA-BE9F-76E5-E9B8-8A22B289B295}
|
||||||
{FCFDBDBE-74B0-41C4-9011-C651B21056D4} = {C5A3B5EA-BE9F-76E5-E9B8-8A22B289B295}
|
{FCFDBDBE-74B0-41C4-9011-C651B21056D4} = {C5A3B5EA-BE9F-76E5-E9B8-8A22B289B295}
|
||||||
{3BF4DF96-5AFF-4674-866A-71A8090627FF} = {C5A3B5EA-BE9F-76E5-E9B8-8A22B289B295}
|
|
||||||
{CD0A3EEF-303A-44EE-85F2-76F4CE632A3B} = {C5A3B5EA-BE9F-76E5-E9B8-8A22B289B295}
|
|
||||||
{62067659-AA2E-4CB5-B7CE-0B38EAA92080} = {C5A3B5EA-BE9F-76E5-E9B8-8A22B289B295}
|
|
||||||
{2FE1E5D0-168A-4D83-9B18-0D48250B4BFE} = {C5A3B5EA-BE9F-76E5-E9B8-8A22B289B295}
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
@@ -51,14 +51,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Net", "src\cs\Bts.Net\B
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.IO.Compression", "src\cs\Bts.IO.Compression\Bts.IO.Compression.csproj", "{BC277499-8215-4F9F-B9AB-07B6391110BF}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.IO.Compression", "src\cs\Bts.IO.Compression\Bts.IO.Compression.csproj", "{BC277499-8215-4F9F-B9AB-07B6391110BF}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Collections", "src\cs\Bts.Collections\Bts.Collections.csproj", "{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Core", "src\cs\Bts.Core\Bts.Core.csproj", "{802ECF0B-7264-4168-95D1-158E47FB65CC}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Disposables", "src\cs\Bts.Disposables\Bts.Disposables.csproj", "{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Numerics", "src\cs\Bts.Numerics\Bts.Numerics.csproj", "{0354655D-2394-42BB-B1D4-2D75B9BCABF1}"
|
|
||||||
EndProject
|
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|x64 = Debug|x64
|
Debug|x64 = Debug|x64
|
||||||
@@ -579,102 +571,6 @@ Global
|
|||||||
{BC277499-8215-4F9F-B9AB-07B6391110BF}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU
|
{BC277499-8215-4F9F-B9AB-07B6391110BF}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{BC277499-8215-4F9F-B9AB-07B6391110BF}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
{BC277499-8215-4F9F-B9AB-07B6391110BF}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
||||||
{BC277499-8215-4F9F-B9AB-07B6391110BF}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
{BC277499-8215-4F9F-B9AB-07B6391110BF}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.MinSizeRel|x86.Build.0 = Debug|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.MinSizeRel|x86.Build.0 = Debug|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.MinSizeRel|x86.Build.0 = Debug|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.MinSizeRel|x86.Build.0 = Debug|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -696,10 +592,6 @@ Global
|
|||||||
{385C4948-E080-56A6-E29E-8B0F4913175C} = {267F81EF-A8AB-49FD-9F56-D7EC3C1F7C7C}
|
{385C4948-E080-56A6-E29E-8B0F4913175C} = {267F81EF-A8AB-49FD-9F56-D7EC3C1F7C7C}
|
||||||
{43FB297B-7A4D-4835-A878-E6DF345B580C} = {385C4948-E080-56A6-E29E-8B0F4913175C}
|
{43FB297B-7A4D-4835-A878-E6DF345B580C} = {385C4948-E080-56A6-E29E-8B0F4913175C}
|
||||||
{BC277499-8215-4F9F-B9AB-07B6391110BF} = {385C4948-E080-56A6-E29E-8B0F4913175C}
|
{BC277499-8215-4F9F-B9AB-07B6391110BF} = {385C4948-E080-56A6-E29E-8B0F4913175C}
|
||||||
{C42F4CCB-9E65-4370-939A-527ACDBC4DA6} = {385C4948-E080-56A6-E29E-8B0F4913175C}
|
|
||||||
{802ECF0B-7264-4168-95D1-158E47FB65CC} = {385C4948-E080-56A6-E29E-8B0F4913175C}
|
|
||||||
{95C5F6C0-88E5-4338-9A4F-614CF6C03CC0} = {385C4948-E080-56A6-E29E-8B0F4913175C}
|
|
||||||
{0354655D-2394-42BB-B1D4-2D75B9BCABF1} = {385C4948-E080-56A6-E29E-8B0F4913175C}
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {422D1620-0166-4C26-9A81-CA8A2EB1AB58}
|
SolutionGuid = {422D1620-0166-4C26-9A81-CA8A2EB1AB58}
|
||||||
|
|||||||
+63
-37
@@ -2,6 +2,7 @@ services:
|
|||||||
sparkd:
|
sparkd:
|
||||||
volumes:
|
volumes:
|
||||||
- ${SPARKD__DATA_DIR:-sparkd_data}:/home/bts/.local/share/bts/sparkd/data
|
- ${SPARKD__DATA_DIR:-sparkd_data}:/home/bts/.local/share/bts/sparkd/data
|
||||||
|
- ${SPARKD__MD_RECORDING_DIR:-md_recording}:/md_recording
|
||||||
build:
|
build:
|
||||||
dockerfile: src/app_sparkd/Dockerfile
|
dockerfile: src/app_sparkd/Dockerfile
|
||||||
args:
|
args:
|
||||||
@@ -9,24 +10,35 @@ services:
|
|||||||
- SOURCE_DIR=${SPARKD__SOURCE_DIR}
|
- SOURCE_DIR=${SPARKD__SOURCE_DIR}
|
||||||
- CONFIG_DIR=${SPARKD__CONFIG_DIR}
|
- CONFIG_DIR=${SPARKD__CONFIG_DIR}
|
||||||
- PYTHON_REQUIREMENTS=${SPARKD__PYTHON_REQUIREMENTS}
|
- PYTHON_REQUIREMENTS=${SPARKD__PYTHON_REQUIREMENTS}
|
||||||
|
- SPARKD_ENTRYPOINT=${SPARKD__SPARKD_ENTRYPOINT}
|
||||||
shm_size: "${SPARKD__SHM_SIZE:-512mb}"
|
shm_size: "${SPARKD__SHM_SIZE:-512mb}"
|
||||||
command: >
|
env_file:
|
||||||
sh -c "
|
- .env
|
||||||
echo bts | sudo -S chown -R bts:bts /home/bts/.local/share/bts/sparkd/data
|
- ${SPARKD__CONFIG_DIR}/.env
|
||||||
if [ -e "/home/bts/.local/share/bts/sparkd/data/logging.sparkd/log" ]; then
|
ports:
|
||||||
mv "/home/bts/.local/share/bts/sparkd/data/logging.sparkd/log" "/home/bts/.local/share/bts/sparkd/data/logging.sparkd/log_$(date '+%Y%m%d-%H%M')"
|
- "${SPARKD__CONFIG_PORT}:${SPARKD__CONFIG_PORT}"
|
||||||
fi
|
- "${SPARKD__QUICKBUS_PORT}:${SPARKD__QUICKBUS_PORT}"
|
||||||
if [ -e "/home/bts/.local/share/bts/conf/.env.local" ]; then
|
- "${SPARKD__SIM_FIX_PORT}:${SPARKD__SIM_FIX_PORT}"
|
||||||
echo 'Sourcing /home/bts/.local/share/bts/conf/.env.local'
|
entrypoint: ${SPARKD__MAIN_ENTRYPOINT}
|
||||||
set -a
|
deploy:
|
||||||
. /home/bts/.local/share/bts/sparkd/conf/.env.local
|
resources:
|
||||||
set +a
|
limits:
|
||||||
fi
|
memory: "${SPARKD__MEMORY:-4gb}"
|
||||||
if [ -d /home/bts/.local/share/bts/sparkd/conf/plugins ]; then
|
|
||||||
echo 'Copying /home/bts/.local/share/bts/sparkd/conf/plugins to runtime dir (/home/bts/bin)'
|
sparkd-shell:
|
||||||
cp -r /home/bts/.local/share/bts/sparkd/conf/plugins /home/bts/bin/
|
volumes:
|
||||||
fi
|
- ${SPARKD__DATA_DIR:-sparkd_data}:/home/bts/.local/share/bts/sparkd/data
|
||||||
./sparkd run"
|
- ${SPARKD__MD_RECORDING_DIR:-md_recording}:/md_recording
|
||||||
|
build:
|
||||||
|
dockerfile: docker/images/bluetradingsystems/linux_shell/Dockerfile
|
||||||
|
args:
|
||||||
|
- IMAGE=${SPARKD__IMAGE}
|
||||||
|
- SOURCE_DIR=${SPARKD__SOURCE_DIR}
|
||||||
|
- CONFIG_DIR=${SPARKD__CONFIG_DIR}
|
||||||
|
- PYTHON_REQUIREMENTS=${SPARKD__PYTHON_REQUIREMENTS}
|
||||||
|
- SPARKD_ENTRYPOINT=${SPARKD__SPARKD_ENTRYPOINT}
|
||||||
|
shm_size: "${SPARKD__SHM_SIZE:-512mb}"
|
||||||
|
command: "do sleep 1; done"
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
- ${SPARKD__CONFIG_DIR}/.env
|
- ${SPARKD__CONFIG_DIR}/.env
|
||||||
@@ -42,6 +54,7 @@ services:
|
|||||||
sparkd-symbols:
|
sparkd-symbols:
|
||||||
volumes:
|
volumes:
|
||||||
- ${SPARKD__DATA_DIR:-sparkd_data}:/home/bts/.local/share/bts/sparkd/data
|
- ${SPARKD__DATA_DIR:-sparkd_data}:/home/bts/.local/share/bts/sparkd/data
|
||||||
|
- ${SPARKD__MD_RECORDING_DIR:-md_recording}:/md_recording
|
||||||
- ${SPARKD__RUNTIME_CONF_DIR:-sparkd_conf}:/home/bts/.local/share/bts/sparkd/conf
|
- ${SPARKD__RUNTIME_CONF_DIR:-sparkd_conf}:/home/bts/.local/share/bts/sparkd/conf
|
||||||
build:
|
build:
|
||||||
dockerfile: src/app_sparkd/Dockerfile
|
dockerfile: src/app_sparkd/Dockerfile
|
||||||
@@ -50,26 +63,8 @@ services:
|
|||||||
- SOURCE_DIR=${SPARKD__SOURCE_DIR}
|
- SOURCE_DIR=${SPARKD__SOURCE_DIR}
|
||||||
- CONFIG_DIR=${SPARKD__CONFIG_DIR}
|
- CONFIG_DIR=${SPARKD__CONFIG_DIR}
|
||||||
- PYTHON_REQUIREMENTS=${SPARKD__PYTHON_REQUIREMENTS}
|
- PYTHON_REQUIREMENTS=${SPARKD__PYTHON_REQUIREMENTS}
|
||||||
|
- SPARKD_ENTRYPOINT=${SPARKD__SPARKD_ENTRYPOINT}
|
||||||
shm_size: "${SPARKD__SHM_SIZE:-512mb}"
|
shm_size: "${SPARKD__SHM_SIZE:-512mb}"
|
||||||
command: >
|
|
||||||
sh -c "
|
|
||||||
echo bts | sudo -S chown -R bts:bts /home/bts/.local/share/bts/sparkd
|
|
||||||
if [ -e "/home/bts/.local/share/bts/sparkd/data/logging.sparkd/log" ]; then
|
|
||||||
mv "/home/bts/.local/share/bts/sparkd/data/logging.sparkd/log" "/home/bts/.local/share/bts/sparkd/data/logging.sparkd/log_$(date '+%Y%m%d-%H%M')"
|
|
||||||
fi
|
|
||||||
ls -alh /home/bts/.local/share/bts/sparkd/conf/
|
|
||||||
cat /home/bts/.local/share/bts/sparkd/conf/.env.local
|
|
||||||
if [ -e "/home/bts/.local/share/bts/sparkd/conf/.env.local" ]; then
|
|
||||||
echo 'Sourcing /home/bts/.local/share/bts/sparkd/conf/.env.local'
|
|
||||||
set -a
|
|
||||||
. /home/bts/.local/share/bts/sparkd/conf/.env.local
|
|
||||||
set +a
|
|
||||||
fi
|
|
||||||
if [ -d /home/bts/.local/share/bts/sparkd/conf/plugins ]; then
|
|
||||||
echo 'Copying /home/bts/.local/share/bts/sparkd/conf/plugins to runtime dir (/home/bts/bin)'
|
|
||||||
cp -r /home/bts/.local/share/bts/sparkd/conf/plugins /home/bts/bin/
|
|
||||||
fi
|
|
||||||
./sparkd run"
|
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
- ${SPARKD__CONFIG_DIR}/.env
|
- ${SPARKD__CONFIG_DIR}/.env
|
||||||
@@ -77,6 +72,7 @@ services:
|
|||||||
- "${SPARKD__CONFIG_PORT}:${SPARKD__CONFIG_PORT}"
|
- "${SPARKD__CONFIG_PORT}:${SPARKD__CONFIG_PORT}"
|
||||||
- "${SPARKD__QUICKBUS_PORT}:${SPARKD__QUICKBUS_PORT}"
|
- "${SPARKD__QUICKBUS_PORT}:${SPARKD__QUICKBUS_PORT}"
|
||||||
- "${SPARKD__SIM_FIX_PORT}:${SPARKD__SIM_FIX_PORT}"
|
- "${SPARKD__SIM_FIX_PORT}:${SPARKD__SIM_FIX_PORT}"
|
||||||
|
entrypoint: ${SPARKD__MAIN_ENTRYPOINT}
|
||||||
deploy:
|
deploy:
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: any
|
condition: any
|
||||||
@@ -84,7 +80,34 @@ services:
|
|||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
memory: "${SPARKD__MEMORY:-4gb}"
|
memory: "${SPARKD__MEMORY:-4gb}"
|
||||||
|
sparkd-multicast:
|
||||||
|
environment:
|
||||||
|
- TZ=America/Chicago
|
||||||
|
volumes:
|
||||||
|
- ${SPARKD__DATA_DIR:-sparkd_data}:/home/bts/.local/share/bts/sparkd/data
|
||||||
|
- ${SPARKD__MD_RECORDING_DIR:-md_recording}:/md_recording
|
||||||
|
- ${SPARKD__RUNTIME_CONF_DIR:-sparkd_conf}:/home/bts/.local/share/bts/sparkd/conf
|
||||||
|
build:
|
||||||
|
dockerfile: src/app_sparkd/Dockerfile
|
||||||
|
args:
|
||||||
|
- IMAGE=${SPARKD__IMAGE}
|
||||||
|
- SOURCE_DIR=${SPARKD__SOURCE_DIR}
|
||||||
|
- CONFIG_DIR=${SPARKD__CONFIG_DIR}
|
||||||
|
- PYTHON_REQUIREMENTS=${SPARKD__PYTHON_REQUIREMENTS}
|
||||||
|
- SPARKD_ENTRYPOINT=${SPARKD__SPARKD_ENTRYPOINT}
|
||||||
|
shm_size: "${SPARKD__SHM_SIZE:-8192mb}"
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
- ${SPARKD__CONFIG_DIR}/.env
|
||||||
|
network_mode: "host"
|
||||||
|
entrypoint: ${SPARKD__MAIN_ENTRYPOINT}
|
||||||
|
deploy:
|
||||||
|
restart_policy:
|
||||||
|
condition: any
|
||||||
|
delay: 3s
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: "${SPARKD__MEMORY:-16gb}"
|
||||||
sparkd-tail:
|
sparkd-tail:
|
||||||
image: bluetradingsystems/linux_dotnet8
|
image: bluetradingsystems/linux_dotnet8
|
||||||
volumes:
|
volumes:
|
||||||
@@ -195,3 +218,6 @@ volumes:
|
|||||||
name: "md_publisher_22019"
|
name: "md_publisher_22019"
|
||||||
historic_md:
|
historic_md:
|
||||||
name: "historic_md"
|
name: "historic_md"
|
||||||
|
md_recording:
|
||||||
|
name: "sparkd_md_recording_${SPARKD__CONFIG_PORT:-8000}"
|
||||||
|
external: true
|
||||||
@@ -8,6 +8,7 @@ RUN apt-get update && apt-get install -y ca-certificates
|
|||||||
RUN apt-get update && apt-get install -y libssh2-1-dev
|
RUN apt-get update && apt-get install -y libssh2-1-dev
|
||||||
RUN apt-get update && apt-get install -y software-properties-common
|
RUN apt-get update && apt-get install -y software-properties-common
|
||||||
RUN apt-get update && apt-get install -y sudo
|
RUN apt-get update && apt-get install -y sudo
|
||||||
|
RUN apt-get update && apt-get install -y tzdata
|
||||||
|
|
||||||
# GCC
|
# GCC
|
||||||
ARG gcc_major=13
|
ARG gcc_major=13
|
||||||
@@ -18,6 +19,11 @@ RUN add-apt-repository ppa:ubuntu-toolchain-r/test \
|
|||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y dotnet8
|
&& apt-get install -y dotnet8
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y gdb
|
||||||
|
RUN apt-get update && apt-get install -y fish
|
||||||
|
RUN apt-get update && apt-get install -y vim
|
||||||
|
RUN apt-get update && apt-get install -y less
|
||||||
|
|
||||||
RUN locale-gen en_US.UTF-8
|
RUN locale-gen en_US.UTF-8
|
||||||
|
|
||||||
ARG docker_user="bts"
|
ARG docker_user="bts"
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
fish \
|
||||||
|
less \
|
||||||
|
vim
|
||||||
|
|
||||||
|
USER bts
|
||||||
|
WORKDIR /home/bts
|
||||||
+1
-1
Submodule externals updated: c7478ef5cd...2755fd6b8f.
@@ -49,14 +49,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "spark_test", "src\client\sp
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spark.Console", "src\client\Spark.Console\Spark.Console.csproj", "{2B8243FF-60C6-4607-8AAE-7762D29B0A48}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spark.Console", "src\client\Spark.Console\Spark.Console.csproj", "{2B8243FF-60C6-4607-8AAE-7762D29B0A48}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Collections", "src\cs\Bts.Collections\Bts.Collections.csproj", "{00D21F82-61F4-467F-B125-268018A185E5}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Core", "src\cs\Bts.Core\Bts.Core.csproj", "{513A3F0D-46B5-4AC2-B700-8671933F6347}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Disposables", "src\cs\Bts.Disposables\Bts.Disposables.csproj", "{D419D996-9870-4FF5-82AD-08370D1C945F}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Numerics", "src\cs\Bts.Numerics\Bts.Numerics.csproj", "{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}"
|
|
||||||
EndProject
|
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -283,102 +275,6 @@ Global
|
|||||||
{2B8243FF-60C6-4607-8AAE-7762D29B0A48}.Release|x64.Build.0 = Release|x64
|
{2B8243FF-60C6-4607-8AAE-7762D29B0A48}.Release|x64.Build.0 = Release|x64
|
||||||
{2B8243FF-60C6-4607-8AAE-7762D29B0A48}.Release|x86.ActiveCfg = Release|x64
|
{2B8243FF-60C6-4607-8AAE-7762D29B0A48}.Release|x86.ActiveCfg = Release|x64
|
||||||
{2B8243FF-60C6-4607-8AAE-7762D29B0A48}.Release|x86.Build.0 = Release|x64
|
{2B8243FF-60C6-4607-8AAE-7762D29B0A48}.Release|x86.Build.0 = Release|x64
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.MinSizeRel|x86.Build.0 = Debug|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.MinSizeRel|x86.Build.0 = Debug|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.MinSizeRel|x86.Build.0 = Debug|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.MinSizeRel|x86.Build.0 = Debug|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -406,9 +302,5 @@ Global
|
|||||||
{D432F3E9-3D2F-4623-B7B9-CEBA6701FFC3} = {42C014A0-00C5-0620-8552-38912E891A7F}
|
{D432F3E9-3D2F-4623-B7B9-CEBA6701FFC3} = {42C014A0-00C5-0620-8552-38912E891A7F}
|
||||||
{DD00F5D5-6C2F-4FDA-AE3D-25CF01A9A224} = {C5A3B5EA-BE9F-76E5-E9B8-8A22B289B295}
|
{DD00F5D5-6C2F-4FDA-AE3D-25CF01A9A224} = {C5A3B5EA-BE9F-76E5-E9B8-8A22B289B295}
|
||||||
{2B8243FF-60C6-4607-8AAE-7762D29B0A48} = {C5A3B5EA-BE9F-76E5-E9B8-8A22B289B295}
|
{2B8243FF-60C6-4607-8AAE-7762D29B0A48} = {C5A3B5EA-BE9F-76E5-E9B8-8A22B289B295}
|
||||||
{00D21F82-61F4-467F-B125-268018A185E5} = {D7C6B9C7-1058-B1EA-FEE6-34C56B05AEDB}
|
|
||||||
{513A3F0D-46B5-4AC2-B700-8671933F6347} = {D7C6B9C7-1058-B1EA-FEE6-34C56B05AEDB}
|
|
||||||
{D419D996-9870-4FF5-82AD-08370D1C945F} = {D7C6B9C7-1058-B1EA-FEE6-34C56B05AEDB}
|
|
||||||
{697BC3A3-1A98-43D3-A6E8-BB39A05EA049} = {D7C6B9C7-1058-B1EA-FEE6-34C56B05AEDB}
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
+3
-3
@@ -102,10 +102,10 @@ namespace BCG
|
|||||||
List<ColumnInfo> col_info = new List<ColumnInfo>();
|
List<ColumnInfo> col_info = new List<ColumnInfo>();
|
||||||
col_info.Add(new ColumnInfo("id", col_index++, typeof(int)));
|
col_info.Add(new ColumnInfo("id", col_index++, typeof(int)));
|
||||||
foreach (Pair<string, Type> p in group_by_col_info)
|
foreach (Pair<string, Type> p in group_by_col_info)
|
||||||
col_info.Add(new ColumnInfo(p.first ?? string.Empty, col_index++, ExceptionAssert.NotNull(p.second)));
|
col_info.Add(new ColumnInfo(p.first, col_index++, p.second));
|
||||||
foreach (string tc_prefix in tc_prefixes)
|
foreach (string tc_prefix in tc_prefixes)
|
||||||
foreach (Pair<string, Type> p in _cols_per_transposed)
|
foreach (Pair<string, Type> p in _cols_per_transposed)
|
||||||
col_info.Add(new ColumnInfo(_get_full_column_name(tc_prefix, p.first ?? string.Empty), col_index++, ExceptionAssert.NotNull(p.second)));
|
col_info.Add(new ColumnInfo(_get_full_column_name(tc_prefix, p.first ?? string.Empty), col_index++, p.second));
|
||||||
IBlueTableSchema schema = new BlueTableSchema(col_info.ToArray(), "xy_transposed_" + table_name);
|
IBlueTableSchema schema = new BlueTableSchema(col_info.ToArray(), "xy_transposed_" + table_name);
|
||||||
if (_schema == null)
|
if (_schema == null)
|
||||||
_schema = schema;
|
_schema = schema;
|
||||||
@@ -182,7 +182,7 @@ namespace BCG
|
|||||||
if (_transpsed_col_value_comparer_wrapper != null)
|
if (_transpsed_col_value_comparer_wrapper != null)
|
||||||
tc_values.Sort(_transpsed_col_value_comparer_wrapper);
|
tc_values.Sort(_transpsed_col_value_comparer_wrapper);
|
||||||
List<string> prefixes = new List<string>();
|
List<string> prefixes = new List<string>();
|
||||||
foreach (Pair<int, object?[]> p in tc_values)
|
foreach (Pair<int, object[]> p in tc_values)
|
||||||
prefixes.Add(tc_prefixes[p.first]);
|
prefixes.Add(tc_prefixes[p.first]);
|
||||||
_set_schema(prefixes, group_by_col_info, table_name);
|
_set_schema(prefixes, group_by_col_info, table_name);
|
||||||
BlueTable result = new BlueTable(_schema);
|
BlueTable result = new BlueTable(_schema);
|
||||||
|
|||||||
+19
-25
@@ -1,17 +1,17 @@
|
|||||||
using Spark.Core.Diagnostics;
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
|
using BCG;
|
||||||
|
using BCG.Utilities;
|
||||||
|
|
||||||
namespace BCG
|
namespace BCG
|
||||||
{
|
{
|
||||||
public class ConcatenateColumnsMapper : IStreamMapper
|
public class ConcatenateColumnsMapper : IStreamMapper
|
||||||
{
|
{
|
||||||
protected IDictionary myTempColMap = new SortedList ();
|
protected IDictionary myTempColMap = new SortedList ();
|
||||||
protected ArrayList? myColMap;
|
protected ArrayList myColMap;
|
||||||
protected BlueTableSchema? mySchema;
|
protected BlueTableSchema mySchema;
|
||||||
|
|
||||||
public ConcatenateColumnsMapper(params string [] columnDefs)
|
public ConcatenateColumnsMapper(params string [] columnDefs)
|
||||||
{
|
{
|
||||||
@@ -55,7 +55,11 @@ namespace BCG
|
|||||||
myColMap = new ArrayList (myTempColMap.Count);
|
myColMap = new ArrayList (myTempColMap.Count);
|
||||||
foreach (DictionaryEntry de in myTempColMap)
|
foreach (DictionaryEntry de in myTempColMap)
|
||||||
{
|
{
|
||||||
myColMap.Add(Array.ConvertAll((string[])de.Value!, c => inputSchema[c].colNo));
|
string[] cols = de.Value as string[];
|
||||||
|
ArrayList temp = new ArrayList ();
|
||||||
|
foreach (string col in cols)
|
||||||
|
temp.Add (inputSchema[col].colNo);
|
||||||
|
myColMap.Add (temp.ToArray(typeof(int)) as int[]);
|
||||||
}
|
}
|
||||||
myTempColMap.Clear ();
|
myTempColMap.Clear ();
|
||||||
}
|
}
|
||||||
@@ -68,8 +72,6 @@ namespace BCG
|
|||||||
|
|
||||||
public virtual IBlueRow map (IBlueRow row)
|
public virtual IBlueRow map (IBlueRow row)
|
||||||
{
|
{
|
||||||
requireSchema();
|
|
||||||
requireColMap();
|
|
||||||
object[] retVal = new object[mySchema.columnInfo.Length];
|
object[] retVal = new object[mySchema.columnInfo.Length];
|
||||||
row.CopyTo (retVal, myColMap.Count);
|
row.CopyTo (retVal, myColMap.Count);
|
||||||
for (int colNo = 0; colNo < myColMap.Count; colNo ++)
|
for (int colNo = 0; colNo < myColMap.Count; colNo ++)
|
||||||
@@ -88,21 +90,11 @@ namespace BCG
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected virtual object myGetConcatValue (IBlueRow row, int colNo)
|
protected virtual object myGetConcatValue (IBlueRow row, int colNo)
|
||||||
{
|
{
|
||||||
requireColMap();
|
|
||||||
StringBuilder b = new StringBuilder();
|
StringBuilder b = new StringBuilder();
|
||||||
foreach (int cn in (int[])myColMap[colNo]!) {
|
foreach (int cn in myColMap[colNo] as int[])
|
||||||
b.Append(row[cn]?.ToString());
|
b.Append(row[cn].ToString());
|
||||||
}
|
|
||||||
return b.ToString ();
|
return b.ToString ();
|
||||||
}
|
}
|
||||||
|
|
||||||
[MemberNotNull(nameof(myColMap))]
|
|
||||||
protected void requireColMap() =>
|
|
||||||
ExceptionAssert.NotNull(myColMap);
|
|
||||||
|
|
||||||
[MemberNotNull(nameof(mySchema))]
|
|
||||||
void requireSchema() =>
|
|
||||||
ExceptionAssert.NotNull(mySchema);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ConcatenateColumnsMapperForSameDataSet : ConcatenateColumnsMapper
|
public class ConcatenateColumnsMapperForSameDataSet : ConcatenateColumnsMapper
|
||||||
@@ -115,21 +107,23 @@ namespace BCG
|
|||||||
myDicts = new HashTableND [columnDefs.Length];
|
myDicts = new HashTableND [columnDefs.Length];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
foreach (DictionaryEntry de in myTempColMap)
|
foreach (DictionaryEntry de in myTempColMap)
|
||||||
myDicts[i++] = new HashTableND(((string[])de.Value!).Length);
|
myDicts[i++] = new HashTableND ((de.Value as string[]).Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override object myGetConcatValue (IBlueRow row, int colNo)
|
protected override object myGetConcatValue (IBlueRow row, int colNo)
|
||||||
{
|
{
|
||||||
requireColMap();
|
int[] cols = myColMap[colNo] as int[];
|
||||||
|
object[] vals = new object[cols.Length];
|
||||||
|
for (int i = 0; i < vals.Length; i++)
|
||||||
|
vals[i] = row[cols[i]];
|
||||||
HashTableND ht = myDicts[colNo];
|
HashTableND ht = myDicts[colNo];
|
||||||
var vals = Array.ConvertAll((int[])myColMap[colNo]!, c => row[c]);
|
object rv = ht.getValue (vals);
|
||||||
var rv = ht.getValue(vals);
|
|
||||||
if (rv != null)
|
if (rv != null)
|
||||||
return rv;
|
return rv;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rv = base.myGetConcatValue (row, colNo);
|
rv = base.myGetConcatValue (row, colNo);
|
||||||
var args = new object?[vals.Length + 1];
|
object[] args = new object[vals.Length + 1];
|
||||||
vals.CopyTo (args, 0);
|
vals.CopyTo (args, 0);
|
||||||
args[args.Length-1] = rv;
|
args[args.Length-1] = rv;
|
||||||
ht.add (args);
|
ht.add (args);
|
||||||
|
|||||||
@@ -14,10 +14,8 @@ namespace BCG
|
|||||||
public DistinctRowEvaluator(string colMapExpression, string[] columnNames)
|
public DistinctRowEvaluator(string colMapExpression, string[] columnNames)
|
||||||
: base (colMapExpression, null, columnNames) {}
|
: base (colMapExpression, null, columnNames) {}
|
||||||
|
|
||||||
|
public override IBlueRow? evaluate(IDataPacket packet) {
|
||||||
public override IBlueRow evaluate (DataPacket packet)
|
myOutputTable ??= new GroupByOutputTable(packet.Schema);
|
||||||
{
|
|
||||||
myOutputTable = myOutputTable == null ? new GroupByOutputTable (packet.schema) : myOutputTable;
|
|
||||||
string hashString = GroupByStream.getRepString (packet, myGroupByCols);
|
string hashString = GroupByStream.getRepString (packet, myGroupByCols);
|
||||||
if (packet.newRows.Count == 0)
|
if (packet.newRows.Count == 0)
|
||||||
//if there are no rows for this group we remove the group from the output table
|
//if there are no rows for this group we remove the group from the output table
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ namespace BCG {
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public event FilterChangeDelegate? onFilterChange;
|
public event FilterChangeDelegate onFilterChange;
|
||||||
|
|
||||||
#region IStreamFilter
|
#region IStreamFilter
|
||||||
public bool filter(IBlueRow row) {
|
public bool filter(IBlueRow row) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Bts.DataStreamCore;
|
using System;
|
||||||
|
|
||||||
namespace BCG
|
namespace BCG
|
||||||
{
|
{
|
||||||
@@ -10,8 +10,8 @@ namespace BCG
|
|||||||
{
|
{
|
||||||
protected string[] myGroupByCols;
|
protected string[] myGroupByCols;
|
||||||
protected string myOutputColumn;
|
protected string myOutputColumn;
|
||||||
protected GroupByOutputTable? myOutputTable;
|
protected GroupByOutputTable myOutputTable;
|
||||||
protected string? myColMapExpression;
|
protected string myColMapExpression;
|
||||||
|
|
||||||
#region constructors
|
#region constructors
|
||||||
public GroupByEvaluator (string outputCol, string[] groupByCols)
|
public GroupByEvaluator (string outputCol, string[] groupByCols)
|
||||||
@@ -42,7 +42,7 @@ namespace BCG
|
|||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract IBlueRow evaluate (DataPacket dp) ;
|
public abstract IBlueRow? evaluate(IDataPacket dp);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Helper methods
|
#region Helper methods
|
||||||
@@ -52,20 +52,21 @@ namespace BCG
|
|||||||
/// <param name="r"></param>
|
/// <param name="r"></param>
|
||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected IBlueRow? myProject(IBlueRow r, int id) =>
|
protected IBlueRow myProject (IBlueRow r, int id)
|
||||||
r is null
|
{
|
||||||
? null
|
return r == null ? null :
|
||||||
: myColMapExpression is null || myColMapExpression.Length < 1
|
myColMapExpression == null || myColMapExpression.Length < 1 ?
|
||||||
? BlueDataUtility.getNewReplacedRow(r, id, "id")
|
BlueDataUtility.getNewReplacedRow (r, id, "id") :
|
||||||
: BlueDataUtility.getNewReplacedRow(myProjectRow(r, myColMapExpression), id, "id");
|
BlueDataUtility.getNewReplacedRow(myProjectRow (r, myColMapExpression),
|
||||||
|
id, "id");
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Projects the id, conserving the id
|
/// Projects the id, conserving the id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="r"></param>
|
/// <param name="r"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected IBlueRow? myProject(IBlueRow r) =>
|
protected IBlueRow myProject (IBlueRow r) {return myProject (r, r == null ? Int32.MinValue : (int)r["id"]);}
|
||||||
myProject(r, r is null ? int.MinValue : r.Id());
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
IBlueRow myProjectRow (IBlueRow r, string colMapExpression) =>
|
IBlueRow myProjectRow (IBlueRow r, string colMapExpression) =>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using Bts.DataStreamCore;
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using BCG.Utilities;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
|
||||||
namespace BCG
|
namespace BCG
|
||||||
@@ -23,12 +22,10 @@ namespace BCG
|
|||||||
/// <param name="groupRepString"></param>
|
/// <param name="groupRepString"></param>
|
||||||
public void addRow (IBlueRow row, string groupRepString)
|
public void addRow (IBlueRow row, string groupRepString)
|
||||||
{
|
{
|
||||||
var grp = myDict[groupRepString];
|
if (myDict[groupRepString] != null)
|
||||||
if (grp is not null) {
|
myTable.deleteRow ((IBlueRow)myDict[groupRepString]);
|
||||||
myTable.deleteRow((IBlueRow)grp);
|
|
||||||
}
|
|
||||||
myTable.addRow (row);
|
myTable.addRow (row);
|
||||||
myDict[groupRepString] = myTable[row.Id()];
|
myDict[groupRepString] = myTable[(int)row["id"]];
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -38,7 +35,7 @@ namespace BCG
|
|||||||
public void removeRow (string groupRepString)
|
public void removeRow (string groupRepString)
|
||||||
{
|
{
|
||||||
// BlueEventLog.logAssert (myDict[groupRepString] != null);
|
// BlueEventLog.logAssert (myDict[groupRepString] != null);
|
||||||
myTable.deleteRow ((IBlueRow)myDict[groupRepString]!);
|
myTable.deleteRow ((IBlueRow)myDict[groupRepString]);
|
||||||
myDict.Remove (groupRepString);
|
myDict.Remove (groupRepString);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,8 +48,11 @@ namespace BCG
|
|||||||
myDict.Clear ();
|
myDict.Clear ();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IBlueRow? getRow(string groupRepString) =>
|
public IBlueRow getRow (string groupRepString)
|
||||||
myDict[groupRepString] as IBlueRow;
|
{
|
||||||
|
return myDict[groupRepString] == null ? null :
|
||||||
|
myDict[groupRepString] as IBlueRow;
|
||||||
|
}
|
||||||
|
|
||||||
#region IBlueRowCollection members
|
#region IBlueRowCollection members
|
||||||
public IBlueRow this[int id] {get{return myTable[id];}}
|
public IBlueRow this[int id] {get{return myTable[id];}}
|
||||||
|
|||||||
@@ -1,21 +1,20 @@
|
|||||||
using Spark.Core.Diagnostics;
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using BCG.Utilities;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace BCG {
|
namespace BCG {
|
||||||
internal class GroupByStream : MethodDrivenStream {
|
internal class GroupByStream : MethodDrivenStream {
|
||||||
private class MyFuncGroupByEvaluator : IGroupByEvaluator {
|
private class MyFuncGroupByEvaluator : IGroupByEvaluator {
|
||||||
private string[] _groupby_cols;
|
private string[] _groupby_cols;
|
||||||
private Func<DataPacket, IBlueRow> _groupby_func;
|
readonly Func<IDataPacket, IBlueRow> _groupby_func;
|
||||||
public MyFuncGroupByEvaluator(IEnumerable<string> groupby_cols, Func<DataPacket, IBlueRow> groupby_func) {
|
public MyFuncGroupByEvaluator(IEnumerable<string> groupby_cols, Func<IDataPacket, IBlueRow> groupby_func) {
|
||||||
_groupby_cols = groupby_cols.ToArray();
|
_groupby_cols = groupby_cols.ToArray();
|
||||||
_groupby_func = groupby_func;
|
_groupby_func = groupby_func;
|
||||||
}
|
}
|
||||||
public IBlueRow evaluate(DataPacket packet) { return _groupby_func(packet); }
|
public IBlueRow evaluate(IDataPacket packet) =>
|
||||||
|
_groupby_func(packet);
|
||||||
|
|
||||||
public string[] groupByColumns { get { return _groupby_cols; } }
|
public string[] groupByColumns { get { return _groupby_cols; } }
|
||||||
|
|
||||||
@@ -27,15 +26,14 @@ namespace BCG {
|
|||||||
/// Serves as a quick way to access all rows belonging to the same group
|
/// Serves as a quick way to access all rows belonging to the same group
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private bool myIdGuard = true;
|
private bool myIdGuard = true;
|
||||||
RowDictionaryTable? myBookKeepingTable;
|
private RowDictionaryTable myBookKeepingTable;
|
||||||
private IGroupByEvaluator myGroupByEvaluator;
|
private IGroupByEvaluator myGroupByEvaluator;
|
||||||
// input schema, as output schema can differ (IGroupByEvaluator's
|
private IBlueTableSchema mySchema; //input schema, as output schema can differ (IGroupByEvaluator's
|
||||||
IBlueTableSchema? mySchema;
|
|
||||||
//can map a schema to another
|
//can map a schema to another
|
||||||
IBlueTableSchema? myOutputSchema;
|
private IBlueTableSchema myOutputSchema;
|
||||||
private int myIdGenerator = 0;
|
private int myIdGenerator = 0;
|
||||||
|
|
||||||
public GroupByStream(ViewStream stream, IEnumerable<string> groupby_cols, Func<DataPacket, IBlueRow> groupby_func)
|
public GroupByStream(ViewStream stream, IEnumerable<string> groupby_cols, Func<IDataPacket, IBlueRow> groupby_func)
|
||||||
: this(stream, new MyFuncGroupByEvaluator(groupby_cols, groupby_func)) { }
|
: this(stream, new MyFuncGroupByEvaluator(groupby_cols, groupby_func)) { }
|
||||||
|
|
||||||
public GroupByStream(ViewStream stream, IGroupByEvaluator groupByEvaluator)
|
public GroupByStream(ViewStream stream, IGroupByEvaluator groupByEvaluator)
|
||||||
@@ -48,14 +46,14 @@ namespace BCG {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override void myHandleFirstCall() {
|
protected override void myHandleFirstCall() {
|
||||||
requireLastArrivedPacket();
|
|
||||||
mySchema = myLastArrivedPacket.schema;
|
mySchema = myLastArrivedPacket.schema;
|
||||||
myOutputSchema = myGroupByEvaluator.getOutputSchema(mySchema);
|
myOutputSchema = myGroupByEvaluator.getOutputSchema(mySchema);
|
||||||
myBookKeepingTable = new RowDictionaryTable(myLastArrivedPacket.newRows,
|
myBookKeepingTable = new RowDictionaryTable(myLastArrivedPacket.newRows,
|
||||||
myGroupByEvaluator.groupByColumns);
|
myGroupByEvaluator.groupByColumns);
|
||||||
GroupByOutputTable temp = new GroupByOutputTable(myOutputSchema);
|
GroupByOutputTable temp = new GroupByOutputTable(myOutputSchema);
|
||||||
foreach (IBlueRowCollection rowGroup in myBookKeepingTable.getGroups()) {
|
foreach (IBlueRowCollection rowGroup in myBookKeepingTable.getGroups()) {
|
||||||
var newRow = myEvaluate(new DataPacket(rowGroup, rowGroup, new BlueTable(mySchema)));
|
IBlueRow newRow = myEvaluate(new DataPacket(rowGroup,
|
||||||
|
rowGroup, new BlueTable(mySchema)));
|
||||||
if (newRow != null)
|
if (newRow != null)
|
||||||
temp.addRow(newRow, myGetGroupString(rowGroup));
|
temp.addRow(newRow, myGetGroupString(rowGroup));
|
||||||
}
|
}
|
||||||
@@ -81,14 +79,15 @@ namespace BCG {
|
|||||||
ArrayList handledAddGroups = new ArrayList();
|
ArrayList handledAddGroups = new ArrayList();
|
||||||
string groupRepString;
|
string groupRepString;
|
||||||
|
|
||||||
requireBookKeeping();
|
|
||||||
foreach (IBlueRowCollection delGroup in delGroups.getGroups()) {
|
foreach (IBlueRowCollection delGroup in delGroups.getGroups()) {
|
||||||
// BlueEventLog.logAssert (delGroup.Count > 0);
|
// BlueEventLog.logAssert (delGroup.Count > 0);
|
||||||
groupRepString = myGetGroupString(delGroup);
|
groupRepString = myGetGroupString(delGroup);
|
||||||
IBlueRowCollection addGroup = addGroups.getGroup(groupRepString) ?? new BlueTable(mySchema);
|
IBlueRowCollection addGroup = addGroups.getGroup(groupRepString) == null ?
|
||||||
|
new BlueTable(mySchema) : addGroups.getGroup(groupRepString);
|
||||||
handledAddGroups.Add(addGroup);
|
handledAddGroups.Add(addGroup);
|
||||||
IBlueRowCollection aggGroup = myBookKeepingTable.getGroup(groupRepString) ?? new BlueTable(mySchema);
|
IBlueRowCollection aggGroup = myBookKeepingTable.getGroup(groupRepString) == null ?
|
||||||
var newRow = myEvaluate(new DataPacket(aggGroup, addGroup, delGroup));
|
new BlueTable(mySchema) : myBookKeepingTable.getGroup(groupRepString);
|
||||||
|
IBlueRow newRow = myEvaluate(new DataPacket(aggGroup, addGroup, delGroup));
|
||||||
myFireSwitch |= myMergeRow(newRow, groupRepString);
|
myFireSwitch |= myMergeRow(newRow, groupRepString);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,16 +99,16 @@ namespace BCG {
|
|||||||
//the loop above
|
//the loop above
|
||||||
|
|
||||||
groupRepString = myGetGroupString(addGroup);
|
groupRepString = myGetGroupString(addGroup);
|
||||||
var aggGroup = ExceptionAssert.NotNull(myBookKeepingTable.getGroup(groupRepString));
|
IBlueRowCollection aggGroup = myBookKeepingTable.getGroup(groupRepString);
|
||||||
// BlueEventLog.logAssert (aggGroup != null && aggGroup.Count > 0);
|
// BlueEventLog.logAssert (aggGroup != null && aggGroup.Count > 0);
|
||||||
var newRow = myEvaluate(new DataPacket(aggGroup, addGroup, new BlueTable(aggGroup.schema)));
|
IBlueRow newRow = myEvaluate(new DataPacket(aggGroup, addGroup,
|
||||||
|
new BlueTable(aggGroup.schema)));
|
||||||
myFireSwitch |= myMergeRow(newRow, groupRepString);
|
myFireSwitch |= myMergeRow(newRow, groupRepString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool myMergeRow(IBlueRow? newRow, string groupRepString) {
|
private bool myMergeRow(IBlueRow newRow, string groupRepString) {
|
||||||
requireLastFiredPacket();
|
|
||||||
IBlueRow existingRow = ((GroupByOutputTable)myLastFiredPacket.newRows).getRow(groupRepString);
|
IBlueRow existingRow = ((GroupByOutputTable)myLastFiredPacket.newRows).getRow(groupRepString);
|
||||||
//BlueEventLog.logAssert (newRow != null || existingRow != null);
|
//BlueEventLog.logAssert (newRow != null || existingRow != null);
|
||||||
if (existingRow == null && newRow == null)
|
if (existingRow == null && newRow == null)
|
||||||
@@ -117,7 +116,6 @@ namespace BCG {
|
|||||||
else if (existingRow != null && newRow != null && BlueDataUtility.compute_equality(existingRow, newRow))
|
else if (existingRow != null && newRow != null && BlueDataUtility.compute_equality(existingRow, newRow))
|
||||||
return false;
|
return false;
|
||||||
else if (existingRow == null) {
|
else if (existingRow == null) {
|
||||||
ArgumentNullException.ThrowIfNull(newRow);
|
|
||||||
//row added for the first time
|
//row added for the first time
|
||||||
((GroupByOutputTable)myLastFiredPacket.newRows).addRow(newRow, groupRepString);
|
((GroupByOutputTable)myLastFiredPacket.newRows).addRow(newRow, groupRepString);
|
||||||
((BlueTable)myLastFiredPacket.addedRows).addRow(newRow);
|
((BlueTable)myLastFiredPacket.addedRows).addRow(newRow);
|
||||||
@@ -140,9 +138,6 @@ namespace BCG {
|
|||||||
/// <param name="delGroups"></param>
|
/// <param name="delGroups"></param>
|
||||||
/// <param name="addGroups"></param>
|
/// <param name="addGroups"></param>
|
||||||
private void myInitIncrementalChangeData(out RowDictionaryTable delGroups, out RowDictionaryTable addGroups) {
|
private void myInitIncrementalChangeData(out RowDictionaryTable delGroups, out RowDictionaryTable addGroups) {
|
||||||
ExceptionAssert.NotNull(myBookKeepingTable);
|
|
||||||
requireLastFiredPacket();
|
|
||||||
requireLastArrivedPacket();
|
|
||||||
delGroups =
|
delGroups =
|
||||||
new RowDictionaryTable(myLastArrivedPacket.deletedRows, myGroupByEvaluator.groupByColumns);
|
new RowDictionaryTable(myLastArrivedPacket.deletedRows, myGroupByEvaluator.groupByColumns);
|
||||||
addGroups =
|
addGroups =
|
||||||
@@ -156,19 +151,16 @@ namespace BCG {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override void myOnTableClear() {
|
protected override void myOnTableClear() {
|
||||||
if (ExceptionAssert.NotNull(myBookKeepingTable).Count == 0) {
|
if (myBookKeepingTable.Count == 0)
|
||||||
// ie there arent any rows, so no need to optimize the 'cleansing' process
|
return; //ie there arent any rows, so no need to optimize the 'cleansing' process
|
||||||
return;
|
|
||||||
}
|
|
||||||
requireLastFiredPacket();
|
|
||||||
myLastFiredPacket.deletedRows = new BlueTable(myLastFiredPacket.newRows);
|
myLastFiredPacket.deletedRows = new BlueTable(myLastFiredPacket.newRows);
|
||||||
myLastFiredPacket.addedRows = new BlueTable(myLastFiredPacket.deletedRows.schema);
|
myLastFiredPacket.addedRows = new BlueTable(myLastFiredPacket.deletedRows.schema);
|
||||||
((GroupByOutputTable)myLastFiredPacket.newRows).clear();
|
(myLastFiredPacket.newRows as GroupByOutputTable).clear();
|
||||||
myBookKeepingTable.clear();
|
myBookKeepingTable.clear();
|
||||||
myGroupByEvaluator.clear();
|
myGroupByEvaluator.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
private IBlueRow? myEvaluate(DataPacket dp) {
|
private IBlueRow myEvaluate(DataPacket dp) {
|
||||||
IBlueRow evalRow = myGroupByEvaluator.evaluate(dp);
|
IBlueRow evalRow = myGroupByEvaluator.evaluate(dp);
|
||||||
return evalRow == null ? null :
|
return evalRow == null ? null :
|
||||||
myIdGuard ?
|
myIdGuard ?
|
||||||
@@ -196,11 +188,11 @@ namespace BCG {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string getRepString(DataPacket dp, string[] colNames) {
|
public static string getRepString(IDataPacket dp, string[] colNames) {
|
||||||
return BlueDataUtility.rowToString(getRepRow(dp), colNames);
|
return BlueDataUtility.rowToString(getRepRow(dp), colNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IBlueRow? getRepRow(DataPacket dp) {
|
public static IBlueRow getRepRow(IDataPacket dp) {
|
||||||
if (dp.newRows.Count > 0)
|
if (dp.newRows.Count > 0)
|
||||||
return BlueDataUtility.extractRow(dp.newRows, 0);
|
return BlueDataUtility.extractRow(dp.newRows, 0);
|
||||||
else if (dp.addedRows.Count > 0)
|
else if (dp.addedRows.Count > 0)
|
||||||
@@ -219,13 +211,13 @@ namespace BCG {
|
|||||||
/// <param name="newValue"></param>
|
/// <param name="newValue"></param>
|
||||||
/// <param name="isAdd"></param>
|
/// <param name="isAdd"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static object? incrementalAdd(object lastValue, object newValue, bool isAdd) {
|
public static object incrementalAdd(object lastValue, object newValue, bool isAdd) {
|
||||||
if (lastValue == null || lastValue.Equals(DBNull.Value))
|
if (lastValue == null || lastValue.Equals(DBNull.Value))
|
||||||
return newValue;
|
return newValue;
|
||||||
// BlueEventLog.logAssert (lastValue.GetType().Equals (typeof(Int32)) && newValue.GetType().Equals (typeof(Int32)) ||
|
// BlueEventLog.logAssert (lastValue.GetType().Equals (typeof(Int32)) && newValue.GetType().Equals (typeof(Int32)) ||
|
||||||
// lastValue.GetType().Equals (typeof(Double)) && newValue.GetType().Equals (typeof(Double)) ||
|
// lastValue.GetType().Equals (typeof(Double)) && newValue.GetType().Equals (typeof(Double)) ||
|
||||||
// lastValue.GetType().Equals (typeof(Decimal)) && newValue.GetType().Equals (typeof(Decimal)));
|
// lastValue.GetType().Equals (typeof(Decimal)) && newValue.GetType().Equals (typeof(Decimal)));
|
||||||
object? retVal = null;
|
Object retVal = null;
|
||||||
if (newValue.GetType().Equals(typeof(int)))
|
if (newValue.GetType().Equals(typeof(int)))
|
||||||
retVal = isAdd ? (int)lastValue + (int)newValue : (int)lastValue - (int)newValue;
|
retVal = isAdd ? (int)lastValue + (int)newValue : (int)lastValue - (int)newValue;
|
||||||
else if (newValue.GetType().Equals(typeof(Double)))
|
else if (newValue.GetType().Equals(typeof(Double)))
|
||||||
@@ -237,9 +229,6 @@ namespace BCG {
|
|||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
[MemberNotNull(nameof(myBookKeepingTable))]
|
|
||||||
void requireBookKeeping() =>
|
|
||||||
ExceptionAssert.NotNull(myBookKeepingTable);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace BCG
|
namespace BCG
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -14,7 +12,7 @@ namespace BCG
|
|||||||
/// deletetion) and the added and deletedRows being the increments. If a group has
|
/// deletetion) and the added and deletedRows being the increments. If a group has
|
||||||
/// to be totally removed then a null should be returned
|
/// to be totally removed then a null should be returned
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IBlueRow evaluate (DataPacket packet);
|
IBlueRow? evaluate(IDataPacket packet);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the columns (belonging to the original schema) on which this IGroupByEvaluator
|
/// Returns the columns (belonging to the original schema) on which this IGroupByEvaluator
|
||||||
|
|||||||
@@ -14,9 +14,8 @@ namespace BCG {
|
|||||||
public MaxGroupByEvaluator(string colMapEpression, string outputCol, string[] groupByCols)
|
public MaxGroupByEvaluator(string colMapEpression, string outputCol, string[] groupByCols)
|
||||||
: base(colMapEpression, outputCol, groupByCols) { }
|
: base(colMapEpression, outputCol, groupByCols) { }
|
||||||
|
|
||||||
public override IBlueRow evaluate(DataPacket dp) {
|
public override IBlueRow? evaluate(IDataPacket dp) {
|
||||||
myOutputTable = myOutputTable == null ? new GroupByOutputTable(dp.schema) :
|
myOutputTable ??= new GroupByOutputTable(dp.Schema);
|
||||||
myOutputTable;
|
|
||||||
string hashString = BlueDataUtility.rowToString(GroupByStream.getRepRow(dp), myGroupByCols);
|
string hashString = BlueDataUtility.rowToString(GroupByStream.getRepRow(dp), myGroupByCols);
|
||||||
IBlueRow currMaxRow = myOutputTable.getRow(hashString);
|
IBlueRow currMaxRow = myOutputTable.getRow(hashString);
|
||||||
IBlueRow maxRow = BlueDataUtility.computeMaxRow(dp.deletedRows, myOutputColumn);
|
IBlueRow maxRow = BlueDataUtility.computeMaxRow(dp.deletedRows, myOutputColumn);
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using BCG.Utilities;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
namespace BCG
|
namespace BCG
|
||||||
{
|
{
|
||||||
using Spark.Core.Diagnostics;
|
|
||||||
|
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Some basic event handling functionality factorred out of any Stream whose behaviour
|
/// Some basic event handling functionality factorred out of any Stream whose behaviour
|
||||||
/// is driven by some interface passed on by the user
|
/// is driven by some interface passed on by the user
|
||||||
@@ -11,8 +12,8 @@ namespace BCG
|
|||||||
public abstract class MethodDrivenStream : ViewStream
|
public abstract class MethodDrivenStream : ViewStream
|
||||||
{
|
{
|
||||||
protected ViewStream myStream;
|
protected ViewStream myStream;
|
||||||
protected DataPacket? myLastArrivedPacket;
|
protected DataPacket myLastArrivedPacket;
|
||||||
protected DataPacket? myLastFiredPacket;
|
protected DataPacket myLastFiredPacket;
|
||||||
protected bool myFireSwitch = true;
|
protected bool myFireSwitch = true;
|
||||||
|
|
||||||
public MethodDrivenStream(ViewStream vs) {myStream = vs;}
|
public MethodDrivenStream(ViewStream vs) {myStream = vs;}
|
||||||
@@ -58,7 +59,6 @@ namespace BCG
|
|||||||
/// To handle the first call, the LastFiredPacket is supposed to be initialized and filled
|
/// To handle the first call, the LastFiredPacket is supposed to be initialized and filled
|
||||||
/// with data.
|
/// with data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MemberNotNull(nameof(myLastFiredPacket))]
|
|
||||||
protected abstract void myHandleFirstCall ();
|
protected abstract void myHandleFirstCall ();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -89,13 +89,5 @@ namespace BCG
|
|||||||
{
|
{
|
||||||
myStream.onChange -= new DataStream.ChangeDelegate (myChangeHandler);
|
myStream.onChange -= new DataStream.ChangeDelegate (myChangeHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
[MemberNotNull(nameof(myLastArrivedPacket))]
|
|
||||||
protected void requireLastArrivedPacket() =>
|
|
||||||
ExceptionAssert.NotNull(myLastArrivedPacket);
|
|
||||||
|
|
||||||
[MemberNotNull(nameof(myLastFiredPacket))]
|
|
||||||
protected void requireLastFiredPacket() =>
|
|
||||||
ExceptionAssert.NotNull(myLastFiredPacket);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,3 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
using BCG.Utilities;
|
|
||||||
|
|
||||||
namespace BCG {
|
namespace BCG {
|
||||||
public class MinGroupByEvaluator : MaxGroupByEvaluator {
|
public class MinGroupByEvaluator : MaxGroupByEvaluator {
|
||||||
public MinGroupByEvaluator(string outputCol, string[] groupByCols)
|
public MinGroupByEvaluator(string outputCol, string[] groupByCols)
|
||||||
@@ -10,8 +6,8 @@ namespace BCG {
|
|||||||
public MinGroupByEvaluator(string colMapEpression, string outputCol, string[] groupByCols) :
|
public MinGroupByEvaluator(string colMapEpression, string outputCol, string[] groupByCols) :
|
||||||
base(colMapEpression, outputCol, groupByCols) { }
|
base(colMapEpression, outputCol, groupByCols) { }
|
||||||
|
|
||||||
public override IBlueRow evaluate(DataPacket dp) {
|
public override IBlueRow? evaluate(IDataPacket dp) {
|
||||||
myOutputTable = myOutputTable == null ? new GroupByOutputTable(dp.schema) : myOutputTable;
|
myOutputTable ??= new GroupByOutputTable(dp.Schema);
|
||||||
string stringRep = BlueDataUtility.rowToString(GroupByStream.getRepRow(dp), myGroupByCols);
|
string stringRep = BlueDataUtility.rowToString(GroupByStream.getRepRow(dp), myGroupByCols);
|
||||||
IBlueRow currMinRow = myOutputTable.getRow(stringRep);
|
IBlueRow currMinRow = myOutputTable.getRow(stringRep);
|
||||||
IBlueRow minRow = BlueDataUtility.computeMinRow(dp.deletedRows, myOutputColumn);
|
IBlueRow minRow = BlueDataUtility.computeMinRow(dp.deletedRows, myOutputColumn);
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace BCG {
|
namespace BCG {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Computes the sum for a given column
|
/// Computes the sum for a given column
|
||||||
@@ -10,8 +8,8 @@ namespace BCG {
|
|||||||
public SumGroupByEvaluator(string colMapEpression, string outputCol, string[] groupByCols)
|
public SumGroupByEvaluator(string colMapEpression, string outputCol, string[] groupByCols)
|
||||||
: base(colMapEpression, outputCol, groupByCols) { }
|
: base(colMapEpression, outputCol, groupByCols) { }
|
||||||
|
|
||||||
public override IBlueRow evaluate(DataPacket dp) {
|
public override IBlueRow evaluate(IDataPacket dp) {
|
||||||
myOutputTable = myOutputTable == null ? new GroupByOutputTable(dp.schema) : myOutputTable;
|
myOutputTable ??= new GroupByOutputTable(dp.Schema);
|
||||||
|
|
||||||
IBlueRow sumRow = BlueDataUtility.computeSum(dp.newRows, myOutputColumn);
|
IBlueRow sumRow = BlueDataUtility.computeSum(dp.newRows, myOutputColumn);
|
||||||
return sumRow;
|
return sumRow;
|
||||||
@@ -33,7 +31,7 @@ namespace BCG {
|
|||||||
|
|
||||||
#region IGroupByEvaluator Members
|
#region IGroupByEvaluator Members
|
||||||
|
|
||||||
public IBlueRow evaluate(DataPacket packet) { return BlueDataUtility.computeSum(packet.newRows, myOutputCols); }
|
public IBlueRow evaluate(IDataPacket packet) => BlueDataUtility.computeSum(packet.newRows, myOutputCols);
|
||||||
|
|
||||||
public string[] groupByColumns { get { return myGroupByCols; } }
|
public string[] groupByColumns { get { return myGroupByCols; } }
|
||||||
|
|
||||||
@@ -51,9 +49,8 @@ namespace BCG {
|
|||||||
public SumGroupByEvaluator(string colMapEpression, string outputCol, string[] groupByCols)
|
public SumGroupByEvaluator(string colMapEpression, string outputCol, string[] groupByCols)
|
||||||
: base(colMapEpression, outputCol, groupByCols) { }
|
: base(colMapEpression, outputCol, groupByCols) { }
|
||||||
|
|
||||||
public override IBlueRow evaluate(DataPacket dp) {
|
public override IBlueRow evaluate(IDataPacket dp) {
|
||||||
myOutputTable = myOutputTable == null ? new GroupByOutputTable(dp.schema) : myOutputTable;
|
myOutputTable ??= new GroupByOutputTable(dp.Schema);
|
||||||
|
|
||||||
IBlueRow sumRow = BlueDataUtility.computeSum<T>(dp.newRows, myOutputColumn);
|
IBlueRow sumRow = BlueDataUtility.computeSum<T>(dp.newRows, myOutputColumn);
|
||||||
return sumRow;
|
return sumRow;
|
||||||
}
|
}
|
||||||
@@ -68,7 +65,7 @@ namespace BCG {
|
|||||||
|
|
||||||
#region IGroupByEvaluator Members
|
#region IGroupByEvaluator Members
|
||||||
|
|
||||||
public IBlueRow evaluate(DataPacket packet) { return BlueDataUtility.computeSum<T>(packet.newRows, myOutputCols); }
|
public IBlueRow evaluate(IDataPacket packet) => BlueDataUtility.computeSum<T>(packet.newRows, myOutputCols);
|
||||||
|
|
||||||
public string[] groupByColumns { get { return myGroupByCols; } }
|
public string[] groupByColumns { get { return myGroupByCols; } }
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
using mbts;
|
using mbts;
|
||||||
|
|
||||||
using Spark.Core.Diagnostics;
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -37,7 +35,7 @@ namespace BCG {
|
|||||||
List<NonIncJoinSpec> rv = new List<NonIncJoinSpec>();
|
List<NonIncJoinSpec> rv = new List<NonIncJoinSpec>();
|
||||||
foreach (Triplet<ViewStream, string, string> r in join_specs) {
|
foreach (Triplet<ViewStream, string, string> r in join_specs) {
|
||||||
string[] keys = String.IsNullOrEmpty(r.second) ? new string[] { } : r.second.Split(' ');
|
string[] keys = String.IsNullOrEmpty(r.second) ? new string[] { } : r.second.Split(' ');
|
||||||
string[] visible_cols = ExceptionAssert.NotNull(r.third).Split(' ');
|
string[] visible_cols = r.third.Split(' ');
|
||||||
List<string> data_col_names = new List<string>(), mapped_col_names = new List<string>();
|
List<string> data_col_names = new List<string>(), mapped_col_names = new List<string>();
|
||||||
foreach (string s in visible_cols) {
|
foreach (string s in visible_cols) {
|
||||||
string[] toks = s.Split(':');
|
string[] toks = s.Split(':');
|
||||||
@@ -49,7 +47,7 @@ namespace BCG {
|
|||||||
mapped_col_names.Add(toks[1]);
|
mapped_col_names.Add(toks[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rv.Add(new(ExceptionAssert.NotNull(r.first), keys, data_col_names.ToArray(), mapped_col_names.ToArray()));
|
rv.Add(new NonIncJoinSpec(r.first, keys, data_col_names.ToArray(), mapped_col_names.ToArray()));
|
||||||
}
|
}
|
||||||
return rv.ToArray();
|
return rv.ToArray();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -290,7 +290,6 @@ namespace BCG
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ExceptionAssert.NotNull(myState);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void myAddRows(IBlueRowCollection addedRows, bool isLeft, BlueTable state, BlueTable addedRowsOut)
|
private void myAddRows(IBlueRowCollection addedRows, bool isLeft, BlueTable state, BlueTable addedRowsOut)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
using Spark.Core.Diagnostics;
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace BCG
|
namespace BCG
|
||||||
@@ -20,21 +18,16 @@ namespace BCG
|
|||||||
|
|
||||||
public override void onTableClear (bool isLeft)
|
public override void onTableClear (bool isLeft)
|
||||||
{
|
{
|
||||||
requireSchema();
|
|
||||||
requireLastFiredPacket();
|
|
||||||
myLastFiredPacket.deletedRows = myLastFiredPacket.newRows;
|
myLastFiredPacket.deletedRows = myLastFiredPacket.newRows;
|
||||||
myLastFiredPacket.newRows = new JoinForeignTable (mySchema);
|
myLastFiredPacket.newRows = new JoinForeignTable (mySchema);
|
||||||
myLastFiredPacket.addedRows = new BlueTable (mySchema);
|
myLastFiredPacket.addedRows = new BlueTable (mySchema);
|
||||||
if (!isLeft) {
|
if (!isLeft)
|
||||||
ExceptionAssert.NotNull(myLeftDataPacket);
|
|
||||||
foreach (IBlueRow row in myLeftDataPacket.newRows)
|
foreach (IBlueRow row in myLeftDataPacket.newRows)
|
||||||
((JoinTable)myLastFiredPacket.newRows).addRow (row, null, myLastFiredPacket);
|
((JoinTable)myLastFiredPacket.newRows).addRow (row, null, myLastFiredPacket);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void myInitFiredPacket ()
|
protected override void myInitFiredPacket ()
|
||||||
{
|
{
|
||||||
requireSchema();
|
|
||||||
myLastFiredPacket = new DataPacket ();
|
myLastFiredPacket = new DataPacket ();
|
||||||
myLastFiredPacket.newRows = new JoinForeignTable (mySchema);
|
myLastFiredPacket.newRows = new JoinForeignTable (mySchema);
|
||||||
myLastFiredPacket.addedRows = new BlueTable (mySchema);
|
myLastFiredPacket.addedRows = new BlueTable (mySchema);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace BCG
|
|||||||
: this (r, null, null)
|
: this (r, null, null)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public SimpleNode(IBlueRow? r, SimpleNode? nx, SimpleNode? pv) {
|
public SimpleNode(IBlueRow r, SimpleNode? nx, SimpleNode? pv) {
|
||||||
row = r;
|
row = r;
|
||||||
next = nx;
|
next = nx;
|
||||||
prev = pv;
|
prev = pv;
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
using bts;
|
using bts;
|
||||||
|
|
||||||
using Spark.Core.Diagnostics;
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -62,7 +60,7 @@ namespace BCG {
|
|||||||
if (columnAndType.Length == 1)
|
if (columnAndType.Length == 1)
|
||||||
ci[n] = new ColumnInfo(c, n, typeof(double));
|
ci[n] = new ColumnInfo(c, n, typeof(double));
|
||||||
else
|
else
|
||||||
ci[n] = new(columnAndType[0], n, ExceptionAssert.NotNull(Type.GetType("System." + columnAndType[1], true)));
|
ci[n] = new ColumnInfo(columnAndType[0], n, Type.GetType("System." + columnAndType[1], true));
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ using BCG;
|
|||||||
|
|
||||||
using MongoDB.Driver.Core.WireProtocol.Messages;
|
using MongoDB.Driver.Core.WireProtocol.Messages;
|
||||||
|
|
||||||
|
using Spark.Core.Diagnostics;
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -37,7 +39,7 @@ namespace bts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _handle_stream_update(object dp_obj) {
|
void _handle_stream_update(object dp_obj) {
|
||||||
DataPacket dp = dp_obj as DataPacket;
|
var dp = ExceptionAssert.Argument.Is<IDataPacket>(dp_obj);
|
||||||
IDictionary<int, List<IBlueRow>> groups = !String.IsNullOrEmpty(_group_by_col) ?
|
IDictionary<int, List<IBlueRow>> groups = !String.IsNullOrEmpty(_group_by_col) ?
|
||||||
BlueDataUtility.group_together(dp.newRows, new string[] { _group_by_col })
|
BlueDataUtility.group_together(dp.newRows, new string[] { _group_by_col })
|
||||||
:
|
:
|
||||||
|
|||||||
@@ -23,6 +23,6 @@ namespace BCG
|
|||||||
/// fires an event when the mapper
|
/// fires an event when the mapper
|
||||||
/// changes itself
|
/// changes itself
|
||||||
/// </summary>
|
/// </summary>
|
||||||
event MapperChangeDelegate? onMapperChange;
|
event MapperChangeDelegate onMapperChange;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -75,7 +75,6 @@ namespace BCG {
|
|||||||
|
|
||||||
protected override void myHandleFirstCall() {
|
protected override void myHandleFirstCall() {
|
||||||
ArgumentNullException.ThrowIfNull(myMapper);
|
ArgumentNullException.ThrowIfNull(myMapper);
|
||||||
requireLastArrivedPacket();
|
|
||||||
IBlueTableSchema outputSchema = myMapper.getOutputSchema(myLastArrivedPacket.newRows.schema);
|
IBlueTableSchema outputSchema = myMapper.getOutputSchema(myLastArrivedPacket.newRows.schema);
|
||||||
myLastFiredPacket = new DataPacket();
|
myLastFiredPacket = new DataPacket();
|
||||||
myLastFiredPacket.newRows = new BlueTable(outputSchema);
|
myLastFiredPacket.newRows = new BlueTable(outputSchema);
|
||||||
@@ -86,12 +85,10 @@ namespace BCG {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override void myHandleIncrementalAdd() {
|
protected override void myHandleIncrementalAdd() {
|
||||||
requireLastArrivedPacket();
|
|
||||||
if (myLastArrivedPacket.addedRows.Count == 0) {
|
if (myLastArrivedPacket.addedRows.Count == 0) {
|
||||||
Log.Gen.warn("MapStream.myHandleIncrementalAdd called with 0 addedRows");
|
Log.Gen.warn("MapStream.myHandleIncrementalAdd called with 0 addedRows");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
requireLastFiredPacket();
|
|
||||||
ArgumentNullException.ThrowIfNull(myMapper);
|
ArgumentNullException.ThrowIfNull(myMapper);
|
||||||
var addedRows = new BlueTable(myLastFiredPacket.newRows.schema);
|
var addedRows = new BlueTable(myLastFiredPacket.newRows.schema);
|
||||||
var newRows = ExceptionAssert.Cast(myLastFiredPacket.newRows).To<BlueTable>();
|
var newRows = ExceptionAssert.Cast(myLastFiredPacket.newRows).To<BlueTable>();
|
||||||
@@ -104,12 +101,10 @@ namespace BCG {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override void myHandleIncrementalDelete() {
|
protected override void myHandleIncrementalDelete() {
|
||||||
requireLastArrivedPacket();
|
|
||||||
if (myLastArrivedPacket.deletedRows.Count == 0) {
|
if (myLastArrivedPacket.deletedRows.Count == 0) {
|
||||||
Log.Gen.warn("MapStream.myHandleIncrementalDelete called with 0 deletedRows");
|
Log.Gen.warn("MapStream.myHandleIncrementalDelete called with 0 deletedRows");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
requireLastFiredPacket();
|
|
||||||
var deletedRows = new BlueTable(myLastFiredPacket.newRows.schema);
|
var deletedRows = new BlueTable(myLastFiredPacket.newRows.schema);
|
||||||
var newRows = ExceptionAssert.Cast(myLastFiredPacket.newRows).To<BlueTable>();
|
var newRows = ExceptionAssert.Cast(myLastFiredPacket.newRows).To<BlueTable>();
|
||||||
foreach (IBlueRow row in myLastArrivedPacket.deletedRows) {
|
foreach (IBlueRow row in myLastArrivedPacket.deletedRows) {
|
||||||
@@ -132,7 +127,6 @@ namespace BCG {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override void myOnTableClear() {
|
protected override void myOnTableClear() {
|
||||||
requireLastFiredPacket();
|
|
||||||
myLastFiredPacket.deletedRows = myLastFiredPacket.newRows;
|
myLastFiredPacket.deletedRows = myLastFiredPacket.newRows;
|
||||||
myLastFiredPacket.newRows = new BlueTable(myLastFiredPacket.deletedRows.schema);
|
myLastFiredPacket.newRows = new BlueTable(myLastFiredPacket.deletedRows.schema);
|
||||||
myLastFiredPacket.addedRows = new BlueTable(myLastFiredPacket.deletedRows.schema);
|
myLastFiredPacket.addedRows = new BlueTable(myLastFiredPacket.deletedRows.schema);
|
||||||
|
|||||||
@@ -47,14 +47,14 @@ namespace BCG {
|
|||||||
_map_rows = map_rows;
|
_map_rows = map_rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
event MapperChangeDelegate? ISuperStreamMapper.onMapperChange { add { } remove { } }
|
|
||||||
|
|
||||||
public IBlueTableSchema getOutputSchema(IBlueTableSchema schema) { return _get_schema(schema); }
|
public IBlueTableSchema getOutputSchema(IBlueTableSchema schema) { return _get_schema(schema); }
|
||||||
|
|
||||||
public IBlueRow[] map(IBlueRow r) {
|
public IBlueRow[] map(IBlueRow r) {
|
||||||
IEnumerable<IBlueRow> rows = _map_rows(r);
|
IEnumerable<IBlueRow> rows = _map_rows(r);
|
||||||
return rows == null ? new IBlueRow[] { } : new List<IBlueRow>(rows).ToArray();
|
return rows == null ? new IBlueRow[] { } : new List<IBlueRow>(rows).ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public event MapperChangeDelegate? onMapperChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
//maps the id of the underlying stream to the
|
//maps the id of the underlying stream to the
|
||||||
|
|||||||
@@ -608,8 +608,8 @@ namespace BCG {
|
|||||||
// 5. deserialize the state into a stream op
|
// 5. deserialize the state into a stream op
|
||||||
str_io_msg_p = deser.deserialize(content_p);
|
str_io_msg_p = deser.deserialize(content_p);
|
||||||
// 6. check to make sure the state's rows are good
|
// 6. check to make sure the state's rows are good
|
||||||
passes &= str_io_msg_p.op == StreamIOMessage.StreamOp.CREATE
|
passes = passes && str_io_msg_p.op == bts.StreamIOMessage.StreamOp.CREATE &&
|
||||||
&& BlueDataUtility.compute_equality(cr_rows, ExceptionAssert.NotNull(str_io_msg_p.create_message).rows);
|
BlueDataUtility.compute_equality(cr_rows, str_io_msg_p.create_message.rows);
|
||||||
return new TestResult {
|
return new TestResult {
|
||||||
test_result = passes,
|
test_result = passes,
|
||||||
test_name = "run_pubsub_server_stream_tag_handler_test"
|
test_name = "run_pubsub_server_stream_tag_handler_test"
|
||||||
@@ -692,7 +692,7 @@ namespace BCG {
|
|||||||
var content = st_data.get_current_content();
|
var content = st_data.get_current_content();
|
||||||
var msg_p = deser.deserialize(content);
|
var msg_p = deser.deserialize(content);
|
||||||
Log.assert(msg_p.op == bts.StreamIOMessage.StreamOp.CREATE);
|
Log.assert(msg_p.op == bts.StreamIOMessage.StreamOp.CREATE);
|
||||||
return ExceptionAssert.NotNull(msg_p.create_message).rows;
|
return msg_p.create_message.rows;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
using Bts.ColumnSortExpressions;
|
using Bts.ColumnSortExpressions;
|
||||||
|
|
||||||
using Spark.Core.Diagnostics;
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -41,7 +39,7 @@ public class SortRow : IComparable, IBlueRow {
|
|||||||
var otherVal = otherRow[col.Name];
|
var otherVal = otherRow[col.Name];
|
||||||
int rv = myIsNull(this[col.Name]) ?
|
int rv = myIsNull(this[col.Name]) ?
|
||||||
(myIsNull(otherVal) ? 0 : -1) :
|
(myIsNull(otherVal) ? 0 : -1) :
|
||||||
(myIsNull(otherVal) ? 1 : ExceptionAssert.Argument.Is<IComparable>(this[col.Name]).CompareTo(otherVal));
|
(myIsNull(otherVal) ? 1 : ((IComparable)this[col.Name]).CompareTo(otherVal));
|
||||||
rv *= col.IsAscending ? 1 : -1;
|
rv *= col.IsAscending ? 1 : -1;
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
using Spark.Core.Diagnostics;
|
using System;
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
@@ -62,13 +60,13 @@ namespace BCG
|
|||||||
List<string> columnInfoStrParts = new List<string>(columnInfoStr.Split(new char[] { ':' }, StringSplitOptions.None));
|
List<string> columnInfoStrParts = new List<string>(columnInfoStr.Split(new char[] { ':' }, StringSplitOptions.None));
|
||||||
if (columnInfoStrParts.Count != 2)
|
if (columnInfoStrParts.Count != 2)
|
||||||
{
|
{
|
||||||
throw new Exception($"Unable to decode schema string '{schemaStr}'");
|
throw (new Exception(String.Format("Unable to decode schema string '{0}'", schemaStr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
columnInfos.Add(new ColumnInfo(columnInfoStrParts[0], i, ExceptionAssert.NotNull(Type.GetType(columnInfoStrParts[1]))));
|
columnInfos.Add(new ColumnInfo(columnInfoStrParts[0], i, Type.GetType(columnInfoStrParts[1])));
|
||||||
}
|
}
|
||||||
|
|
||||||
return new BlueTableSchema(columnInfos.ToArray(), string.Empty);
|
return (new BlueTableSchema(columnInfos.ToArray(), ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
private IBlueRow myGetRow(IBlueTableSchema schema, string rowStr)
|
private IBlueRow myGetRow(IBlueTableSchema schema, string rowStr)
|
||||||
@@ -77,7 +75,7 @@ namespace BCG
|
|||||||
|
|
||||||
if (schema.columnInfo.Length != valueStrs.Count)
|
if (schema.columnInfo.Length != valueStrs.Count)
|
||||||
{
|
{
|
||||||
throw new Exception($"Unable to decode row string '{rowStr}'");
|
throw (new Exception(String.Format("Unable to decode row string '{0}'", rowStr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
List<object> values = new List<object>();
|
List<object> values = new List<object>();
|
||||||
@@ -86,7 +84,7 @@ namespace BCG
|
|||||||
values.Add(Convert.ChangeType(valueStrs[i], schema.columnInfo[i].colType));
|
values.Add(Convert.ChangeType(valueStrs[i], schema.columnInfo[i].colType));
|
||||||
}
|
}
|
||||||
|
|
||||||
return new BlueRow(schema, values.ToArray());
|
return (new BlueRow(schema, values.ToArray()));
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using BCG.Utilities.General;
|
using BCG.Utilities.General;
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace BCG
|
namespace BCG
|
||||||
@@ -98,7 +97,7 @@ namespace BCG
|
|||||||
// BlueEventLog2.instance().assert(Thread.CurrentThread.ManagedThreadId == _target_thread,
|
// BlueEventLog2.instance().assert(Thread.CurrentThread.ManagedThreadId == _target_thread,
|
||||||
// "onTargetDoWork should only be called from target thread");
|
// "onTargetDoWork should only be called from target thread");
|
||||||
var updates = _queued_updates.dequeueAll();
|
var updates = _queued_updates.dequeueAll();
|
||||||
foreach (var u in updates.ExceptNull()) {
|
foreach (var u in updates) {
|
||||||
if (u.subscription == _current_target_subscription)
|
if (u.subscription == _current_target_subscription)
|
||||||
myFireEvent(u.dp);
|
myFireEvent(u.dp);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
using BCG.Utilities.General;
|
|
||||||
|
|
||||||
using Spark.Core.Diagnostics;
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
using BCG.Utilities.General;
|
||||||
|
|
||||||
namespace BCG {
|
namespace BCG {
|
||||||
public abstract class TimeUnitStream : ViewStream, IWorker {
|
public abstract class TimeUnitStream : ViewStream, IWorker {
|
||||||
protected TimeSpan myOffset;
|
protected TimeSpan myOffset;
|
||||||
@@ -48,8 +46,8 @@ namespace BCG {
|
|||||||
myRoundTime(myZeroTime + new TimeSpan(myOffset.Ticks * periods));
|
myRoundTime(myZeroTime + new TimeSpan(myOffset.Ticks * periods));
|
||||||
|
|
||||||
|
|
||||||
var latestRow = myGetLatestRow();
|
if (myGetLatestRow() == null ||
|
||||||
if (latestRow is null || !ExceptionAssert.Argument.Is<DateTime>(latestRow["time"]).Equals(dt)) {
|
!myGetLatestRow()["time"].Equals(dt)) {
|
||||||
IBlueRow ar = new BlueRow(myCollection.schema,
|
IBlueRow ar = new BlueRow(myCollection.schema,
|
||||||
myId++, dt);
|
myId++, dt);
|
||||||
IBlueRow dr = myCollection.addRowWithReturn(ar);
|
IBlueRow dr = myCollection.addRowWithReturn(ar);
|
||||||
@@ -73,10 +71,11 @@ namespace BCG {
|
|||||||
|
|
||||||
#region Private Helper methods
|
#region Private Helper methods
|
||||||
|
|
||||||
IBlueRow? myGetLatestRow() =>
|
private IBlueRow myGetLatestRow() {
|
||||||
myCollection.Count == 0
|
return myCollection.Count == 0 ?
|
||||||
? null
|
null :
|
||||||
: BlueDataUtility.extractRow(myCollection, myCollection.Count - 1);
|
BlueDataUtility.extractRow(myCollection, myCollection.Count - 1);
|
||||||
|
}
|
||||||
|
|
||||||
private IBlueRowCollection myConvertToCollection(IBlueRow r) {
|
private IBlueRowCollection myConvertToCollection(IBlueRow r) {
|
||||||
BlueTable retVal = new BlueTable(myCollection.schema);
|
BlueTable retVal = new BlueTable(myCollection.schema);
|
||||||
|
|||||||
@@ -1,42 +1,43 @@
|
|||||||
namespace BCG;
|
using System;
|
||||||
|
|
||||||
public class TopStream : MethodDrivenStream {
|
namespace BCG {
|
||||||
int myTopCount;
|
public class TopStream : MethodDrivenStream {
|
||||||
|
private int myTopCount;
|
||||||
|
|
||||||
public TopStream(ViewStream stream, int topCount)
|
public TopStream(ViewStream stream, int topCount) : base(stream) { myTopCount = topCount; }
|
||||||
: base(stream) =>
|
|
||||||
myTopCount = topCount;
|
|
||||||
|
|
||||||
public TopStream(ViewStream stream, int topCount, string sortExpression)
|
public TopStream(ViewStream stream,
|
||||||
: this(sortExpression is null ? stream : new SortStream(stream, sortExpression), topCount) { }
|
int topCount,
|
||||||
|
string sortExpression)
|
||||||
|
:
|
||||||
|
this(sortExpression == null ?
|
||||||
|
stream :
|
||||||
|
new SortStream(stream, sortExpression), topCount) { }
|
||||||
|
|
||||||
protected override void myOnTableClear() {
|
protected override void myOnTableClear() {
|
||||||
requireLastFiredPacket();
|
myLastFiredPacket.deletedRows = myLastFiredPacket.newRows;
|
||||||
myLastFiredPacket.deletedRows = myLastFiredPacket.newRows;
|
myLastFiredPacket.newRows = new OrderedBlueTable(myLastFiredPacket.deletedRows.schema);
|
||||||
myLastFiredPacket.newRows = new OrderedBlueTable(myLastFiredPacket.deletedRows.schema);
|
myLastFiredPacket.addedRows = new OrderedBlueTable(myLastFiredPacket.deletedRows.schema);
|
||||||
myLastFiredPacket.addedRows = new OrderedBlueTable(myLastFiredPacket.deletedRows.schema);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
protected override void myHandleFirstCall() {
|
protected override void myHandleFirstCall() {
|
||||||
requireLastArrivedPacket();
|
myLastFiredPacket = new DataPacket();
|
||||||
myLastFiredPacket = new DataPacket();
|
myLastFiredPacket.newRows = new OrderedBlueTable(myLastArrivedPacket.newRows, myTopCount);
|
||||||
myLastFiredPacket.newRows = new OrderedBlueTable(myLastArrivedPacket.newRows, myTopCount);
|
myLastFiredPacket.addedRows = new OrderedBlueTable(myLastFiredPacket.newRows);
|
||||||
myLastFiredPacket.addedRows = new OrderedBlueTable(myLastFiredPacket.newRows);
|
myLastFiredPacket.deletedRows = new OrderedBlueTable(myLastFiredPacket.newRows.schema);
|
||||||
myLastFiredPacket.deletedRows = new OrderedBlueTable(myLastFiredPacket.newRows.schema);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
protected override void myHandleIncrementalAdd() { }
|
protected override void myHandleIncrementalAdd() { }
|
||||||
|
|
||||||
protected override void myHandleIncrementalDelete() {
|
protected override void myHandleIncrementalDelete() {
|
||||||
requireLastArrivedPacket();
|
IBlueRowCollection oldRows = myLastFiredPacket.newRows;
|
||||||
requireLastFiredPacket();
|
myLastFiredPacket.newRows = new OrderedBlueTable(myLastArrivedPacket.newRows, myTopCount);
|
||||||
IBlueRowCollection oldRows = myLastFiredPacket.newRows;
|
BlueDataUtility.computeDifferences(myLastFiredPacket.newRows,
|
||||||
myLastFiredPacket.newRows = new OrderedBlueTable(myLastArrivedPacket.newRows, myTopCount);
|
oldRows,
|
||||||
BlueDataUtility.computeDifferences(myLastFiredPacket.newRows,
|
myLastFiredPacket.schema.columnNames,
|
||||||
oldRows,
|
out myLastFiredPacket.deletedRows,
|
||||||
myLastFiredPacket.schema.columnNames,
|
out myLastFiredPacket.addedRows);
|
||||||
out myLastFiredPacket.deletedRows,
|
myFireSwitch = myLastFiredPacket.addedRows.Count + myLastFiredPacket.deletedRows.Count == 0 ? false : true;
|
||||||
out myLastFiredPacket.addedRows);
|
}
|
||||||
myFireSwitch = myLastFiredPacket.addedRows.Count + myLastFiredPacket.deletedRows.Count == 0 ? false : true;
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
|
||||||
namespace BCG {
|
namespace BCG {
|
||||||
|
|
||||||
public class AlphabetizeColumnsStream : ViewStream {
|
public class AlphabetizeColumnsStream : ViewStream {
|
||||||
private ViewStream mySrc;
|
private ViewStream mySrc;
|
||||||
IBlueTableSchema? mySchema = null;
|
private IBlueTableSchema mySchema = null;
|
||||||
|
|
||||||
public AlphabetizeColumnsStream(ViewStream src) {
|
public AlphabetizeColumnsStream(ViewStream src) {
|
||||||
mySrc = src;
|
mySrc = src;
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
using System.Linq;
|
using System;
|
||||||
|
|
||||||
namespace BCG
|
namespace BCG
|
||||||
{
|
{
|
||||||
public class AppendStreamModified : ViewStream
|
public class AppendStreamModified : ViewStream
|
||||||
{
|
{
|
||||||
private AppendCollection myColl = new AppendCollection ();
|
private AppendCollection myColl = new AppendCollection ();
|
||||||
ViewStream? myLeftStream, myRightstream;
|
private ViewStream myLeftStream, myRightstream;
|
||||||
|
|
||||||
public AppendStreamModified (ViewStream leftStream, ViewStream rightStream)
|
public AppendStreamModified (ViewStream leftStream, ViewStream rightStream)
|
||||||
{
|
{
|
||||||
myLeftStream = leftStream;
|
myLeftStream = leftStream;
|
||||||
@@ -15,24 +15,11 @@ namespace BCG
|
|||||||
|
|
||||||
public AppendStreamModified (ViewStream[] vss)
|
public AppendStreamModified (ViewStream[] vss)
|
||||||
{
|
{
|
||||||
switch (vss.Length) {
|
|
||||||
case 0:
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
mySetRealSource (vss[0]);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
mySetRealSource(
|
|
||||||
vss[1..].Aggregate(
|
|
||||||
new AppendStreamModified(new[] { vss[0] }),
|
|
||||||
(asm, vs) => new AppendStreamModified(asm, vs)));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (vss.Length == 1)
|
if (vss.Length == 1)
|
||||||
mySetRealSource (vss[0]);
|
mySetRealSource (vss[0]);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AppendStreamModified? rv = null;
|
AppendStreamModified rv = null;
|
||||||
foreach (ViewStream s in vss)
|
foreach (ViewStream s in vss)
|
||||||
rv = rv == null ? new AppendStreamModified (new ViewStream[] {s}) : new AppendStreamModified (rv, s);
|
rv = rv == null ? new AppendStreamModified (new ViewStream[] {s}) : new AppendStreamModified (rv, s);
|
||||||
mySetRealSource (rv);
|
mySetRealSource (rv);
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ using Bts.DataStreamCore;
|
|||||||
using Bts.DataStreamExpressions;
|
using Bts.DataStreamExpressions;
|
||||||
using Bts.PubSub;
|
using Bts.PubSub;
|
||||||
|
|
||||||
|
using global::Spark.Core.Disposables;
|
||||||
|
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
using Spark.Core.Disposables;
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using Bts.PubSub.Services;
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
|
|
||||||
|
using Spark.Api.MarketData;
|
||||||
using Spark.Api.Services;
|
using Spark.Api.Services;
|
||||||
using Spark.Core.Services;
|
using Spark.Core.Services;
|
||||||
|
|
||||||
|
|||||||
@@ -43,14 +43,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Net", "..\cs\Bts.Net\Bt
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.IO.Compression", "..\cs\Bts.IO.Compression\Bts.IO.Compression.csproj", "{3BF059B0-51C0-44A8-8297-9B7464DC5BA3}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.IO.Compression", "..\cs\Bts.IO.Compression\Bts.IO.Compression.csproj", "{3BF059B0-51C0-44A8-8297-9B7464DC5BA3}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Collections", "..\cs\Bts.Collections\Bts.Collections.csproj", "{ADBEBCB3-5367-431B-AFC8-F57CAF9F029D}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Core", "..\cs\Bts.Core\Bts.Core.csproj", "{4E3D817D-9A0A-40F4-A1A1-4865375F40DD}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Disposables", "..\cs\Bts.Disposables\Bts.Disposables.csproj", "{ED034E82-07F4-473D-9C3A-F5EF9C961CFD}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Numerics", "..\cs\Bts.Numerics\Bts.Numerics.csproj", "{9A3E289A-3A88-4A76-AD0B-32C12EBA1B8B}"
|
|
||||||
EndProject
|
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -301,54 +293,6 @@ Global
|
|||||||
{3BF059B0-51C0-44A8-8297-9B7464DC5BA3}.Release|x64.Build.0 = Release|Any CPU
|
{3BF059B0-51C0-44A8-8297-9B7464DC5BA3}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{3BF059B0-51C0-44A8-8297-9B7464DC5BA3}.Release|x86.ActiveCfg = Release|Any CPU
|
{3BF059B0-51C0-44A8-8297-9B7464DC5BA3}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{3BF059B0-51C0-44A8-8297-9B7464DC5BA3}.Release|x86.Build.0 = Release|Any CPU
|
{3BF059B0-51C0-44A8-8297-9B7464DC5BA3}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{ADBEBCB3-5367-431B-AFC8-F57CAF9F029D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{ADBEBCB3-5367-431B-AFC8-F57CAF9F029D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{ADBEBCB3-5367-431B-AFC8-F57CAF9F029D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{ADBEBCB3-5367-431B-AFC8-F57CAF9F029D}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{ADBEBCB3-5367-431B-AFC8-F57CAF9F029D}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{ADBEBCB3-5367-431B-AFC8-F57CAF9F029D}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{ADBEBCB3-5367-431B-AFC8-F57CAF9F029D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{ADBEBCB3-5367-431B-AFC8-F57CAF9F029D}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{ADBEBCB3-5367-431B-AFC8-F57CAF9F029D}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{ADBEBCB3-5367-431B-AFC8-F57CAF9F029D}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{ADBEBCB3-5367-431B-AFC8-F57CAF9F029D}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{ADBEBCB3-5367-431B-AFC8-F57CAF9F029D}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{4E3D817D-9A0A-40F4-A1A1-4865375F40DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{4E3D817D-9A0A-40F4-A1A1-4865375F40DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{4E3D817D-9A0A-40F4-A1A1-4865375F40DD}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{4E3D817D-9A0A-40F4-A1A1-4865375F40DD}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{4E3D817D-9A0A-40F4-A1A1-4865375F40DD}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{4E3D817D-9A0A-40F4-A1A1-4865375F40DD}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{4E3D817D-9A0A-40F4-A1A1-4865375F40DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{4E3D817D-9A0A-40F4-A1A1-4865375F40DD}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{4E3D817D-9A0A-40F4-A1A1-4865375F40DD}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{4E3D817D-9A0A-40F4-A1A1-4865375F40DD}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{4E3D817D-9A0A-40F4-A1A1-4865375F40DD}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{4E3D817D-9A0A-40F4-A1A1-4865375F40DD}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{ED034E82-07F4-473D-9C3A-F5EF9C961CFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{ED034E82-07F4-473D-9C3A-F5EF9C961CFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{ED034E82-07F4-473D-9C3A-F5EF9C961CFD}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{ED034E82-07F4-473D-9C3A-F5EF9C961CFD}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{ED034E82-07F4-473D-9C3A-F5EF9C961CFD}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{ED034E82-07F4-473D-9C3A-F5EF9C961CFD}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{ED034E82-07F4-473D-9C3A-F5EF9C961CFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{ED034E82-07F4-473D-9C3A-F5EF9C961CFD}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{ED034E82-07F4-473D-9C3A-F5EF9C961CFD}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{ED034E82-07F4-473D-9C3A-F5EF9C961CFD}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{ED034E82-07F4-473D-9C3A-F5EF9C961CFD}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{ED034E82-07F4-473D-9C3A-F5EF9C961CFD}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{9A3E289A-3A88-4A76-AD0B-32C12EBA1B8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{9A3E289A-3A88-4A76-AD0B-32C12EBA1B8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{9A3E289A-3A88-4A76-AD0B-32C12EBA1B8B}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{9A3E289A-3A88-4A76-AD0B-32C12EBA1B8B}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{9A3E289A-3A88-4A76-AD0B-32C12EBA1B8B}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{9A3E289A-3A88-4A76-AD0B-32C12EBA1B8B}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{9A3E289A-3A88-4A76-AD0B-32C12EBA1B8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{9A3E289A-3A88-4A76-AD0B-32C12EBA1B8B}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{9A3E289A-3A88-4A76-AD0B-32C12EBA1B8B}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{9A3E289A-3A88-4A76-AD0B-32C12EBA1B8B}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{9A3E289A-3A88-4A76-AD0B-32C12EBA1B8B}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{9A3E289A-3A88-4A76-AD0B-32C12EBA1B8B}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using BCG.Utilities.General;
|
|||||||
|
|
||||||
using Bts.DataStreamCore;
|
using Bts.DataStreamCore;
|
||||||
|
|
||||||
using Spark.Core.Collections;
|
using global::Spark.Core.Collections;
|
||||||
|
|
||||||
public class TestDriverStream : ViewStream, IWorker {
|
public class TestDriverStream : ViewStream, IWorker {
|
||||||
readonly IBlueTableSchema schema;
|
readonly IBlueTableSchema schema;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ namespace BCG {
|
|||||||
/// with PubSub, as some clients are still using ManagedSubcribers)
|
/// with PubSub, as some clients are still using ManagedSubcribers)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ManagedSubscriber : IManagedSubscriber, IWorker, IDisposable {
|
public class ManagedSubscriber : IManagedSubscriber, IWorker, IDisposable {
|
||||||
|
private static ManagedSubscriber? _self;
|
||||||
private ISubscriberCore _subcore;
|
private ISubscriberCore _subcore;
|
||||||
// private IDictionary myTypedDispatchTable = new Hashtable(),
|
// private IDictionary myTypedDispatchTable = new Hashtable(),
|
||||||
// myRawDispatchTable = new Hashtable();
|
// myRawDispatchTable = new Hashtable();
|
||||||
@@ -33,6 +34,7 @@ namespace BCG {
|
|||||||
ManagedSubscriber(ISubscriberCore subsCore) { _subcore = subsCore; }
|
ManagedSubscriber(ISubscriberCore subsCore) { _subcore = subsCore; }
|
||||||
|
|
||||||
public void doWork() {
|
public void doWork() {
|
||||||
|
var msg_map = new Dictionary<string, List<bts.PubSubServerMessage>>();
|
||||||
var updates = _subcore.get_updates(TimeSpan.Zero);
|
var updates = _subcore.get_updates(TimeSpan.Zero);
|
||||||
if (updates.Count() == 0)
|
if (updates.Count() == 0)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -45,7 +45,11 @@ namespace BCG
|
|||||||
get { return myConnInfo; }
|
get { return myConnInfo; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString() =>
|
override public string ToString()
|
||||||
$"type: {myMsgType} conn: {myConnInfo} msg: {myMsg?.Length ?? 0}";
|
{
|
||||||
|
Func<byte[], int> len = (byte[] m) => { return m == null ? 0 : m.Length; };
|
||||||
|
return $"type: {myMsgType} conn: {myConnInfo} msg: {len(myMsg)}";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,7 @@ namespace bts {
|
|||||||
System.Threading.Thread.Sleep(TimeSpan.FromSeconds(5));
|
System.Threading.Thread.Sleep(TimeSpan.FromSeconds(5));
|
||||||
_accept_socket.BeginAccept(new AsyncCallback(_on_accept), new object[] { });
|
_accept_socket.BeginAccept(new AsyncCallback(_on_accept), new object[] { });
|
||||||
if (ex is OutOfMemoryException)
|
if (ex is OutOfMemoryException)
|
||||||
throw;
|
throw ex;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
new_sock.LingerState = new LingerOption(false, 0);
|
new_sock.LingerState = new LingerOption(false, 0);
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
using bts;
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Collections;
|
||||||
|
using bts;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
namespace BCG {
|
namespace BCG {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -68,8 +69,7 @@ namespace BCG {
|
|||||||
|
|
||||||
public static byte[] getBytesFromStream(params Stream[] streams) {
|
public static byte[] getBytesFromStream(params Stream[] streams) {
|
||||||
long totalSize = 0;
|
long totalSize = 0;
|
||||||
using var ms = new MemoryStream();
|
BinaryWriter bw = new BinaryWriter(new MemoryStream());
|
||||||
using var bw = new BinaryWriter(ms, Encoding.UTF8, true);
|
|
||||||
foreach (Stream s in streams)
|
foreach (Stream s in streams)
|
||||||
totalSize += s.Length - s.Position;
|
totalSize += s.Length - s.Position;
|
||||||
bw.Write(Convert.ToInt32(totalSize));
|
bw.Write(Convert.ToInt32(totalSize));
|
||||||
@@ -78,8 +78,7 @@ namespace BCG {
|
|||||||
int lengthToReadForThisStream = Convert.ToInt32(s.Length - s.Position);
|
int lengthToReadForThisStream = Convert.ToInt32(s.Length - s.Position);
|
||||||
bw.Write(br.ReadBytes(lengthToReadForThisStream));
|
bw.Write(br.ReadBytes(lengthToReadForThisStream));
|
||||||
}
|
}
|
||||||
bw.Flush();
|
return (bw.BaseStream as MemoryStream).ToArray();
|
||||||
return ms.ToArray();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static byte[] read_bytes(Stream str) {
|
public static byte[] read_bytes(Stream str) {
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ namespace BCG {
|
|||||||
|
|
||||||
public void publish(PubSubClientMessage msg) {
|
public void publish(PubSubClientMessage msg) {
|
||||||
Log.assert(msg.msg_type == PubSubMessageType.PUBLISH);
|
Log.assert(msg.msg_type == PubSubMessageType.PUBLISH);
|
||||||
Log.assert(!string.IsNullOrEmpty(msg.pub_msg?.tag_type));
|
Log.assert(!String.IsNullOrEmpty(msg.pub_msg.tag_type));
|
||||||
bts.Log.Gen.info($"PublisherCore.publish msg: {msg}");
|
bts.Log.Gen.info($"PublisherCore.publish msg: {msg}");
|
||||||
_main_queue.enqueue(msg);
|
_main_queue.enqueue(msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ namespace BCG {
|
|||||||
public void doWork() {
|
public void doWork() {
|
||||||
if (_connection_cb != null) {
|
if (_connection_cb != null) {
|
||||||
var conns = _conn_callback_queue.dequeueAll();
|
var conns = _conn_callback_queue.dequeueAll();
|
||||||
foreach (var ci in conns.ExceptNull()) {
|
foreach (var ci in conns) {
|
||||||
_connection_cb(ci.client_url, ci.status);
|
_connection_cb(ci.client_url, ci.status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -175,7 +175,7 @@ namespace BCG {
|
|||||||
case RemoteMessageType.Data:
|
case RemoteMessageType.Data:
|
||||||
// if callback is registered fire it right away, else enqueue it
|
// if callback is registered fire it right away, else enqueue it
|
||||||
if (_data_cb != null)
|
if (_data_cb != null)
|
||||||
_data_cb(sender_rci.ToString(), message.message ?? Array.Empty<byte>());
|
_data_cb(sender_rci.ToString(), message.message);
|
||||||
else
|
else
|
||||||
_received_data_queue.enqueue(new Pair<string, byte[]>(sender_rci.ToString(), message.message));
|
_received_data_queue.enqueue(new Pair<string, byte[]>(sender_rci.ToString(), message.message));
|
||||||
break;
|
break;
|
||||||
@@ -258,7 +258,7 @@ namespace BCG {
|
|||||||
// (which gets called in another thread)
|
// (which gets called in another thread)
|
||||||
private void _handle_new_connections() {
|
private void _handle_new_connections() {
|
||||||
var new_conns = _new_connections.dequeueAll();
|
var new_conns = _new_connections.dequeueAll();
|
||||||
foreach (var conn in new_conns.ExceptNull()) {
|
foreach (ITCPConnection conn in new_conns) {
|
||||||
var peer_rci = conn.get_peer_address();
|
var peer_rci = conn.get_peer_address();
|
||||||
bts.Log.Gen.info($"ManagedTCPMessageHub._handle_new_connections conn: {conn}");
|
bts.Log.Gen.info($"ManagedTCPMessageHub._handle_new_connections conn: {conn}");
|
||||||
///to stop it from being garbabge collected immediatly
|
///to stop it from being garbabge collected immediatly
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ public interface IPubSubState {
|
|||||||
|
|
||||||
ICollection<string> all_tags { get; }
|
ICollection<string> all_tags { get; }
|
||||||
|
|
||||||
byte[]? get_content(string tag);
|
byte[] get_content(string tag);
|
||||||
string? getTagType(string tag);
|
string getTagType(string tag);
|
||||||
void get_all_connections(
|
void get_all_connections(
|
||||||
string tag,
|
string tag,
|
||||||
out Dictionary<string, string> subscribers,
|
out Dictionary<string, string> subscribers,
|
||||||
|
|||||||
@@ -188,11 +188,11 @@ namespace BCG {
|
|||||||
_state.handle_sub(sub_msg); // state keeps the list of all subscribers
|
_state.handle_sub(sub_msg); // state keeps the list of all subscribers
|
||||||
///to all these new subscriber s, send the existing data
|
///to all these new subscriber s, send the existing data
|
||||||
foreach (string tag in sub_msg.tags.empty_if_null()) {
|
foreach (string tag in sub_msg.tags.empty_if_null()) {
|
||||||
byte[]? data = _state.get_content(tag);
|
byte[] data = _state.get_content(tag);
|
||||||
//ie data has been published once
|
//ie data has been published once
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
bts.Log.Gen.info($"ManagedTCPMessgeHub._handle_sub get_content tag: {tag} data len: {data.Length}");
|
bts.Log.Gen.info($"ManagedTCPMessgeHub._handle_sub get_content tag: {tag} data len: {data.Length}");
|
||||||
string? tag_type_ = _state.getTagType(tag);
|
string tag_type_ = _state.getTagType(tag);
|
||||||
var msg_to_send = new PubSubServerMessage() {
|
var msg_to_send = new PubSubServerMessage() {
|
||||||
tag = tag,
|
tag = tag,
|
||||||
tag_type = tag_type_,
|
tag_type = tag_type_,
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ namespace BCG {
|
|||||||
return new string[] { };
|
return new string[] { };
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[]? get_content(string tag) {
|
public byte[] get_content(string tag) {
|
||||||
if (!_tag_to_data_map.ContainsKey(tag))
|
if (!_tag_to_data_map.ContainsKey(tag))
|
||||||
return null;
|
return null;
|
||||||
var rv = _tag_to_data_map[tag].get_current_content();
|
var rv = _tag_to_data_map[tag].get_current_content();
|
||||||
@@ -157,7 +157,7 @@ namespace BCG {
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string? getTagType(string tag) {
|
public string getTagType(string tag) {
|
||||||
if (!_tag_to_data_map.ContainsKey(tag))
|
if (!_tag_to_data_map.ContainsKey(tag))
|
||||||
return null;
|
return null;
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace bts {
|
|||||||
public class SingleTagData {
|
public class SingleTagData {
|
||||||
private readonly IPubSubServerTagHandler? _tag_handler;
|
private readonly IPubSubServerTagHandler? _tag_handler;
|
||||||
|
|
||||||
public SingleTagData(string tag, string tag_type, IPubSubServerTagHandler? tag_handler) {
|
public SingleTagData(string tag, string tag_type, IPubSubServerTagHandler tag_handler) {
|
||||||
bts.Log.Gen.info($"SingleTagData constructed for tag: {tag} tag_type: {tag_type}");
|
bts.Log.Gen.info($"SingleTagData constructed for tag: {tag} tag_type: {tag_type}");
|
||||||
this.tag = tag;
|
this.tag = tag;
|
||||||
this.tag_type = tag_type;
|
this.tag_type = tag_type;
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ namespace BCG {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onConnection(ITCPConnection connection) {
|
public void onConnection(ITCPConnection connection) {
|
||||||
|
string ip; int port;
|
||||||
var peer_rci = connection.get_peer_address();
|
var peer_rci = connection.get_peer_address();
|
||||||
bts.Log.Gen.info($"SimpleTCPClient.onConnection connected to server: {peer_rci}, starting task to send data in a loop");
|
bts.Log.Gen.info($"SimpleTCPClient.onConnection connected to server: {peer_rci}, starting task to send data in a loop");
|
||||||
if (_listener != null) {
|
if (_listener != null) {
|
||||||
|
|||||||
@@ -5,10 +5,9 @@ using BCG;
|
|||||||
using bts.api;
|
using bts.api;
|
||||||
using bts.md;
|
using bts.md;
|
||||||
|
|
||||||
using Bts.DataStream;
|
|
||||||
using Bts.DataStreamCore;
|
using Bts.DataStreamCore;
|
||||||
|
|
||||||
using Spark.Api.MarketData;
|
using global::Spark.Api.MarketData;
|
||||||
|
|
||||||
public class BookSchemaBuilder {
|
public class BookSchemaBuilder {
|
||||||
public int NumLevels { get; set; } = 5;
|
public int NumLevels { get; set; } = 5;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ namespace Bts.SharedStreams;
|
|||||||
|
|
||||||
using bts.api;
|
using bts.api;
|
||||||
|
|
||||||
using Spark.Api.Orders;
|
using global::Spark.Api.Orders;
|
||||||
|
|
||||||
public static class WellKnownColumns {
|
public static class WellKnownColumns {
|
||||||
public static (string Name, Type Type) AskNotional => (WellKnownColumnNames.AskNotional, typeof(double));
|
public static (string Name, Type Type) AskNotional => (WellKnownColumnNames.AskNotional, typeof(double));
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
[DataStreamUserRespresentation("nl")]
|
[DataStreamUserRespresentation("nl")]
|
||||||
public class BlueOrbNLStream : ViewStream {
|
public class BlueOrbNLStream : ViewStream {
|
||||||
private readonly string _nl_prompt;
|
private readonly string _nl_prompt;
|
||||||
private ViewStream? _nl_to_dsl_stream, _dsl_stream;
|
private ViewStream _nl_to_dsl_stream, _dsl_stream;
|
||||||
private IDictionary<string, object> _dp_metadata = new Dictionary<string, object>();
|
private IDictionary<string, object> _dp_metadata = new Dictionary<string, object>();
|
||||||
public BlueOrbNLStream(string nl_prompt) {
|
public BlueOrbNLStream(string nl_prompt) {
|
||||||
_nl_prompt = nl_prompt;
|
_nl_prompt = nl_prompt;
|
||||||
|
|||||||
@@ -85,8 +85,7 @@ namespace bts.BlueOrb {
|
|||||||
.GetProperty("choices")[0]
|
.GetProperty("choices")[0]
|
||||||
.GetProperty("message")
|
.GetProperty("message")
|
||||||
.GetProperty("content")
|
.GetProperty("content")
|
||||||
.GetString()
|
.GetString();
|
||||||
?? string.Empty;
|
|
||||||
|
|
||||||
//return gpt_response;
|
//return gpt_response;
|
||||||
DateTime t1 = DateTime.Now;
|
DateTime t1 = DateTime.Now;
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ using BCG.Utilities.General;
|
|||||||
using Bts.PubSub;
|
using Bts.PubSub;
|
||||||
using Bts.SharedStreams.Tables;
|
using Bts.SharedStreams.Tables;
|
||||||
|
|
||||||
using Spark.Core.Diagnostics;
|
|
||||||
|
|
||||||
namespace bts {
|
namespace bts {
|
||||||
// TODO: Use dependency injection to instantiate this stream, and others like it that depend on
|
// TODO: Use dependency injection to instantiate this stream, and others like it that depend on
|
||||||
// ISubscriberCore(Factory). Until then, hide it from DSQA.
|
// ISubscriberCore(Factory). Until then, hide it from DSQA.
|
||||||
@@ -42,7 +40,7 @@ namespace bts {
|
|||||||
foreach (var u in updates) {
|
foreach (var u in updates) {
|
||||||
if (u.tag != "System_AllStatistics")
|
if (u.tag != "System_AllStatistics")
|
||||||
continue;
|
continue;
|
||||||
var tag_infos = TagStatsInfo.deserialize(ExceptionAssert.NotNull(u.data));
|
var tag_infos = TagStatsInfo.deserialize(u.data);
|
||||||
foreach (var ti in tag_infos) {
|
foreach (var ti in tag_infos) {
|
||||||
_tag_map[ti.tag] = ti;
|
_tag_map[ti.tag] = ti;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,4 +187,32 @@
|
|||||||
Name="Test"
|
Name="Test"
|
||||||
DependsOnTargets="Build"></Target>
|
DependsOnTargets="Build"></Target>
|
||||||
|
|
||||||
|
<ItemGroup Condition="Exists('@(NativeWindowsAsset)')">
|
||||||
|
<Content Include="@(NativeWindowsAsset)">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
<TargetPath>%(FileName)%(Extension)</TargetPath>
|
||||||
|
<Pack>false</Pack>
|
||||||
|
</Content>
|
||||||
|
<Content Include="@(NativeWindowsAsset)">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
<TargetPath>runtimes/win-x64/native/%(FileName)%(Extension)</TargetPath>
|
||||||
|
<Pack>true</Pack>
|
||||||
|
<PackagePath>runtimes/win-x64/native</PackagePath>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="Exists('@(NativeLinuxAsset)')">
|
||||||
|
<Content Include="@(NativeLinuxAsset)">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
<TargetPath>%(FileName)%(Extension)</TargetPath>
|
||||||
|
<Pack>false</Pack>
|
||||||
|
</Content>
|
||||||
|
<Content Include="@(NativeLinuxAsset)">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
<TargetPath>runtimes/linux-x64/native/%(FileName)%(Extension)</TargetPath>
|
||||||
|
<Pack>true</Pack>
|
||||||
|
<PackagePath>runtimes/linux-x64/native</PackagePath>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -2,12 +2,14 @@ ARG IMAGE="sparkd"
|
|||||||
ARG CONFIG_DIR="src/app_sparkd/configurations/dev"
|
ARG CONFIG_DIR="src/app_sparkd/configurations/dev"
|
||||||
ARG SOURCE_DIR="install/sparkd-release-gcc"
|
ARG SOURCE_DIR="install/sparkd-release-gcc"
|
||||||
ARG PYTHON_REQUIREMENTS="requirements.txt"
|
ARG PYTHON_REQUIREMENTS="requirements.txt"
|
||||||
|
ARG SPARKD_ENTRYPOINT="src/app_sparkd/sparkd-entrypoint.sh"
|
||||||
|
|
||||||
# sparkd_base
|
# sparkd_base
|
||||||
FROM bluetradingsystems/linux_dotnet8 AS sparkd_base
|
FROM bluetradingsystems/linux_dotnet8 AS sparkd_base
|
||||||
ARG CONFIG_DIR
|
ARG CONFIG_DIR
|
||||||
ARG SOURCE_DIR
|
ARG SOURCE_DIR
|
||||||
ARG PYTHON_REQUIREMENTS
|
ARG PYTHON_REQUIREMENTS
|
||||||
|
ARG SPARKD_ENTRYPOINT
|
||||||
|
|
||||||
USER "root"
|
USER "root"
|
||||||
RUN apt-get update && apt-get install -y liblttng-ust-dev
|
RUN apt-get update && apt-get install -y liblttng-ust-dev
|
||||||
@@ -21,6 +23,7 @@ RUN pip3 install -r "/home/bts/bin/requirements.txt"
|
|||||||
USER "bts"
|
USER "bts"
|
||||||
COPY --chown=bts:bts "${SOURCE_DIR}" "."
|
COPY --chown=bts:bts "${SOURCE_DIR}" "."
|
||||||
COPY --chown=bts:bts "${CONFIG_DIR}" "/home/bts/.local/share/bts/sparkd/conf"
|
COPY --chown=bts:bts "${CONFIG_DIR}" "/home/bts/.local/share/bts/sparkd/conf"
|
||||||
|
COPY --chown=bts:bts "${SPARKD_ENTRYPOINT}" "/home/bts/bin/sparkd-entrypoint.sh"
|
||||||
WORKDIR "/home/bts/bin"
|
WORKDIR "/home/bts/bin"
|
||||||
|
|
||||||
# sparkd
|
# sparkd
|
||||||
@@ -35,6 +38,7 @@ COPY --chown=bts:bts "${MD_RECORDING_DIR}" "/home/bts/.local/share/bts/sparkd/da
|
|||||||
FROM bluetradingsystems/linux_dotnet8 AS sparkd_symbols
|
FROM bluetradingsystems/linux_dotnet8 AS sparkd_symbols
|
||||||
ARG SOURCE_DIR
|
ARG SOURCE_DIR
|
||||||
ARG PYTHON_REQUIREMENTS="requirements.txt"
|
ARG PYTHON_REQUIREMENTS="requirements.txt"
|
||||||
|
ARG SPARKD_ENTRYPOINT
|
||||||
|
|
||||||
USER "root"
|
USER "root"
|
||||||
RUN apt-get update && apt-get install -y liblttng-ust-dev
|
RUN apt-get update && apt-get install -y liblttng-ust-dev
|
||||||
@@ -47,6 +51,7 @@ RUN pip3 install -r "/home/bts/bin/requirements.txt"
|
|||||||
|
|
||||||
USER "bts"
|
USER "bts"
|
||||||
COPY --chown=bts:bts "${SOURCE_DIR}" "."
|
COPY --chown=bts:bts "${SOURCE_DIR}" "."
|
||||||
|
COPY --chown=bts:bts "${SPARKD_ENTRYPOINT}" "/home/bts/bin/sparkd-entrypoint.sh"
|
||||||
WORKDIR "/home/bts/bin"
|
WORKDIR "/home/bts/bin"
|
||||||
|
|
||||||
# selected image
|
# selected image
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
SPARKD__CONFIG_DIR=src/app_sparkd/configurations/ophir_sim_live_wb
|
||||||
|
SPARKD__DATA_DIR=/home/wedbushprod/8000/sparkdata/data
|
||||||
|
SPARKD__IMAGE=sparkd_symbols
|
||||||
|
SPARKD__PYTHON_REQUIREMENTS=src/app_sparkd/configurations/ophir_sim_live_wb/requirements.txt
|
||||||
|
SPARKD__RUNTIME_CONF_DIR=/home/wedbushprod/8000/sparkdata/conf
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
numpy==2.2.6
|
||||||
|
pybit==5.11.0
|
||||||
|
requests==2.31.0
|
||||||
|
websocket-client==1.8.0
|
||||||
|
websockets==15.0.1
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
JetFIX {
|
||||||
|
value {
|
||||||
|
connection {
|
||||||
|
name: "glbx_1"
|
||||||
|
venue: VENUE_GLBX
|
||||||
|
max_order_msgs_per_window: 300
|
||||||
|
window_duration_msecs: 1000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PublisherOptions {
|
||||||
|
value {
|
||||||
|
network_interface_a: 'enp193s0f0np0'
|
||||||
|
network_interface_b: 'enp193s0f0np0'
|
||||||
|
#these get overriden if not entered here
|
||||||
|
heartbeat_ms: 5000
|
||||||
|
heartbeat_boot_seconds: 60
|
||||||
|
skip_options: false
|
||||||
|
hot_initial: 1024
|
||||||
|
hot_growth: 1024
|
||||||
|
cold_initial: 8192
|
||||||
|
cold_growth: 2048
|
||||||
|
channel_prefix: ""
|
||||||
|
disable_heartbeat: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CMEOptions {
|
||||||
|
value {
|
||||||
|
feed_engine {
|
||||||
|
name: "mdp3feed"
|
||||||
|
spin_time: 0
|
||||||
|
channels_per_thread: 3
|
||||||
|
data_wait: 10
|
||||||
|
udp_socket_buffer_size: 268435456
|
||||||
|
}
|
||||||
|
channel {
|
||||||
|
id: "*"
|
||||||
|
feed_engine: "mdp3feed"
|
||||||
|
use_tcp_replay: false
|
||||||
|
recovery_queue_size: 640000
|
||||||
|
lost_packet_wait_timeout_ms: 10
|
||||||
|
onixs_log_mode: CME_ONIXS_LOG_MODE_UNSPECIFIED:q
|
||||||
|
#max_gap_recovery_cache_size: 4
|
||||||
|
use_natural_refresh: false
|
||||||
|
join_snapshot_on_gap: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Logging {
|
||||||
|
value {
|
||||||
|
initial_queue_size: 120001
|
||||||
|
max_queue_growth: 4
|
||||||
|
console {
|
||||||
|
default_level: "Info"
|
||||||
|
subsystem {
|
||||||
|
name: "md"
|
||||||
|
level: "Info"
|
||||||
|
}
|
||||||
|
subsystem {
|
||||||
|
name: "OrderMan"
|
||||||
|
level: "Info"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MarketDataConfig {
|
||||||
|
value {
|
||||||
|
glbx {
|
||||||
|
unique_check_value: 15
|
||||||
|
use_databento: false
|
||||||
|
}
|
||||||
|
recording{
|
||||||
|
venue: VENUE_GLBX
|
||||||
|
num_of_seconds_to_run_file_writer: 300
|
||||||
|
num_of_seconds_to_run_db_writer : 0
|
||||||
|
n_book_levels: 10
|
||||||
|
batch_size: 100 #for the db writer
|
||||||
|
enable_book_recording: true
|
||||||
|
enable_trade_recording: true
|
||||||
|
enable_bbo_recording: false
|
||||||
|
enable_tbbo_recording: false
|
||||||
|
enable_misc_recording: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# JetFIX {
|
||||||
|
# value {
|
||||||
|
# #connection: @JetFIXSimConnection.sim
|
||||||
|
# connection {
|
||||||
|
# name: "mlx_004_54"
|
||||||
|
# venue: VENUE_GLBX
|
||||||
|
# socket_connect_host_ip: "69.50.112.191"
|
||||||
|
# socket_connect_port: 42876
|
||||||
|
# sender_compid: "MLX004"
|
||||||
|
# target_compid: "CME"
|
||||||
|
# target_subid: "54"
|
||||||
|
# cme_market_segment_id: 54
|
||||||
|
# start_time: "00:10:00"
|
||||||
|
# end_time: "23:55:00"
|
||||||
|
# start_day: "sunday"
|
||||||
|
# end_day: "friday"
|
||||||
|
# seconds_between_hbs: 30
|
||||||
|
# sender_subid: "BTS"
|
||||||
|
# use_ilink3: true
|
||||||
|
# # raw_data: "S4PMA"
|
||||||
|
# # auto_fix_seq_num: true
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
SymbolLists {
|
||||||
|
value {
|
||||||
|
list {
|
||||||
|
key: "GlbxFutures"
|
||||||
|
symbol: "ES"
|
||||||
|
}
|
||||||
|
list {
|
||||||
|
key: "GlbxOptions"
|
||||||
|
symbol: "E1A"
|
||||||
|
symbol: "E1B"
|
||||||
|
symbol: "E1C"
|
||||||
|
symbol: "E1D"
|
||||||
|
symbol: "E2A"
|
||||||
|
symbol: "E2B"
|
||||||
|
symbol: "E2C"
|
||||||
|
symbol: "E2D"
|
||||||
|
symbol: "E3A"
|
||||||
|
symbol: "E3B"
|
||||||
|
symbol: "E3C"
|
||||||
|
symbol: "E3D"
|
||||||
|
symbol: "E4A"
|
||||||
|
symbol: "E4B"
|
||||||
|
symbol: "E4C"
|
||||||
|
symbol: "E4D"
|
||||||
|
symbol: "E5A"
|
||||||
|
symbol: "E5B"
|
||||||
|
symbol: "E5C"
|
||||||
|
symbol: "E5D"
|
||||||
|
symbol: "EW1"
|
||||||
|
symbol: "EW2"
|
||||||
|
symbol: "EW3"
|
||||||
|
symbol: "EW4"
|
||||||
|
symbol: "ESH9"
|
||||||
|
symbol: "ESZ6"
|
||||||
|
symbol: "ESH0"
|
||||||
|
symbol: "ESM6"
|
||||||
|
symbol: "ESZ7"
|
||||||
|
symbol: "ESH6"
|
||||||
|
symbol: "ESM7"
|
||||||
|
symbol: "ESZ8"
|
||||||
|
symbol: "ESH7"
|
||||||
|
symbol: "ESH8"
|
||||||
|
symbol: "ESU6"
|
||||||
|
symbol: "ESZ5"
|
||||||
|
symbol: "ESZ9"
|
||||||
|
symbol: "E1D"
|
||||||
|
symbol: "ESZ5"
|
||||||
|
symbol: "ES"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Symbols {
|
||||||
|
value {
|
||||||
|
venues {
|
||||||
|
name: "VENUE_GLBX"
|
||||||
|
future: @SymbolLists.list[GlbxFutures].symbol
|
||||||
|
option: @SymbolLists.list[GlbxOptions].symbol
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
SPARKD__CONFIG_DIR=src/app_sparkd/configurations/ophir_sim_replay
|
||||||
|
SPARKD__PYTHON_REQUIREMENTS=src/app_sparkd/configurations/ophir_sim_replay/requirements.txt
|
||||||
|
TZ=America/Chicago
|
||||||
|
SPARKD__MD_RECORDING_DIR=/home/wedbushprod/8000/md_recording
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
requests==2.31.0
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
JetFIX {
|
||||||
|
value {
|
||||||
|
connection {
|
||||||
|
name: "glbx_1"
|
||||||
|
venue: VENUE_GLBX
|
||||||
|
max_order_msgs_per_window: 300
|
||||||
|
window_duration_msecs: 1000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PublisherOptions {
|
||||||
|
value {
|
||||||
|
network_interface: "0.0.0.0"
|
||||||
|
heartbeat_ms: 5000
|
||||||
|
heartbeat_boot_seconds: 60
|
||||||
|
skip_options: true
|
||||||
|
hot_initial: 1024
|
||||||
|
hot_growth: 1024
|
||||||
|
cold_initial: 8192
|
||||||
|
cold_growth: 2048
|
||||||
|
channel_prefix: ""
|
||||||
|
disable_heartbeat: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MarketDataConfig {
|
||||||
|
value {
|
||||||
|
replay {
|
||||||
|
venue: VENUE_GLBX
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
SymbolLists {
|
||||||
|
value {
|
||||||
|
list {
|
||||||
|
key: "GlbxFutures"
|
||||||
|
symbol: "ES"
|
||||||
|
}
|
||||||
|
list {
|
||||||
|
key: "GlbxOptions"
|
||||||
|
symbol: "E1A"
|
||||||
|
symbol: "E1B"
|
||||||
|
symbol: "E1C"
|
||||||
|
symbol: "E1D"
|
||||||
|
symbol: "E2A"
|
||||||
|
symbol: "E2B"
|
||||||
|
symbol: "E2C"
|
||||||
|
symbol: "E2D"
|
||||||
|
symbol: "E3A"
|
||||||
|
symbol: "E3B"
|
||||||
|
symbol: "E3C"
|
||||||
|
symbol: "E3D"
|
||||||
|
symbol: "E4A"
|
||||||
|
symbol: "E4B"
|
||||||
|
symbol: "E4C"
|
||||||
|
symbol: "E4D"
|
||||||
|
symbol: "E5A"
|
||||||
|
symbol: "E5B"
|
||||||
|
symbol: "E5C"
|
||||||
|
symbol: "E5D"
|
||||||
|
symbol: "ES"
|
||||||
|
symbol: "EW1"
|
||||||
|
symbol: "EW2"
|
||||||
|
symbol: "EW3"
|
||||||
|
symbol: "EW4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Symbols {
|
||||||
|
value {
|
||||||
|
venues {
|
||||||
|
name: "VENUE_GLBX"
|
||||||
|
future: @SymbolLists.list[GlbxFutures].symbol
|
||||||
|
option: @SymbolLists.list[GlbxOptions].symbol
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
SPARKD__CONFIG_DIR=src/app_sparkd/configurations/ophir_sim_replay_wb
|
||||||
|
SPARKD__DATA_DIR=/home/wedbushprod/9000/sparkdata/data
|
||||||
|
SPARKD__IMAGE=sparkd_symbols
|
||||||
|
SPARKD__PYTHON_REQUIREMENTS=src/app_sparkd/configurations/ophir_sim_replay_wb/requirements.txt
|
||||||
|
SPARKD__RUNTIME_CONF_DIR=/home/wedbushprod/9000/sparkdata/conf
|
||||||
|
SPARKD__MD_RECORDING_DIR=/home/wedbushprod/md_recording
|
||||||
|
SPARKD__CONFIG_PORT=9000
|
||||||
|
SPARKD__QUICKBUS_PORT=9001
|
||||||
|
SPARKD__SIM_FIX_PORT=9002
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
numpy==2.2.6
|
||||||
|
pybit==5.11.0
|
||||||
|
requests==2.31.0
|
||||||
|
websocket-client==1.8.0
|
||||||
|
websockets==15.0.1
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
JetFIX {
|
||||||
|
value {
|
||||||
|
connection {
|
||||||
|
name: "glbx_1"
|
||||||
|
venue: VENUE_GLBX
|
||||||
|
max_order_msgs_per_window: 300
|
||||||
|
window_duration_msecs: 1000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Ports {
|
||||||
|
value {
|
||||||
|
config_port: 9000
|
||||||
|
qbus_port: 9001
|
||||||
|
glbx_sim_fix_port: 9002
|
||||||
|
ice_sim_fix_port: 9003
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Logging {
|
||||||
|
value {
|
||||||
|
initial_queue_size: 120001
|
||||||
|
max_queue_growth: 4
|
||||||
|
console {
|
||||||
|
default_level: "Info"
|
||||||
|
subsystem {
|
||||||
|
name: "md"
|
||||||
|
level: "Info"
|
||||||
|
}
|
||||||
|
subsystem {
|
||||||
|
name: "OrderMan"
|
||||||
|
level: "Info"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MarketDataConfig {
|
||||||
|
value {
|
||||||
|
replay {
|
||||||
|
venue: VENUE_GLBX
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
SymbolLists {
|
||||||
|
value {
|
||||||
|
list {
|
||||||
|
key: "GlbxFutures"
|
||||||
|
symbol: "ES"
|
||||||
|
}
|
||||||
|
list {
|
||||||
|
key: "GlbxOptions"
|
||||||
|
symbol: "E1A"
|
||||||
|
symbol: "E1B"
|
||||||
|
symbol: "E1C"
|
||||||
|
symbol: "E1D"
|
||||||
|
symbol: "E2A"
|
||||||
|
symbol: "E2B"
|
||||||
|
symbol: "E2C"
|
||||||
|
symbol: "E2D"
|
||||||
|
symbol: "E3A"
|
||||||
|
symbol: "E3B"
|
||||||
|
symbol: "E3C"
|
||||||
|
symbol: "E3D"
|
||||||
|
symbol: "E4A"
|
||||||
|
symbol: "E4B"
|
||||||
|
symbol: "E4C"
|
||||||
|
symbol: "E4D"
|
||||||
|
symbol: "E5A"
|
||||||
|
symbol: "E5B"
|
||||||
|
symbol: "E5C"
|
||||||
|
symbol: "E5D"
|
||||||
|
symbol: "EW1"
|
||||||
|
symbol: "EW2"
|
||||||
|
symbol: "EW3"
|
||||||
|
symbol: "EW4"
|
||||||
|
symbol: "ESH9"
|
||||||
|
symbol: "ESZ6"
|
||||||
|
symbol: "ESH0"
|
||||||
|
symbol: "ESM6"
|
||||||
|
symbol: "ESZ7"
|
||||||
|
symbol: "ESH6"
|
||||||
|
symbol: "ESM7"
|
||||||
|
symbol: "ESZ8"
|
||||||
|
symbol: "ESH7"
|
||||||
|
symbol: "ESH8"
|
||||||
|
symbol: "ESU6"
|
||||||
|
symbol: "ESZ5"
|
||||||
|
symbol: "ESZ9"
|
||||||
|
symbol: "E1D"
|
||||||
|
symbol: "ESZ5"
|
||||||
|
symbol: "ES"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Symbols {
|
||||||
|
value {
|
||||||
|
venues {
|
||||||
|
name: "VENUE_GLBX"
|
||||||
|
future: @SymbolLists.list[GlbxFutures].symbol
|
||||||
|
option: @SymbolLists.list[GlbxOptions].symbol
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+55
@@ -0,0 +1,55 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
init_timezone() {
|
||||||
|
tz="${1:-$TZ}"
|
||||||
|
zoneinfo_dir=/usr/share/zoneinfo
|
||||||
|
if [ -f "$zoneinfo_dir/$tz" -a "$(readlink -f /etc/localtime)" != "$zoneinfo_dir/$tz" ]; then
|
||||||
|
echo "Setting locales and timezone to $tz"
|
||||||
|
if [ -e /etc/localtime ]; then
|
||||||
|
sudo -n rm -f /etc/localtime
|
||||||
|
fi
|
||||||
|
sudo -n ln -snf "$zoneinfo_dir/$tz" /etc/localtime
|
||||||
|
echo $tz | sudo -n tee /etc/timezone > /dev/null
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
load_env() {
|
||||||
|
f="$1"
|
||||||
|
if [ -e "$f" ]; then
|
||||||
|
echo "Sourcing $f"
|
||||||
|
set -a
|
||||||
|
. "$f"
|
||||||
|
set +a
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
symlink() {
|
||||||
|
src="$1"
|
||||||
|
dst="$2"
|
||||||
|
if [ -L "$dst" ]; then
|
||||||
|
rm "$dst"
|
||||||
|
fi
|
||||||
|
ln -s "$src" "$dst"
|
||||||
|
}
|
||||||
|
|
||||||
|
roll_log() {
|
||||||
|
f="$1"
|
||||||
|
if [ -e "$f" ]; then
|
||||||
|
mv "$f" "${f}_$(date '+%Y%m%d-%H%M')"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Acquire sudo permission once for the script (needed for a few calls)
|
||||||
|
echo bts | sudo -S -v
|
||||||
|
data_root="${HOME:-/home/bts}/.local/share/bts/sparkd"
|
||||||
|
sudo -n chown -R bts:bts "$data_root"
|
||||||
|
load_env "$data_root/conf/.env.local"
|
||||||
|
init_timezone "$TZ"
|
||||||
|
roll_log "$data_root/data/logging.sparkd/log"
|
||||||
|
symlink "$data_root/conf/plugins" /home/bts/bin/plugins
|
||||||
|
|
||||||
|
if [ -e "/md_recording" -a ! -e "/home/bts/.local/share/bts/sparkd/data/md_recording" ]; then
|
||||||
|
symlink "/md_recording" /home/bts/.local/share/bts/sparkd/data/md_recording
|
||||||
|
fi
|
||||||
|
|
||||||
|
bash -c "${@:-./sparkd run}"
|
||||||
@@ -17,7 +17,6 @@
|
|||||||
#include "spark/orderman/OrderServiceServer.h"
|
#include "spark/orderman/OrderServiceServer.h"
|
||||||
#include "spark/orderman/events/TradeSummarySignalDispatcher.h"
|
#include "spark/orderman/events/TradeSummarySignalDispatcher.h"
|
||||||
#include "spark/orderman/order_factory/DynamicOrderRegistry.h"
|
#include "spark/orderman/order_factory/DynamicOrderRegistry.h"
|
||||||
#include "spark/os/os.h"
|
|
||||||
#include "spark/os/spark_data_directory.h"
|
#include "spark/os/spark_data_directory.h"
|
||||||
#include "spark/persistence/PersistenceServiceServer.h"
|
#include "spark/persistence/PersistenceServiceServer.h"
|
||||||
#include "spark/plugin/SparkServices.h"
|
#include "spark/plugin/SparkServices.h"
|
||||||
@@ -32,6 +31,7 @@
|
|||||||
#include "sparkd/execution/execution_gateway_provider.h"
|
#include "sparkd/execution/execution_gateway_provider.h"
|
||||||
#include "sparkd/http/WebServer.h"
|
#include "sparkd/http/WebServer.h"
|
||||||
#include "sparkd/md/MarketDataAuxiliaryServiceServer.h"
|
#include "sparkd/md/MarketDataAuxiliaryServiceServer.h"
|
||||||
|
#include "sparkd/md/market_data_session.h"
|
||||||
#include "sparkd/md/recording/MDRecorder.h"
|
#include "sparkd/md/recording/MDRecorder.h"
|
||||||
#include "sparkd/position/MarginServiceServer.h"
|
#include "sparkd/position/MarginServiceServer.h"
|
||||||
#include "sparkd/position/PositionServiceServer.h"
|
#include "sparkd/position/PositionServiceServer.h"
|
||||||
@@ -46,6 +46,7 @@
|
|||||||
namespace bts::cmds {
|
namespace bts::cmds {
|
||||||
|
|
||||||
using bts::api::ServiceContext;
|
using bts::api::ServiceContext;
|
||||||
|
using bts::md::MarketDataSession;
|
||||||
using bts::md::MDClient;
|
using bts::md::MDClient;
|
||||||
using bts::md::TradeSummarySignalDispatcher;
|
using bts::md::TradeSummarySignalDispatcher;
|
||||||
using bts::metrics::MetricsContainer;
|
using bts::metrics::MetricsContainer;
|
||||||
@@ -107,7 +108,7 @@ static void execute() {
|
|||||||
auto py_plugin_man = std::make_shared<python_interop::PluginManager>();
|
auto py_plugin_man = std::make_shared<python_interop::PluginManager>();
|
||||||
// start work loop in background
|
// start work loop in background
|
||||||
py_plugin_man->start_work_thread();
|
py_plugin_man->start_work_thread();
|
||||||
md::cmds::Run::run(py_plugin_man);
|
MarketDataSession md_session{py_plugin_man};
|
||||||
|
|
||||||
api::synthetic::SyntheticSecurityService synthetic_service(sc);
|
api::synthetic::SyntheticSecurityService synthetic_service(sc);
|
||||||
bts::md::MDClient mdclient(
|
bts::md::MDClient mdclient(
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
#include "DumpSecurity.h"
|
#include "DumpSecurity.h"
|
||||||
#include "spark/api/domain/SecurityType.h"
|
#include "spark/api/domain/SecurityType.h"
|
||||||
#include "spark/config/protos/market_data.pb.h"
|
#include "spark/config/protos/market_data.pb.h"
|
||||||
#include "spark/core/TableFormatter.h"
|
|
||||||
#include "spark/domain_model/Security.h"
|
#include "spark/domain_model/Security.h"
|
||||||
#include "spark/domain_model/Security.pb.h"
|
#include "spark/domain_model/Security.pb.h"
|
||||||
#include "spark/domain_model/SecurityType.h"
|
#include "spark/domain_model/SecurityType.h"
|
||||||
#include "spark/domain_model/Venue.h"
|
#include "spark/domain_model/Venue.h"
|
||||||
|
#include "spark/format/table.h"
|
||||||
#include "spark/md/Diag/ShmDumper.h"
|
#include "spark/md/Diag/ShmDumper.h"
|
||||||
#include "spark/md/SecurityDB.h"
|
#include "spark/md/SecurityDB.h"
|
||||||
#include "spark/md/SymbolLoader.h"
|
#include "spark/md/SymbolLoader.h"
|
||||||
@@ -23,7 +23,8 @@ using bts::api::SecurityType;
|
|||||||
using bts::api::SecurityType_Name;
|
using bts::api::SecurityType_Name;
|
||||||
using bts::api::Venue;
|
using bts::api::Venue;
|
||||||
using bts::api::venue_parse_smart;
|
using bts::api::venue_parse_smart;
|
||||||
using bts::core::TableFormatter;
|
using bts::format::format_table;
|
||||||
|
using bts::format::detail::TableSchema;
|
||||||
using bts::md::securitytype_of;
|
using bts::md::securitytype_of;
|
||||||
using bts::md::SymbolLoader;
|
using bts::md::SymbolLoader;
|
||||||
using bts::md::db::load_metadata;
|
using bts::md::db::load_metadata;
|
||||||
@@ -69,7 +70,7 @@ void print_securities(function<bool(const Security &)> predicate) {
|
|||||||
|
|
||||||
void print_db_securities(function<bool(const Security &)> predicate) {
|
void print_db_securities(function<bool(const Security &)> predicate) {
|
||||||
vector<Security> secs;
|
vector<Security> secs;
|
||||||
const TableFormatter::Schema<Security> schema{
|
const TableSchema<Security> schema{
|
||||||
make_tuple(
|
make_tuple(
|
||||||
"id", 12, [](const Security &s) { return std::to_string(s.id()); }),
|
"id", 12, [](const Security &s) { return std::to_string(s.id()); }),
|
||||||
make_tuple(
|
make_tuple(
|
||||||
@@ -93,7 +94,7 @@ void print_db_securities(function<bool(const Security &)> predicate) {
|
|||||||
secs.push_back(sec);
|
secs.push_back(sec);
|
||||||
};
|
};
|
||||||
load_securities([](auto) { return true; }, on_sec);
|
load_securities([](auto) { return true; }, on_sec);
|
||||||
TableFormatter::format(std::cout, secs, schema);
|
format_table(std::cout, secs, schema);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T, class ParseT = function<bool(const string &, T *)>>
|
template <class T, class ParseT = function<bool(const string &, T *)>>
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ struct ExecutionGatewayProvider::PImpl {
|
|||||||
return make_gw<ICEExecutionGateway>(conn, conn, *l, o);
|
return make_gw<ICEExecutionGateway>(conn, conn, *l, o);
|
||||||
case api::VENUE_GLBX:
|
case api::VENUE_GLBX:
|
||||||
if (conn.use_ilink3()) {
|
if (conn.use_ilink3()) {
|
||||||
make_gw<ilink3::GLBXiLink3ExecutionGateway>(conn, conn, *l, o);
|
return make_gw<ilink3::GLBXiLink3ExecutionGateway>(
|
||||||
|
conn, conn, *l, o);
|
||||||
}
|
}
|
||||||
return make_gw<GLBXExecutionGateway>(conn, conn, *l, o);
|
return make_gw<GLBXExecutionGateway>(conn, conn, *l, o);
|
||||||
case api::VENUE_DERIBIT:
|
case api::VENUE_DERIBIT:
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#include "spark/api/services/native_order_type.h"
|
#include "spark/api/services/native_order_type.h"
|
||||||
#include "spark/api/services/time_in_force.h"
|
#include "spark/api/services/time_in_force.h"
|
||||||
#include "spark/config/protos/jetfix.pb.h"
|
#include "spark/config/protos/jetfix.pb.h"
|
||||||
#include "spark/core/TimeStamp.h"
|
#include "spark/core/time_stamp.h"
|
||||||
#include "spark/core/start_stop_state_machine.h"
|
#include "spark/core/start_stop_state_machine.h"
|
||||||
#include "spark/domain/tick_utils.h"
|
#include "spark/domain/tick_utils.h"
|
||||||
#include "spark/domain_model/Security.h"
|
#include "spark/domain_model/Security.h"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "spark/api/md/MarketDataConfig.pb.h"
|
#include "spark/api/md/MarketDataConfig.pb.h"
|
||||||
#include "spark/api/md/MarketDataConfigUtils.h"
|
#include "spark/api/md/MarketDataConfigUtils.h"
|
||||||
#include "spark/core/FMT.h"
|
#include "spark/core/FMT.h"
|
||||||
#include "spark/core/TimeSpan.h"
|
#include "spark/core/time_span.h"
|
||||||
#include "spark/domain/DomainSecurityUtils.h"
|
#include "spark/domain/DomainSecurityUtils.h"
|
||||||
#include "spark/domain/SecurityID.h"
|
#include "spark/domain/SecurityID.h"
|
||||||
#include "spark/domain_model/Venue.h"
|
#include "spark/domain_model/Venue.h"
|
||||||
@@ -141,5 +141,6 @@ MarketDataGateway::MarketDataGateway(
|
|||||||
MarketDataGateway::~MarketDataGateway() = default;
|
MarketDataGateway::~MarketDataGateway() = default;
|
||||||
|
|
||||||
void MarketDataGateway::start() { me_->start(); }
|
void MarketDataGateway::start() { me_->start(); }
|
||||||
|
void MarketDataGateway::stop() { me_->stop(); }
|
||||||
|
|
||||||
} // namespace bts::md
|
} // namespace bts::md
|
||||||
@@ -29,6 +29,7 @@ class MarketDataGateway {
|
|||||||
~MarketDataGateway();
|
~MarketDataGateway();
|
||||||
|
|
||||||
void start();
|
void start();
|
||||||
|
void stop();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct PImpl;
|
struct PImpl;
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
#include "spark/api/domain/SecurityType.h"
|
#include "spark/api/domain/SecurityType.h"
|
||||||
#include "spark/api/domain/Venue.h"
|
#include "spark/api/domain/Venue.h"
|
||||||
#include "spark/api/md/PyMarketDataProviderConfig.pb.h"
|
#include "spark/api/md/PyMarketDataProviderConfig.pb.h"
|
||||||
#include "spark/core/TimeSpan.h"
|
#include "spark/core/time_span.h"
|
||||||
#include "spark/core/TimeStamp.h"
|
#include "spark/core/time_stamp.h"
|
||||||
#include "spark/domain/AggressorSide.h"
|
#include "spark/domain/AggressorSide.h"
|
||||||
#include "spark/domain/FutureSecurity.h"
|
#include "spark/domain/FutureSecurity.h"
|
||||||
#include "spark/domain/Security.h"
|
#include "spark/domain/Security.h"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "spark/core/EnumMacros.h"
|
#include "spark/core/enum_macros.h"
|
||||||
#include "spark/core/FMT_IMPL.h"
|
#include "spark/core/FMT_IMPL.h"
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "spark/core/EnumMacros.h"
|
#include "spark/core/enum_macros.h"
|
||||||
#include "spark/core/FMT_IMPL.h"
|
#include "spark/core/FMT_IMPL.h"
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "spark/core/EnumMacros.h"
|
#include "spark/core/enum_macros.h"
|
||||||
#include "spark/core/FMT_IMPL.h"
|
#include "spark/core/FMT_IMPL.h"
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "spark/core/EnumMacros.h"
|
#include "spark/core/enum_macros.h"
|
||||||
#include "spark/core/FMT_IMPL.h"
|
#include "spark/core/FMT_IMPL.h"
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace bts::md::binance {
|
|||||||
*/
|
*/
|
||||||
class BinanceMiniTickerEventType {
|
class BinanceMiniTickerEventType {
|
||||||
// Unlike most binance-related enums, this one isn't defined via macros (in
|
// Unlike most binance-related enums, this one isn't defined via macros (in
|
||||||
// EnumMacros.h). The macros assume the enum value names are identical to
|
// enum_macros.h). The macros assume the enum value names are identical to
|
||||||
// their json field counter-parts. Unfortunately, one of the json fields for
|
// their json field counter-parts. Unfortunately, one of the json fields for
|
||||||
// this enum, '24hrMiniTicker', isn't a legal name in cpp.
|
// this enum, '24hrMiniTicker', isn't a legal name in cpp.
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#ifdef SPARK_ENABLE_CCAPI
|
#ifdef SPARK_ENABLE_CCAPI
|
||||||
#include "BinanceMiniTickerUpdate.h"
|
#include "BinanceMiniTickerUpdate.h"
|
||||||
#include "spark/core/TimeStamp.h"
|
#include "spark/core/time_stamp.h"
|
||||||
#include "spark/domain/Price.h"
|
#include "spark/domain/Price.h"
|
||||||
#include "spark/domain/Quantity.h"
|
#include "spark/domain/Quantity.h"
|
||||||
#include "spark/domain/SecurityMarketDataStatistics.h"
|
#include "spark/domain/SecurityMarketDataStatistics.h"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "spark/core/TimeStamp.h"
|
#include "spark/core/time_stamp.h"
|
||||||
#include "spark/domain/SecurityMarketDataStatistics.h"
|
#include "spark/domain/SecurityMarketDataStatistics.h"
|
||||||
#include "sparkd/md/binance/BinanceMiniTickerEventType.h"
|
#include "sparkd/md/binance/BinanceMiniTickerEventType.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "spark/core/EnumMacros.h"
|
#include "spark/core/enum_macros.h"
|
||||||
#include "spark/core/FMT_IMPL.h"
|
#include "spark/core/FMT_IMPL.h"
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "spark/core/EnumMacros.h"
|
#include "spark/core/enum_macros.h"
|
||||||
#include "spark/core/FMT_IMPL.h"
|
#include "spark/core/FMT_IMPL.h"
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "BinancePriceStatistics.h"
|
#include "BinancePriceStatistics.h"
|
||||||
#include "spark/core/TimeStamp.h"
|
#include "spark/core/time_stamp.h"
|
||||||
#include "spark/domain/Price.h"
|
#include "spark/domain/Price.h"
|
||||||
#include "spark/domain/Quantity.h"
|
#include "spark/domain/Quantity.h"
|
||||||
#include "spark/domain/SecurityMarketDataStatistics.h"
|
#include "spark/domain/SecurityMarketDataStatistics.h"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "spark/core/TimeStamp.h"
|
#include "spark/core/time_stamp.h"
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "spark/api/domain/Currency.pb.h"
|
#include "spark/api/domain/Currency.pb.h"
|
||||||
#include "spark/core/EnumMacros.h"
|
#include "spark/core/enum_macros.h"
|
||||||
#include "spark/core/FMT_IMPL.h"
|
#include "spark/core/FMT_IMPL.h"
|
||||||
|
|
||||||
#include <boost/algorithm/string/case_conv.hpp>
|
#include <boost/algorithm/string/case_conv.hpp>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "spark/core/EnumMacros.h"
|
#include "spark/core/enum_macros.h"
|
||||||
#include "spark/core/FMT_IMPL.h"
|
#include "spark/core/FMT_IMPL.h"
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "spark/core/EnumMacros.h"
|
#include "spark/core/enum_macros.h"
|
||||||
#include "spark/core/FMT_IMPL.h"
|
#include "spark/core/FMT_IMPL.h"
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "spark/core/EnumMacros.h"
|
#include "spark/core/enum_macros.h"
|
||||||
#include "spark/core/FMT_IMPL.h"
|
#include "spark/core/FMT_IMPL.h"
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "BinanceUsPriceStatistics.h"
|
#include "BinanceUsPriceStatistics.h"
|
||||||
#include "spark/core/TimeStamp.h"
|
#include "spark/core/time_stamp.h"
|
||||||
#include "spark/domain/Price.h"
|
#include "spark/domain/Price.h"
|
||||||
#include "spark/domain/Quantity.h"
|
#include "spark/domain/Quantity.h"
|
||||||
#include "spark/domain/SecurityMarketDataStatistics.h"
|
#include "spark/domain/SecurityMarketDataStatistics.h"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "spark/core/TimeStamp.h"
|
#include "spark/core/time_stamp.h"
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "spark/core/EnumMacros.h"
|
#include "spark/core/enum_macros.h"
|
||||||
#include "spark/core/FMT_IMPL.h"
|
#include "spark/core/FMT_IMPL.h"
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "spark/core/EnumMacros.h"
|
#include "spark/core/enum_macros.h"
|
||||||
#include "spark/core/FMT_IMPL.h"
|
#include "spark/core/FMT_IMPL.h"
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "spark/algorithm/string/find.h"
|
||||||
|
#include "spark/algorithm/string/join.h"
|
||||||
#include "spark/core/FMT_IMPL.h"
|
#include "spark/core/FMT_IMPL.h"
|
||||||
#include "spark/core/StringFinder.h"
|
|
||||||
#include "spark/core/StringJoiner.h"
|
|
||||||
#include "spark/utils/bts_assert.h"
|
#include "spark/utils/bts_assert.h"
|
||||||
|
|
||||||
#include <boost/algorithm/string/split.hpp>
|
#include <boost/algorithm/string/split.hpp>
|
||||||
@@ -119,7 +119,7 @@ inline CCApiCorrelationID CCApiCorrelationID::from_string(
|
|||||||
template <class... Parts>
|
template <class... Parts>
|
||||||
inline CCApiCorrelationID CCApiCorrelationID::from_parts(Parts... parts) {
|
inline CCApiCorrelationID CCApiCorrelationID::from_parts(Parts... parts) {
|
||||||
// TODO: create the parts vector/string simultaneously (more efficient)
|
// TODO: create the parts vector/string simultaneously (more efficient)
|
||||||
auto parts_str = core::StringJoiner::join(delimiter(), parts...);
|
auto parts_str = bts::algorithm::join(delimiter(), parts...);
|
||||||
return from_string(parts_str);
|
return from_string(parts_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,7 +231,7 @@ inline void CCApiCorrelationID::advance_(std::size_t len) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cursor_ += len;
|
cursor_ += len;
|
||||||
auto idx = core::StringFinder::find(str_, '.', len);
|
auto idx = bts::algorithm::find_nth(str_, '.', len);
|
||||||
str_ = str_.substr(idx);
|
str_ = str_.substr(idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loaded 100 of 571 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user