Abstract
Modern big data frameworks often struggle to optimize workflows containing User-Defined Operators (UDOs), which appear as "black boxes" to traditional query optimizers. This paper introduces a formal model for Data-Parallel Program Synthesis (DPPS) that maps data-parallel tasks to the STRIPS planning formalism. By representing relational algebra operations and equivalence rules as planning actions, the authors demonstrate that off-the-shelf AI planners can automatically synthesize optimal distributed execution plans, effectively bridging the gap between high-level declarative queries and low-level distributed execution.
1. Introduction
In the landscape of modern data processing, frameworks like Hadoop, Hive, and Spark have become ubiquitous. While these systems offer scalability, they often lack the sophisticated optimization capabilities found in traditional relational database management systems (RDBMS). A primary reason is the prevalence of User-Defined Operators (UDOs)—custom code that encapsulates complex logic but remains opaque to the system's optimizer. Consequently, developers are frequently forced to manually design execution plans, a process that is both error-prone and likely to result in sub-optimal performance, especially when data movement costs across a network are high.
2. The Data-Parallel Program Synthesis (DPPS) Framework
To address this, the authors propose the Data-Parallel Program Synthesis (DPPS) framework. This model formalizes the components of a distributed computation: data chunks ($D$), processors ($N$) with specific memory constraints, computation primitives ($A$), and transmission costs ($T$).
The pivotal innovation lies in compiling DPPS tasks into the STRIPS (Stanford Research Institute Problem Solver) planning formalism. STRIPS represents actions through preconditions and effects, allowing an AI planner to search for a sequence of operations that transitions from an initial state to a goal state. By encoding relational algebra operations (e.g., SELECT, JOIN) and database equivalence rules as STRIPS operators, the system can explore the space of possible execution plans.
As shown in Figure 2, an equivalence rule like the commutativity of SELECT can be modeled as a planning action. This allows the planner to "prove" that different sequences of operations are equivalent and select the one with the lowest estimated cost.
3. Evaluation and Results
The approach was evaluated using a synthetic benchmark designed to generate multiple histograms from a single large table fragmented across a variable number of processors (2 to 64). The goal was to synthesize a plan that minimizes both data movement and redundant scans.
The results indicate that the framework is highly effective. Using the Fast Downward planner, the system successfully generated optimal plans for a 64-processor cluster in under 60 seconds.
Figure 1 illustrates the scalability of the planning process. While planning time increases with the number of processors and the complexity of the task (number of fields), it remains well within practical limits for offline or even some near-real-time optimization scenarios. Notably, the planner demonstrated "intelligence" by identifying opportunities to reuse data scans, even when not explicitly instructed by the user.
4. Conclusion and Future Work
This work demonstrates that AI planning techniques can be successfully applied to the domain of big data optimization. By treating UDOs and relational operations as planning actions, the DPPS framework enables automated, cost-based optimization of complex workflows.
However, challenges remain. Standard STRIPS does not natively handle numerical constraints like memory limits, and the requirement to define all potential data objects upfront can introduce overhead. Future research will focus on integrating numerical planning extensions (like PDDL2.1) and exploring the theoretical complexity overlap between database query optimization and AI planning to identify more tractable sub-problems for large-scale data processing.
Summary updated