Abstract
Resource Description Framework (RDF) is a data representation of the Semantic Web, and its data volume is growing rapidly. Cloud-based systems provide a rich platform for managing RDF data. However, there is a performance challenge in the distributed environment when RDF queries, which contain multiple join operations, such as network reshuffle and memory overhead, are processed. To get over this challenge, this paper proposes a Spark-based RDF query architecture, which is based on Semantic Connection Set (SCS). First of all, the proposed Spark-based query architecture adopts the mechanism of re-partitioning class data based on vertical partitioning, which can reduce memory overhead and spend up index data. Secondly, a method for generating query plans based on semantic connection set is proposed in this paper. In addition, some statistics and broadcast variable optimization strategies are introduced to reduce shuffling and data communication costs. The experiments of this paper are based on the latest SPARQLGX on the Spark platform RDF system. Two synthetic benchmarks are used to evaluate the query. The experiment results illustrate that the proposed approach in this paper is more efficient in data search than contrast systems.
Introduction
The explosion of Resource Description Framework (RDF) data within the Semantic Web has necessitated the move toward distributed management systems. While Apache Spark offers a robust platform for large-scale data processing, executing SPARQL queries—the standard for RDF—remains computationally expensive. The primary bottleneck is the "Join" operation; complex queries often require multiple joins that trigger massive data shuffles across the network. This results in significant latency and memory pressure. This paper introduces a novel architecture that leverages a Semantic Connection Set (SCS) to optimize these distributed joins.
Proposed Architecture and Methodology
The authors propose a two-pronged strategy to enhance performance: optimized storage through finer-grained partitioning and intelligent query execution.
Finer-Grained Vertical Partitioning
Traditional vertical partitioning (VP) organizes RDF triples into tables based on their predicates. However, certain predicates like rdf:type are disproportionately large, as they apply to nearly every entity in a dataset. As illustrated in Figure 5, the frequency of the "type" predicate can be several times higher than others, creating a massive data skew.
To address this, the proposed system sub-partitions rdf:type data into smaller "class index files" based on specific object classes. This allows the engine to load only the relevant subset of data for a given query, drastically reducing memory overhead.
SCS-Based Query Planning
The overall system architecture, shown in Figure 4, integrates these storage optimizations with a dynamic query execution engine.
The core innovation is the Semantic Connection Set (SCS) query planner. This greedy optimization strategy calculates the result sizes for individual triple patterns and constructs a join plan that prioritizes the smallest intermediate results (IRs). By joining smaller datasets first, the system minimizes the volume of data shuffled across the cluster. Additionally, the system employs broadcast variables for joins involving small datasets, allowing for fast local joins and further reducing network traffic.
Experimental Results
The system was evaluated using the LUBM (Lehigh University Benchmark) and WatDiv (Waterloo SPARQL Diversity Test Suite) benchmarks.
- Efficiency: The SCS approach consistently outperformed SPARQLGX and HadoopRDF across various query shapes (Linear, Star, and Snowflake).
- Scalability: As query complexity and the number of joins increased, the performance gap between the SCS system and traditional frameworks widened, demonstrating superior scalability.
- Robustness: The system showed particular strength on the WatDiv dataset, which features a high diversity of predicates, proving its effectiveness for varied data schemas.
Conclusion and Future Work
The SCS-based architecture significantly improves the efficiency of massive RDF data queries in Spark by optimizing both data partitioning and join ordering. Future research will explore the use of more detailed data distribution statistics (e.g., histograms) to further refine cost estimation and the implementation of more aggressive filtering techniques to reduce the volume of data entering the Spark pipeline.
Summary updated