State Machine Polyglot Subroutine Binding Management

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database management systems face inefficiencies in managing polyglot subroutine bindings for long-running database commands, particularly in handling concurrency and ensuring consistent evaluation of user-defined logic, which leads to scalability issues and overhead penalties.

Innovation Solution

The implementation of state machines to manage polyglot subroutine bindings, allowing each call site to transition through operational states (initial, optimized, and unready) to efficiently acquire and release shared resources, thereby reducing overhead and ensuring consistent evaluation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional synchronization mechanisms are used to ensure consistent evaluation of user-defined functions, then reliability is improved, but device complexity and overhead increase

Engineering Contradiction:
Improveconsistent evaluationVSAvoidsynchronization mechanism complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent implements dynamic state machines that transition between operational states (initial, optimized, unready) based on runtime conditions. This allows the system to adapt its synchronization behavior dynamically - using optimistic concurrency when possible and falling back to pessimistic locking when needed - thereby ensuring consistent evaluation while reducing overall complexity overhead

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent introduces an intermediary state machine layer between the query execution engine and user-defined functions. This state machine acts as a mediator that manages bindings and synchronization, isolating the complexity of consistency guarantees from both the query optimizer and the UDF execution, thereby improving reliability without burdening the core system components

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If polyglot subroutine bindings are managed for long-running database commands, then adaptability is improved, but loss of time increases due to binding management overhead

Engineering Contradiction:
Improvepolyglot subroutine supportVSAvoidbinding management overhead
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent performs preliminary binding resolution during query compilation and optimization phases, before actual execution begins. State machines are pre-configured with binding information, and initial bindings are resolved in advance. This preliminary action eliminates the need for repeated binding lookups during long-running command execution, thereby supporting polyglot subroutines while minimizing time loss

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent creates and maintains copies of binding information in multiple formats and locations - including parse trees, execution plans, and state machine configurations. These copies allow the system to support multiple programming languages (polyglot) without requiring repeated interpretation or resolution of binding information during execution, thereby reducing binding management overhead

Inventive Principle:
Principle #26Copying

3Productivity

If state machines are used to manage subroutine bindings, then productivity is improved through reduced overhead, but device complexity increases

Engineering Contradiction:
Improveexecution throughputVSAvoidstate machine implementation complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the state machine implementation into distinct, modular components - each handling specific aspects of binding management (e.g., initial state setup, optimization transitions, unready state recovery). This segmentation allows the complex state machine logic to be implemented as reusable, maintainable modules, thereby improving productivity through reduced overhead while managing implementation complexity through modular design

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS10990594B2Method for fast and consistent invocation of concurrently modifiable user-defined functions
Publication Date: 2021.04.27 ORACLE INT CORP
  • US10990594B2 patent drawing
  • US10990594B2 patent drawing
  • US10990594B2 patent drawing

AI summary

Database techniques are provided that use state machines to manage polyglot subroutine bindings for database commands. In an embodiment, a computer receives a database command that contains call sites (CSs). Each CS is associated with a user defined logic (UDL). The computer associates an initial operational state with each of the CSs. During a first invocation of a particular CS, the CS becomes initialized and transitions to an optimized state that is configured for streamlined invocation of the UDL. The UDL is invoked to contribute data to a partial result for the database command. Eventually, command execution stalls and causes the CS to transition to an unready state, which entails releasing shared resources. Later execution resumes and during another invocation of the CS, resources are reacquired, the CS is made ready and transitioned back to the optimized state. The CS may again be repeatedly invoked while revisiting the optimized state.