refactor: Add DataStream service modules for Dependency Injection
Namely, in DataStreamPublisher and PubSubServer. This is part of a broader paradigm shift towards Dependency Injection and Factory Pattern. https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection-guidelines * Use interfaces to decouple services: - Decouple ManagedSubscriber from ISubscriberCore impl - Decouple PubTableBroker from IPublisherCore impl - Decouple RemoteQueryManager from IManagedSubscriber, IPubTableBroker impl * Rename Publishers -> PublisherNodes in DataStreamPublisherConfig * Model config profiles after dotnet appsettings - Rename Configurations/<name>.json -> appsettings.<name>.json - Make json fields match corresponding csharp props verbatim * The Dependency Injection framework doesn't support JsonPropertyName attributes. Config class props must match json fields verbatim. * Move reusable startup code into new Bts.Extensions.Hosting proj * Add pubsub and md-publisher services to compose.yaml
This commit is contained in:
1 parent
716bc92394
commit
76fa35382e
102 files changed
+2948
-1169
No files matched your search
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"PubSub": {
|
||||
"Routing": {
|
||||
"PublisherRoutes": [
|
||||
{
|
||||
"Name": "default",
|
||||
"ServerAddress": "bts-cloud://127.0.0.1:22019",
|
||||
"TagRegExp": ".*"
|
||||
}
|
||||
],
|
||||
"SubscriberRoutes": [
|
||||
{
|
||||
"Name": "default",
|
||||
"ServerAddress": "bts-cloud://127.0.0.1:22019",
|
||||
"TagRegExp": ".*"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"DataStreamPublisher": {
|
||||
"PublisherNodes": [
|
||||
{
|
||||
"Name": "test_data",
|
||||
"Streams": [
|
||||
{
|
||||
"Name": "seconds_1_10",
|
||||
"Expression": "milliseconds(1000,10)",
|
||||
"IsOnWebsocket": true
|
||||
},
|
||||
{
|
||||
"Name": "test_literal",
|
||||
"Expression": "literal(\"x\", \"420.0\")",
|
||||
"IsOnWebsocket": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user