User-Defined Function Instance Reuse in Data Stream Management

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Data stream management systems (DSMS) are limited in allowing only built-in functions for queries, failing to support user-defined functions, which restricts flexibility and adaptability in processing real-time data streams.

Innovation Solution

Implementing a data stream management system that allows users to create and integrate new functions during operation, using a metadata repository to manage user-defined functions and invoke them dynamically within continuous queries, optimizing memory usage by reusing function instances across multiple queries.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If only built-in functions are supported in DSMS, then system stability and ease of implementation are improved, but adaptability and versatility deteriorate

Engineering Contradiction:
Improvesystem stabilityVSAvoidfunction flexibility
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The system separates built-in functions from user-defined functions into distinct management mechanisms. Built-in functions remain in the core system for stability, while user-defined functions are managed through external registration and metadata repositories, allowing independent evolution and reducing system coupling.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A metadata repository acts as an intermediary layer between the query compiler and user-defined functions. This intermediary stores function signatures, implementations, and registration information, enabling the system to dynamically resolve and invoke user-defined functions without requiring direct integration into the core execution engine.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If user-defined functions are allowed during normal operation, then adaptability and versatility are improved, but device complexity and difficulty of management increase

Engineering Contradiction:
Improvefunction flexibilityVSAvoidsystem complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

User-defined functions are registered and validated before being invoked during query execution. The system performs preliminary registration of function signatures, implementations, and metadata in a dedicated repository, ensuring that all user-defined functions are properly configured and available before normal query processing begins.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The query compiler automatically resolves user-defined function names by querying the metadata repository and retrieving the appropriate function implementations. This self-service mechanism eliminates the need for manual configuration or complex system administration during query execution, as the compiler autonomously manages function resolution and invocation.

Inventive Principle:
Principle #25Self-service

3Ease of operation

If function instances are created for each query, then ease of operation is improved, but memory usage and resource consumption increase

Engineering Contradiction:
Improvequery processing simplicityVSAvoidmemory usage
Core Design Contradiction:
Ease of operationVSQuantity of substance

Solution Approach 1:

Multiple queries that reference the same user-defined function share a single function instance from the metadata repository. The system merges function resolutions by storing function implementations once in the repository and allowing multiple queries to reference and reuse the same registered function, eliminating redundant instantiations.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

Instead of creating full function instances for each query, the system creates lightweight references or pointers to the registered function definitions in the metadata repository. These references enable queries to access function implementations without duplicating the actual function code or state, significantly reducing memory consumption.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS8543558B2Support for user defined functions in a data stream management system
Publication Date: 2013.09.24 ORACLE INT CORP
  • US8543558B2 patent drawing
  • US8543558B2 patent drawing
  • US8543558B2 patent drawing

AI summary

A data stream management system (DSMS) is designed to support a new user-defined function, by creating and using at least two structures as follows. A first structure (“metadata entry”) is created in response to a command for creation of the new function, and maps a single instance of a class to the function's name. A second structure is created with creation of an operator on receipt of each new continuous query that uses the new function. The second structure (“operator specific data structure”) contains a path to the newly-created instance, which path is obtained by looking up the first structure. Additional second structures are created on receipt of additional continuous queries which use the new function, but all second structures contain the same path. All continuous queries use the same instance. Repeated use of a single instance to compile and execute multiple queries eliminates repeated instantiation of the same function.