Database Runtime Algorithm Overrides for Scalable User Customization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Modifying default algorithms configured in a database server to accommodate individual user or customer needs is cumbersome and difficult, especially when interacting with other algorithms, leading to scalability issues and performance degradation.
Innovation Solution
An override algorithm is defined externally to the database server, mapped to a default algorithm, and executed at runtime to provide customized results without altering the default algorithm's code, with mechanisms for mapping and caching to ensure seamless integration and performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If default algorithms are modified to accommodate individual user needs, then customization capability is improved, but device complexity and difficulty of modification increase
Solution Approach 1:
The system segments algorithm execution into two independent parts: the default algorithm (unchanged, optimized code) and the override algorithm (customizable, user-defined). This segmentation allows customization without modifying the original algorithm, resolving the contradiction between adaptability and complexity.
Solution Approach 2:
The override algorithm acts as an intermediary layer between the user's customization needs and the default algorithm. Instead of directly modifying the default algorithm, users define override algorithms that intercept and modify specific algorithm steps, reducing modification complexity while maintaining customization capability.
2Adaptability or versatility
If default algorithms are modified for each user, then adaptability is improved, but scalability deteriorates
Solution Approach 1:
Instead of modifying the original default algorithm for each user, the system creates separate override algorithm copies that can be independently defined and applied. This allows unlimited users to have customized algorithms without affecting the original or each other, improving scalability.
Solution Approach 2:
The system enables dynamic algorithm selection at runtime based on user identity or context. The default algorithm remains static and optimized, while override algorithms are dynamically loaded and applied only when needed, maintaining scalability while providing personalized customization.
3Adaptability or versatility
If default algorithms are modified, then customization is improved, but execution performance deteriorates
Solution Approach 1:
The customization logic is extracted from the default algorithm into separate override algorithms. This extraction preserves the performance-optimized default algorithm unchanged while allowing customization through independent override implementations, maintaining execution performance.
Solution Approach 2:
Override algorithms are designed as lightweight, disposable objects that are only executed when needed for specific users or contexts. The expensive default algorithm remains cached and optimized, while override algorithms are inexpensive alternatives that don't impact overall system performance.
4Adaptability or versatility
If algorithm dependencies are increased to support customization, then adaptability is improved, but difficulty of detecting and measuring increases
Solution Approach 1:
The override algorithm serves as an intermediary that clearly defines its dependencies on the default algorithm and external inputs. This structured intermediary approach makes dependency tracking easier compared to direct modification of complex algorithm interdependencies.
Data Source
AI summary
A system and method for overriding an algorithm at runtime include providing an override algorithm mapped to a first algorithm to override the first algorithm in a database, the override algorithm configured to provide a return value in a memory location corresponding to a result node of the first algorithm; receiving a trigger event that causes the first algorithm to be utilized in a computation; in response to receiving the triggering event, utilizing the override algorithm in place of the first algorithm in the computation; and storing the return value from the override algorithm in the memory location that corresponds to the result node of the first algorithm.


