Asynchronous Task Queue for Distributed Graph Database Consistency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In distributed graph database architectures, ensuring accurate and efficient execution of modification tasks across storage nodes is challenging due to inconsistencies and inefficiencies in task distribution and execution.
Innovation Solution
Implementing an asynchronous task queue in the configuration center and an asynchronous task receiving queue in storage nodes, where the configuration center generates change tasks based on user modifications and sends them to storage nodes via heartbeat packets for sequential execution, ensuring consistency and improving task distribution accuracy and efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Manufacturing precision
If the configuration center directly distributes modification tasks to storage nodes without using an asynchronous task queue, then the task distribution process is simple, but the execution accuracy and consistency of modification tasks across storage nodes deteriorates
Solution Approach 1:
The patent segments the task distribution process into multiple stages: task generation in the configuration center, asynchronous queuing, heartbeat-based task retrieval, and sequential execution at storage nodes. This segmentation allows each component to handle specific sub-tasks independently, improving overall task distribution accuracy while managing complexity through modular design.
Solution Approach 2:
The patent introduces an asynchronous task queue as an intermediary between the configuration center and storage nodes. This mediator decouples the task generation process from the execution process, allowing the configuration center to generate tasks asynchronously while storage nodes retrieve and execute them in sequence, thereby improving task distribution accuracy without requiring direct synchronous communication.
2Productivity
If storage nodes execute modification tasks concurrently without sequential control, then the execution speed increases, but the consistency and reliability of the storage cluster deteriorates
Solution Approach 1:
The patent implements preliminary actions by having storage nodes send heartbeat packets before receiving tasks and by pre-establishing asynchronous task queues. The configuration center uses these heartbeats to determine which storage nodes are ready to receive and execute tasks, ensuring that tasks are distributed only to available nodes and executed in a controlled sequence, thereby maintaining consistency while enabling efficient parallel processing.
Solution Approach 2:
The patent implements a feedback mechanism through heartbeat packets exchanged between storage nodes and the configuration center. Storage nodes send heartbeats to report their status, and the configuration center uses this feedback to intelligently distribute tasks. This feedback loop ensures that tasks are assigned to nodes that are ready and can execute them properly, maintaining cluster consistency while enabling efficient task execution.
3Reliability
If the configuration center waits for storage nodes to be ready before distributing tasks, then the task execution reliability increases, but the task distribution time and system responsiveness deteriorates
Solution Approach 1:
The patent implements periodic action through heartbeat packets that storage nodes send at regular intervals to the configuration center. Instead of the configuration center continuously polling or waiting for storage nodes, the periodic heartbeats provide status updates at predetermined intervals. This allows the configuration center to distribute tasks promptly when heartbeats indicate nodes are ready, maintaining reliability while reducing unnecessary waiting time and improving system responsiveness.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
The present application discloses a method and apparatus for performing a modification task, an electronic device and a readable storage medium, and relates to the fields of deep learning technologies, knowledge graph technologies and big data technologies. An implementation includes: by a configuration center, receiving (S101) and executing (S101) a modification task, and locally storing (S101) modified state data and/or configuration data; generating (S102) a change task according to the modified state data and/or configuration data, and adding (S102) the change task into an asynchronous task queue corresponding to each storage node; receiving (S103) a heartbeat packet sent by the storage node; and taking out (S104) the added change task from the asynchronous task queue corresponding to the storage node, and adding (S104) the taken-out change task into a return message of the heartbeat packet to send the taken-out change task to the storage node. The implementation further includes: by a storage node, sending a heartbeat packet to a configuration center; receiving a return message of a heartbeat packet sent by the configuration center, the return message of the heartbeat packet including a change task; and adding the change task into an asynchronous task receiving queue for sequential execution.