Query Translation Layer for Graph Engine Migration

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvecompatibility with target graph engineVSAvoiddevelopment time and resource consumption
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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.

Inventive Principle:
Principle #10Preliminary action

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

Engineering Contradiction:
ImproveGremlin protocol supportVSAvoidsystem complexity and maintenance burden
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

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.

Inventive Principle:
Principle #6Universality (Multi-functionality)

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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

Engineering Contradiction:
Improvecustomer query compatibilityVSAvoidtranslation accuracy and query correctness
Core Design Contradiction:
Ease of operationVSReliability

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.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS11537609B2Transforming a function-step-based graph query to another graph query language
Publication Date: 2022.12.27 ORACLE INT CORP
  • US11537609B2 patent drawing
  • US11537609B2 patent drawing
  • US11537609B2 patent drawing

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.