Distributed Graph Processing with Phase Barriers for Job Cancellation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing distributed graph processing systems are inefficient for interactive use cases due to their batch-processing design, lacking robust remote job control and synchronization mechanisms, which complicates cancellation of running jobs and handling exceptions, and are inflexible for concurrent client interactions.
Innovation Solution
A computer system that maintains input and output queues and uses a phase barrier to synchronize processing phases of distributed graph-processing jobs, allowing for abrupt termination and extensibility through a chain-of-responsibility software design pattern for handling diverse messages, enabling low-latency and nondestructive interruption and resubmission of jobs.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If distributed systems are designed for batch processing, then processing efficiency for large-scale graphs is improved, but interactivity and flexibility for concurrent clients deteriorate
Solution Approach 1:
The system dynamically adapts its processing mode based on job type and client requirements. The master thread can handle both batch processing jobs and interactive queries, switching between optimization modes. The phase barrier mechanism allows dynamic synchronization points that can be adjusted based on whether the job requires high throughput (batch) or low latency (interactive).
Solution Approach 2:
The distributed processing system is designed to handle multiple types of workloads through a unified architecture. The same master thread and worker threads can process both traditional batch processing jobs and interactive ad-hoc queries, eliminating the need for separate systems. The API supports both modes natively, providing universal functionality.
2Ease of operation
If dedicated client programs are provided for control, then ease of operation is improved, but flexibility and adaptability deteriorate
Solution Approach 1:
The system provides a universal API that can be used by both dedicated client programs and custom applications. The same low-level API serves both automated batch processing and interactive query interfaces, allowing maximum flexibility while maintaining ease of use through well-defined interfaces.
Solution Approach 2:
The master thread acts as an intermediary between clients and distributed workers, providing a standardized interface layer. This mediator handles both simple and complex operations uniformly, allowing clients to interact with the system through a consistent API regardless of the underlying complexity.
3Reliability
If cancellation mechanisms are made robust and reliable, then job control capability is improved, but system complexity and state management difficulty increase
Solution Approach 1:
The system establishes phase barriers at predetermined synchronization points before distributed jobs begin execution. These pre-positioned barriers provide natural cancellation points without requiring complex runtime coordination. When cancellation is requested, the system can cleanly terminate at the next phase barrier, maintaining reliability while avoiding excessive complexity.
Solution Approach 2:
The distributed job execution is segmented into discrete phases separated by barriers. This segmentation allows independent control and cancellation of specific phases without affecting the entire system. Each phase can be started, paused, or cancelled independently, simplifying state management while providing robust job control.
4Productivity
If distributed jobs are allowed to run concurrently, then productivity is improved, but synchronization difficulty and state management complexity increase
Solution Approach 1:
Phase barriers are established in advance at key synchronization points in the job execution flow. These pre-defined barriers provide natural coordination points for concurrent jobs without requiring complex runtime synchronization logic. Jobs can proceed independently until they reach a barrier, where synchronization occurs automatically.
Solution Approach 2:
The master thread continuously monitors the state of distributed jobs and provides feedback to coordinate phase transitions. When all workers reach a phase barrier, the master thread signals the next phase to begin. This feedback mechanism enables efficient synchronization of concurrent jobs while maintaining simple individual job logic.
Data Source
AI summary
Techniques herein provide job control and synchronization of distributed graph-processing jobs. In an embodiment, a computer system maintains an input queue of graph processing jobs. In response to de-queuing a graph processing job, a master thread partitions the graph processing job into distributed jobs. Each distributed job has a sequence of processing phases. The master thread sends each distributed job to a distributed processor. Each distributed job executes a first processing phase of its sequence of processing phases. To the master thread, the distributed job announces completion of its first processing phase. The master thread detects that all distributed jobs have announced finishing their first processing phase. The master thread broadcasts a notification to the distributed jobs that indicates that all distributed jobs have finished their first processing phase. Receiving that notification causes the distributed jobs to execute their second processing phase. Queues and barriers provide for faults and cancellation.


