Anti-Pattern: Embedded BI (Business Intelligence)
Description
Embedded BI occurs when complex analytical reporting, aggregation, and historical data processing are implemented directly within the Transactional Monolith's application code, rather than in a dedicated Data Warehouse or BI Tool.
Instead of lightweight queries, the application performs heavy "Number Crunching" (Year-To-Date turnover, retention rates, complex funnels) in C# memory or via heavy SQL execution on the live OLTP database.
Evidence
- Module:
WA(Work & Travel). - Files:
WAYTDFeeder.cs(36KB of calculation logic).WADataFeederBiz.
- Observations:
- The system calculates "Year To Date" turnover by iterating over raw orders in real-time or near real-time.
- Logic for "What counts as a sale" is hardcoded in C#
ifstatements inside the loop.
Impact
- Performance Degradation: Running a report locks database tables (
Orders,Customers), slowing down the operational usage (e.g., someone trying to book a program). - Inflexibility: Changing a KPI definition (e.g., "Exclude cancelled orders") requires a Code Change, Compilation, and Deployment.
- Memory Hogs: Loading thousands of orders into memory to compute a sum is an abuse of the Web Server's RAM.
Remediation
- Extract to ELT/ETL: Move the raw data to a Data Warehouse (or a Read Replica) using a scheduled job.
- Use BI Tools: Connect Zoho Analytics (Strategic Choice) to the Data Source.
- Let the BI engine do the heavy lifting (
SUM,GROUP BY).
- Let the BI engine do the heavy lifting (
- Materialized Views: If real-time is needed, use SQL Indexed Views or a transparent caching layer, do not recompute in C# on every request.
2026 Audit Findings
- Occurrences: 1 Major Component confirmed.
- Analysis:
WAYTDFeeder.csconfirmed to contain heavy turnover calculation logic in C#. - Recommendation: Move to Zoho Analytics (Strategic) or Stored Procedure (Tactical).