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
@@ -1,29 +1,17 @@
|
||||
using bts;
|
||||
using bts.utils;
|
||||
|
||||
using mbts.config;
|
||||
using mbts.spark;
|
||||
using Bts.DataStreamExpressions;
|
||||
using Bts.PubSub;
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
|
||||
using BCG.Utilities;
|
||||
// using BCG.Utilities.BlueConfiguration;
|
||||
using BCG.Utilities.General;
|
||||
using Spark.DataStream;
|
||||
using Bts.DataStreamExpressions;
|
||||
// using BCG.Evaluator.DataStreamExpression;
|
||||
// using BCG.Utilities.Win32;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BCG
|
||||
{
|
||||
@@ -79,7 +67,7 @@ namespace BCG
|
||||
{
|
||||
// TODO: Port PublishedTagsStream from edge (then we can uncomment impl below)
|
||||
//ViewStream vs = new PubSubServerStateStream();
|
||||
ViewStream vs = new PubSubServerStateStream();
|
||||
ViewStream vs = new PubSubServerStateStream(new SubscriberCoreFactory(), ViewStreamDatabase.instance);
|
||||
return new FilterStream(vs, "tag~='DS_'");
|
||||
//return new LiteralStream("tag/String", "DS_table1;DS_table2");
|
||||
}
|
||||
@@ -589,7 +577,7 @@ namespace BCG
|
||||
|
||||
myLoadAssemblies();
|
||||
|
||||
ViewStreamDatabase.instance = new ViewStreamDatabase();
|
||||
// ViewStreamDatabase.instance = new ViewStreamDatabase();
|
||||
myAllTagsStream = myGetAllTagsStream();
|
||||
myAllTagsStream.onChange += new BCG.DataStream.ChangeDelegate(myHandleTableListChange);
|
||||
myTabControl.SelectedIndex = 3;
|
||||
@@ -614,7 +602,7 @@ namespace BCG
|
||||
|
||||
// SitesCore.setMySiteName (mySite);
|
||||
|
||||
ViewStreamDatabase.instance = new ViewStreamDatabase();
|
||||
// ViewStreamDatabase.instance = new ViewStreamDatabase();
|
||||
myAllTagsStream = myGetAllTagsStream();
|
||||
myAllTagsStream.onChange += new BCG.DataStream.ChangeDelegate(myHandleTableListChange);
|
||||
|
||||
|
||||
Reference in new issue
Block a user