User-Defined Functions in Distributed Database Orchestration
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Distributed database systems face delays in processing database changes due to the limitations of triggers, which are not language agnostic, cannot interact with APIs, and require complex orchestration layers that are bulky and inefficient, leading to suboptimal transaction times, especially in time-critical scenarios like stock price alerts.
Innovation Solution
A lightweight orchestration layer powered by user-defined functions (UDFs) that operate on CRUD operations, allowing for optimized transaction speeds by executing UDFs within the same subnet and firewall as the primary database, eliminating the need for external calls and reducing latency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If a complex orchestration layer is used to enable integration with third-party applications, then functionality and adaptability are improved, but device complexity and transaction time increase
Solution Approach 1:
The patent extracts the orchestration logic from a separate complex layer and integrates it directly into the database engine. User-defined functions are executed within the database's own process space, eliminating the need for external orchestration infrastructure and reducing system complexity while maintaining integration capabilities.
Solution Approach 2:
The patent merges the orchestration functionality with the database engine itself. By allowing user-defined functions to execute within the database process space and use internal data structures directly, the system combines what were previously separate components (orchestration layer and database engine) into a unified system, reducing complexity and improving transaction speed.
2Ease of operation
If a pull mechanism is used for monitoring database changes, then ease of operation is improved, but loss of time increases due to polling delays
Solution Approach 1:
The patent inverts the traditional pull-based monitoring approach by implementing a push mechanism. User-defined functions are automatically executed and results are pushed back to the database engine immediately upon data changes, eliminating the need for periodic polling and reducing response time from seconds to milliseconds.
3Adaptability or versatility
If external calls are used for user-defined functions, then adaptability is improved, but speed decreases due to network latency and firewall crossings
Solution Approach 1:
The patent introduces an intermediary mechanism - a dedicated communication channel within the database process space - that allows user-defined functions to access database data without external network calls. This intermediary approach maintains the ability to execute custom logic while eliminating network latency and firewall-related delays.
Solution Approach 2:
The patent creates a local copy of the necessary data within the database process space, allowing user-defined functions to operate on in-memory data structures rather than requiring external network access. This copying approach preserves functionality while dramatically improving access speed by eliminating network I/O.
Data Source
AI summary
Optimizing transaction times for distributed databases is described. A system receives a request which specifies an identifier of a database record associated with a distributed database. If the request is associated with a primary database of the distributed database, any user-defined function is associated with the database record in the primary database, and any associated user-defined function does not require any call that is external to a subnet and/or a firewall associated with the primary database, then the system executes, within the subnet and/or the firewall associated with the primary database, each associated user-defined function for the database record in the primary database. The system outputs a result which is based on executing any associated user-defined functions.


