Graph Database Dual-Write Sharding for Consistent Parallel Queries
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Maintaining multiple copies of a graph database while ensuring data integrity and reducing query processing time is challenging, especially during high demand periods and in the presence of user groups with varying access permissions and potential fraudulent activities.
Innovation Solution
A computer system divides queries into sub-queries using hash values to distribute them across multiple database repositories, concurrently updates duplicate databases, and validates storage to ensure data consistency across copies.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If multiple copies of graph database are maintained for high availability and concurrent access, then query processing capacity and system reliability are improved, but data consistency and integrity across copies become harder to maintain
Solution Approach 1:
The system segments the graph database into multiple independent copies or shards distributed across different database repositories. Each copy can be independently queried and updated, enabling parallel processing while maintaining data consistency through the dual-write mechanism that ensures identical updates are applied to all segments simultaneously.
Solution Approach 2:
The patent employs duplicate copies of the graph database stored in different database repositories. These copies are maintained through concurrent dual-write operations that ensure data consistency across all replicas, allowing multiple users to access different copies simultaneously without interfering with each other while guaranteeing data integrity.
2Reliability
If data is stored concurrently to multiple database repositories to ensure data integrity, then data consistency is improved, but storage time and system performance deteriorate
Solution Approach 1:
The dual-write mechanism enables continuous concurrent writing to multiple database repositories simultaneously. Instead of sequential writes that would cause delays, the system performs parallel write operations to multiple copies at the same time, maintaining data integrity across all repositories without adding storage time overhead.
Solution Approach 2:
The system performs preliminary validation and preparation of data before concurrent write operations. By pre-validating the data format and structure, the system ensures that subsequent concurrent writes to multiple repositories proceed efficiently without requiring re-validation, thus maintaining data integrity while minimizing storage time.
3Adaptability or versatility
If separate database copies are maintained for different user groups with varying access permissions, then security and access control are improved, but query processing complexity increases
Solution Approach 1:
The system applies local quality by configuring different access permissions and validation rules for different user groups on specific database copies. Each user group can access only the copies they are authorized for, with tailored permission sets. This localized approach to access control simplifies query processing by reducing the number of copies each user needs to query compared to a universal access model.
4Speed
If duplicate databases are updated concurrently to reduce query response time, then query performance is improved, but workload coordination and validation complexity increase
Solution Approach 1:
The system segments query workloads into independent units that can be distributed across multiple database copies. By dividing queries into sub-queries that can be executed in parallel on different copies, the system reduces query response time while managing coordination complexity through structured workload distribution and result aggregation.
Data Source
AI summary
A method for operating a graph database, including receiving, by a computer system, a query to a particular graph database, the query identifying a plurality of vertices of the particular graph database. The method further includes performing, by the computer system, hash operations on two or more of the plurality of vertices to generate respective hash values and dividing, using the respective hash values, the query into a plurality of sub-queries, each corresponding to a subset of the plurality of vertices. The method also includes sending, by the computer system, ones of the plurality of sub-queries to a plurality of database repositories for the particular graph database.


