[Paper Review] S2RDF: RDF Querying with SPARQL on Spark
S2RDF introduces ExtVP, a novel relational partitioning schema for RDF data that uses semi-join reductions to minimize query input size regardless of query shape. Built on Apache Spark, it compiles SPARQL to SQL and achieves sub-second query performance on billion-triple datasets, outperforming state-of-the-art SPARQL-on-Hadoop systems by an order of magnitude on average, even for high-diameter queries.
RDF has become very popular for semantic data publishing due to its flexible and universal graph-like data model. Yet, the ever-increasing size of RDF data collections makes it more and more infeasible to store and process them on a single machine, raising the need for distributed approaches. Instead of building a standalone but closed distributed RDF store, we endorse the usage of existing infrastructures for Big Data processing, e.g. Hadoop. However, SPARQL query performance is a major challenge as these platforms are not designed for RDF processing from ground. Thus, existing Hadoop-based approaches often favor certain query pattern shape while performance drops significantly for other shapes. In this paper, we describe a novel relational partitioning schema for RDF data called ExtVP that uses a semi-join based preprocessing, akin to the concept of Join Indices in relational databases, to efficiently minimize query input size regardless of its pattern shape and diameter. Our prototype system S2RDF is built on top of Spark and uses its relational interface to execute SPARQL queries over ExtVP. We demonstrate its superior performance in comparison to state of the art SPARQL-on-Hadoop approaches using the recent WatDiv test suite. S2RDF achieves sub-second runtimes for majority of queries on a billion triples RDF graph.
Motivation & Objective
- To address the performance bottleneck of SPARQL query processing on large-scale RDF data in distributed environments.
- To overcome the limitations of existing Hadoop-based SPARQL engines that degrade on unselective or high-diameter queries.
- To enable efficient, interactive SPARQL querying on RDF data using general-purpose Big Data platforms like Spark, without relying on specialized RDF stores.
- To design a storage schema that reduces input size for any SPARQL query pattern, regardless of structural complexity or diameter.
- To provide a practical trade-off between storage overhead and performance via a configurable selectivity threshold for ExtVP tables.
Proposed method
- ExtVP extends Vertical Partitioning (VP) by precomputing semi-join reductions based on join correlations between triple patterns in SPARQL queries.
- It uses a selectivity factor (SF) threshold to materialize only high-selectivity ExtVP tables, reducing storage overhead while preserving performance benefits.
- SPARQL queries are compiled into Spark SQL queries using table statistics to select the most selective tables for execution.
- The system leverages Spark’s in-memory SQL interface for efficient, distributed query execution over the ExtVP schema.
- The approach is conceptually similar to Join Indices in relational databases, but tailored for RDF’s triple-based structure and SPARQL’s pattern matching.
- A query compiler selects optimal tables based on selectivity to minimize input size and execution cost.
Experimental results
Research questions
- RQ1Can a relational partitioning schema for RDF data significantly reduce input size for any SPARQL query pattern, regardless of diameter or shape?
- RQ2Can ExtVP achieve sub-second query performance on billion-triple RDF graphs using Spark, even for complex or unselective queries?
- RQ3How does the inclusion of a selectivity threshold for ExtVP tables affect the trade-off between storage overhead and query performance?
- RQ4How does S2RDF compare in performance to state-of-the-art SPARQL-on-Hadoop systems across diverse query workloads?
- RQ5Can a general-purpose Big Data platform like Spark be effectively used for interactive SPARQL querying on large RDF datasets with minimal performance degradation?
Key findings
- S2RDF achieves sub-second query runtimes for the majority of queries on a billion-triple RDF dataset using the WatDiv test suite.
- On average, S2RDF outperforms state-of-the-art SPARQL-on-Hadoop systems by an order of magnitude across all query shapes.
- With a selectivity threshold of 0.25, S2RDF achieves 95% of the performance benefit of the full ExtVP schema while using only 25% of the table tuples and storage size.
- Linear, star-shaped, and complex queries show minimal performance gain beyond SF TH = 0.25, while snowflake-shaped queries (e.g., F3, F5) benefit from higher thresholds due to intermediate tables with 0.25 < SF < 0.5.
- The performance of S2RDF is independent of query diameter, unlike existing systems that degrade significantly on long chains or unselective queries.
- ExtVP reduces input size by excluding dangling tuples through precomputed semi-join reductions, which is effective for all query patterns, not just small-diameter ones.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.