SOARCA icon indicating copy to clipboard operation
SOARCA copied to clipboard

reporter refactor with reportable

Open lucamrgs opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. The unit complexity of the reporter is greater than it could be, as we are scheduling function calls asynchronously.

Describe the solution you'd like Rather, we could have a command-pattern "protocol" approach, where the Reporter packages reporting information into a "Reportable" logical unit, and pushes the Reportables to a queue of an asynchronously running Processor module, which schedules the reporting tasks and executes them.

The architecture develops along the following notes

  • Reporter now uses an Async Processor
  • The Processor uses Reportables
  • Reportables use DownStreamReporters
  • The Processor runs in a go routine
  • The Processor receives IReportable s in a queue
  • Four ReportFcnReportable implement the IReportable interface with just a Report() function
  • The ReportFcnReportable is instantiated and put on the queue with all the DS reporters, and the function params
  • The ReportFcnReportable is put in the queue of the Processor
  • The Processor calls one of the four Reportables which calls Report(IDSReporter.ReportFcn) for every DS reporter

lucamrgs avatar Nov 12 '24 14:11 lucamrgs