@nsshunt/stspublisherserver
v3.0.4
Published
STS Publisher Server. Provide instrument publishing capabilities within a nodejs server context. Use stspublisheragent for a browser context.
Downloads
123
Readme
stspublisherserver
STS Publisher - Server
To add a new entity type, the following needs to happen
decide on the new structure and levels, e.g. technology/subtechnology/lambdafunction/instance constraint: the current solution has been setup for 4 levels
future: Could potentially re-factor to handle any number of levels
--- context structure and default instruments ---------------------------------------
create a context interface for the new entity stspublisherserver/src/publishers/publisher.ts
create the default instrument list stspublisherserver/src/publishers/publishInstrumentControllerV2.ts
--- redis processing ----------------------------------------------------------------
define time series prefix time series data are values that are recorded with the current datetime stamp. The series will exists within a defined time window. Old values are removed from the time series.
define instant data prefix instant data are values that represent current near-real time values. This data is always overwritten with the current versions of instruments.
define index for time series index for time series values. Keys are created for query purposes.
define index for instant data index for instant data values. Keys are created for query purposes.
All prefix values declared in:- stsinstrumentmanager/src/redisInstrumentProcessorBase.ts (*) these should be specified with a new object that defines all this setup-meta-data
Define field names, guage types and data types within a IFieldRecord array stsinstrumentmanager/src/redisInstrumentProcessorBase.ts (*) these should be specified with a new object that defines all this setup-meta-data
Handle object types better than 'memory' in IsString stsinstrumentmanager/src/redisInstrumentProcessorBase.ts
() Add indexes and prefix defined above to drop and create the indexes stsinstrumentmanager/src/redisInstrumentProcessorLeader.ts () these should be specified with a new object that defines all this setup-meta-data
() RemoveOldHashRecords updated to include new index time series stsinstrumentmanager/src/redisInstrumentProcessorLeader.ts () these should be specified with a new object that defines all this setup-meta-data
() Create a new GetPath function to return formatted path for new entity stsinstrumentmanager/src/redisInstrumentProcessorWorker.ts () these should come at the root level of a new object that defines all this setup-meta-data
() Update ProcessInstrumentPayload to handle the new entity. () These needs to be refactored based on the new object structure definition from above stsinstrumentmanager/src/redisInstrumentProcessorWorker.ts
() Update GetCompleteRedisDataExByLevel to handle the new entity. () New object structure processing required. stsinstrumentmanager/src/redisInstrumentProcessorWorker.ts
Update GetRedisDataExByLevel need to be able to handle object types better than hard coding for 'memory' stsinstrumentmanager/src/redisInstrumentProcessorWorker.ts Update all the methods such as GetServiceRootLevel to have one method based on the object definition stsinstrumentmanager/src/redisInstrumentProcessorWorker.ts The setup object could potentially define the methods
--- express http server processing ----------------------------------------------------------------
change stsmonitorroute to use :level1, :level2, etc. rather than app names stsinstrumentmanager/src/routes/stsmonitorroute.ts
change stsmonitorcontrollerV3 to use a config option for process influxdb (change stsconfig) stsinstrumentmanager/src/routes/stsmonitorroute.ts
change metricscontroller to use new methods updated from the redis sections above also update influxdb gets methods to handle all types - just provide stubs if required for non influxdb supported types stsinstrumentmanager/src/routes/metricscontroller.ts
update GetLogMessagesLambdaInstanceThread methods to handle kafka message processing stsinstrumentmanager/src/routes/metricscontroller.ts
--- socketio processing -------------------------------------------------------------------------
Define new interface types stssocketio-client/src/commonTypes
Update ParseModelNode methds (3) to use new interface types stssocketio-client/src/observabilitymodelutils
Update GetInfluxDBModelLambda methods (3) to use output types - these should come from the config object in the notes above stssocketio-client/src/observabilitymodelutils
Update InvokeRESTAPI to invoke correct restapis stssocketio-client/src/observabilityrestapisubscriber
Update ObservabilitySubscriptionManager to handle new type stssocketio-client/src/observabilitysubscriptionmanager
--- uiterm processing -------------------------------------------------------------------------
Update GetViewTemplate to support new type stsuiterm/src/uisubscription/uicontrollersubscriptionbase
update uicontrollerlanding to support new type stsuiterm/src/uisubscription/uicontrollerlanding
create new view class to handle all levels of new type. If 4 levels, 3 views will need to be defined. stsuiterm/src/uisubscription/uicontroller<>
Update appsingle to include the new routes for the 3 new views stsuiterm/src/appsingle
Update uicontrollertemplates to crate the new handlebars templates for the new type stsuiterm/src/uicontrollertemplates