Query Translation Layer for Graph Engine Migration
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Companies migrating from one graph engine to another, such as Apache Tinkerpop to Oracle PGX, face the challenge of needing to rewrite Gremlin queries to PGQL queries, which is resource-intensive and wasteful as it requires re-implementing an interpreter and optimizer for the Gremlin protocol on the PGX engine.
Innovation Solution
The solution involves automatically transforming Gremlin queries into PGQL queries and vice versa, allowing the existing PGX infrastructure to compute results without reimplementing the Gremlin protocol, thereby supporting Gremlin workloads without requiring customers to rewrite their queries.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If Gremlin queries are manually rewritten to PGQL queries for migration, then compatibility with the target graph engine is improved, but development time and resource consumption increase significantly
Solution Approach 1:
The patent introduces an intermediary translation layer that automatically converts Gremlin queries to PGQL queries. This mediator system includes a query parser that reads Gremlin queries, a translator that converts them to PGQL syntax, and ensures compatibility with the PGX graph engine without requiring manual rewriting by customers.
Solution Approach 2:
The patent performs preliminary translation of Gremlin queries to PGQL queries before execution on the PGX engine. By pre-converting the query language in advance, the system eliminates the need for customers to manually rewrite queries during migration, saving significant development time and resources.
2Adaptability or versatility
If a separate Gremlin interpreter and optimizer are implemented on top of PGX, then Gremlin protocol support is achieved, but system complexity and maintenance burden increase
Solution Approach 1:
The patent makes the PGX graph engine universal by enabling it to handle both Gremlin and PGQL queries through automatic translation. The existing PGX infrastructure, including its optimizer and execution engine, is reused for both query languages, eliminating the need for separate Gremlin-specific components.
Solution Approach 2:
The translation layer acts as an intermediary that translates Gremlin queries to PGQL, allowing the existing PGX infrastructure to process Gremlin workloads without requiring a separate interpreter and optimizer implementation.
3Ease of operation
If Gremlin queries are translated to PGQL queries automatically, then customer query compatibility is maintained, but translation accuracy and query correctness may be affected
Solution Approach 1:
The patent implements feedback mechanisms in the translation process, including validation of translated PGQL queries against the original Gremlin query semantics, error detection, and correction. This ensures translation accuracy and maintains query correctness while preserving customer query compatibility.
Data Source
AI summary
To execute function-step-based graph queries on a graph engine that has its own graph query language, rather than re-implementing an existing infrastructure to support function-step-based graph protocols, function-step-based graph queries are transformed to the graph query language that is understood by the graph engine. The existing infrastructure computes the results of the transformed queries. Result sets are then transformed to function-based-based result sets, which are returned to customers. In this manner, the graph engine supports function-step-based graph query workloads without implementation of the function-step-based graph protocol.


