2.3 KiB
2.3 KiB
KbsV3 Memory
Architecture Guide
- See kbsv3-architecture.md for: SAP RFC calls, gRPC communication, DB read/write patterns
- See job-system.md for: full job lifecycle, scheduler pattern, ILongRunningJobService vs IKbsJob, InputData/Payload flow
Plotly.Blazor (v7.0.0)
ModeFlagnamespace:Plotly.Blazor.Traces.ScatterLibXAxis.TypeneedsPlotly.Blazor.LayoutLib.XAxisLib.TypeEnum.Date(not string)Titleis ambiguous betweenLayoutLibandLayoutLib.XAxisLib— use fully qualified- Events (relayout) not implemented in library — use JS interop via
el.on('plotly_relayout', ...)
Service Layer Pattern
- Services use
JobDbContextinjected directly - Interface in
Contract/, implementation inServices/ - Register in
Program.csasbuilder.Services.AddScoped<IFoo, Foo>()
SAP NCo3 IRfcFunction
IRfcFunctiondoes NOT implementIDisposable—using var fnccauses CS1674 compile error- NCo3 manages memory via GC;
fncvars in method scope are eligible for collection after method returns - Fix 1 from memory-optimization plan is NOT applicable via
using; no explicit disposal mechanism available
Job Worker Patterns (IKbsJob vs ILongRunningJobService)
- All KnownJobs in Kbs3SqlService use
IKbsJob(NOTILongRunningJobService) IKbsJobruns viaLongRunningJobServiceHostwithJobType.CallServiceHost- Auto-registered as keyed service by class name (e.g.
"SyncOpexPurchaseOrdersService") IKnownJob.ServiceNameformat:"modulename.ClassName"→ host splits on.and resolves last segment- Do NOT add new
JobTypeenum entries forIKbsJobworkers — they all shareCallServiceHost ILongRunningJobServiceis for services like AD sync, Hydra — they have dedicated JobType enum entries
Naming
- App is called "KRAH-App" internally (not "KBS" — that's only the technical project name)
HydraArchiveData
- Entity: HydraArchiveReloadId, AcquisitionTime, PdatrefPparamDatasupId, DecimalValue
- Covering index: (HydraArchiveReloadId, AcquisitionTime, PdatrefPparamDatasupId)
- SQL bucket aggregation: DATEDIFF/DATEADD pattern for time-bucket grouping
- Raw SQL via
_dbContext.Database.SqlQueryRaw<T>(sql, params)