Skip to content

[analytics] Integrate ONNX Runtime and TensorFlow Serving #1476

Closed

Description

@makr-code

[analytics] Integrate ONNX Runtime and TensorFlow Serving

Summary

  • Module: analytics
  • Item: Integration with external ML tools (ONNX Runtime, TensorFlow Serving)

Implementation Context

  • Roadmap section: Long-term (6-12 months)
  • Enhancement hint: # Analytics Module Implementation - Future Enhancements
  • Enhancement hint: This document outlines implementation-specific future enhancements for the Analytics module. For API-level enhancements, see [`../../include/analytics/FUTURE...
  • Enhancement hint: Line 14: Open Issues: TODOs: 0, Stubs: 1

Implementation Phases

Phase 1: Core Analytics Engine (Status: Completed )

  • OLAP engine with GROUP BY, CUBE, ROLLUP, and GROUPING SETS (analytics/olap_engine.cpp)
  • Window functions: ROW_NUMBER, SUM OVER, AVG OVER with frame specifications
  • Statistical aggregations (COUNT, SUM, AVG, MIN, MAX, STDDEV, VARIANCE, MEDIAN, PERCENTILE)
  • Hash-based aggregation with result caching
  • Columnar Arrow RecordBatch storage always available
  • JSON, CSV, Parquet, and Feather export (analytics/exporters/)
    Phase 2: Streaming & Incremental Analytics (Status: In Progress )
  • CEP full engine implementation in analytics/cep_engine.cpp (Target: Q2 2026)
  • Streaming aggregation windows (tumbling/sliding/session/hopping) in analytics/streaming_window.cpp (Target: Q2 2026)
  • Incremental materialized views (Target: Q3 2026)
    Phase 3: Distributed & ML-Augmented Analytics (Status: Planned )
  • Columnar execution engine with vectorized operator pipeline
  • LLVM-JIT compilation for hot aggregation paths
  • Distributed analytics sharding across cluster nodes
  • Predictive analytics and time-series forecasting integration
  • AutoML integration for automated model selection

Related Work

  • No direct overlap identified in pre-check.
  • Relationship is for coordination only; do not expand this issue scope.

Scope Boundary

  • In scope: implement only this roadmap item: "Integration with external ML tools (ONNX Runtime, TensorFlow Serving)"
  • Out of scope: any other roadmap checklist item, even from the same module/section
  • Related issues/PRs are references only; implementation remains isolated to this issue
  • If additional work is required, open/link a follow-up issue instead of extending this issue

Mandatory Delivery Workflow (ThemisDB Rules)

  • Phase 0: Existing code review before implementation
    • Identify existing files/symbols/interfaces and document reuse plan
    • Verify no duplicate implementation of existing functionality
    • Record affected files and integration points before coding
  • Scope gate (must pass before coding)
    • Confirm implementation target is only the single issue description
    • Confirm no additional roadmap items are implemented in this issue/PR
    • Any newly discovered work is split into separate linked issue(s)
  • Design and implementation rules reviewed from:
    • docs/analysis/IMPLEMENTATION_GUIDE.md
    • docs/analysis/GPU_ACCELERATION_ADDENDUM.md
    • docs/architecture/MODULAR_ARCHITECTURE_ROADMAP.md
    • docs/architecture/THEMIS_CORE_GUIDE.md
    • docs\de\analytics\olap_guide.md
    • docs\de\analytics\process_mining_guide.md
  • Architecture and compatibility validation
    • Confirm behavior compatibility with existing APIs unless breaking change is explicitly declared
    • Confirm telemetry/logging/metrics integration follows existing module patterns
  • Code review gate before completion
    • Self-review against roadmap acceptance criteria
    • Cross-check for overlap/duplication with existing implementations
  • Validation gate
    • Unit + integration tests updated/added
    • Performance impact measured against baseline

Implementation Tasks

  • OLAP engine with GROUP BY, CUBE, ROLLUP, and GROUPING SETS (analytics/olap_engine.cpp)
  • Window functions: ROW_NUMBER, SUM OVER, AVG OVER with frame specifications
  • Statistical aggregations (COUNT, SUM, AVG, MIN, MAX, STDDEV, VARIANCE, MEDIAN, PERCENTILE)
  • Hash-based aggregation with result caching
  • Columnar Arrow RecordBatch storage always available
  • JSON, CSV, Parquet, and Feather export (analytics/exporters/)
  • CEP full engine implementation in analytics/cep_engine.cpp (Target: Q2 2026)
  • Streaming aggregation windows (tumbling/sliding/session/hopping) in analytics/streaming_window.cpp (Target: Q2 2026)
  • Incremental materialized views (Target: Q3 2026)
  • Columnar execution engine with vectorized operator pipeline
  • LLVM-JIT compilation for hot aggregation paths
  • Distributed analytics sharding across cluster nodes
  • Predictive analytics and time-series forecasting integration
  • AutoML integration for automated model selection

Acceptance Criteria

  • Unit tests (OLAP, Arrow export, process mining, NLP, diff engine)
  • Unit tests coverage > 80%
  • Integration tests (query module, index module, CDC)
  • CEP engine integration tests
  • Performance benchmarks (OLAP, export, process mining, graph, NLP)
  • Security audit (LLM API key handling, data export sanitization)
  • Documentation complete (API docs, OLAP guide, process mining guide)
  • API stability guaranteed for OLAP, export, and process mining

Constraints & Risks

  • CEP engine is a header-only stub
  • no event processing is performed until full implementation lands
  • NLP text analyzer uses rule-based approaches not suitable as a replacement for full NLP frameworks
  • LLM analyzer requires external API keys
  • responses are non-deterministic
  • Arrow-dependent formats (Parquet, Feather, IPC) require compile-time flag THEMIS_HAS_ARROW
  • Basic lemmatization only
  • full morphological analysis not yet supported
  • Graph analytics limited to PageRank and basic algorithms
  • advanced algorithms planned for v1.8.0
  • CEP engine API will be finalized in v1.7.0
  • current stubs are not stable
  • Arrow export format options may expand in v1.7.0 (additive, non-breaking)

Metadata

  • Generated by: AI-powered GitHub Management Script
  • AI Model: llama3.2
  • Source Roadmap: C:\VCC\themis\src\analytics\ROADMAP.md (context only, not scope authorization for additional items)

Activity

  1. added
    enhancement
    priority:medium
    analytics
    on Feb 21, 2026
  2. added a commit that references this issue on Feb 24, 2026
  3. added this to the v1.2.0 milestone on Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

analyticsenhancementpriority:medium

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions