Skip to main content
QUICK REVIEW

[Paper Review] SPARQL query processing with Apache Spark

Hubert Naacke, Olivier Curé|arXiv (Cornell University)|Apr 29, 2016
Graph Theory and AlgorithmsComputer Science27 references13 citations
TL;DR

This paper proposes and evaluates five Apache Spark-based SPARQL query processing strategies, introducing a novel hybrid approach (SPARQL Hybrid) that combines partitioned and broadcast joins to minimize data transfer. It achieves up to 2.4x faster query execution than state-of-the-art systems, especially on complex query shapes like snowflake and chain patterns, by intelligently selecting join strategies based on data size and selectivity.

ABSTRACT

The number of linked data sources and the size of the linked open data graph keep growing every day. As a consequence, semantic RDF services are more and more confronted to various "big data" problems. Query processing is one of them and needs to be efficiently addressed with executions over scalable, highly available and fault tolerant frameworks. Data management systems requiring these properties are rarely built from scratch but are rather designed on top of an existing cluster computing engine. In this work, we consider the processing of SPARQL queries with Apache Spark. We propose and compare five different query processing approaches based on different join execution models and Spark components. A detailed experimentation, on real-world and synthetic data sets, emphasizes that two approaches tailored for the RDF data model outperform the other ones on all major query shapes, i.e., star, snowflake, chain and hybrid.

Motivation & Objective

  • To address the scalability and performance challenges of SPARQL query processing on large-scale RDF data in distributed environments.
  • To evaluate and compare multiple Spark-based query processing strategies for RDF data, focusing on join execution models and data partitioning.
  • To design a hybrid query execution strategy that minimizes data transfer and leverages Spark's in-memory capabilities for improved performance.
  • To validate the proposed approach against existing systems like S2RDF and state-of-the-art distributed SPARQL engines using real-world and synthetic datasets.
  • To reduce pre-processing overhead while maintaining high query efficiency, making the system practical for real-world deployment.

Proposed method

  • Proposes a formal cost model for distributed SPARQL query processing based on data transfer and join strategy selection.
  • Implements five distinct Spark-based SPARQL query processing strategies: SPARQL SQL, SPARQL RDD, SPARQL DF, SPARQL Hybrid RDD, and SPARQL Hybrid DF.
  • Uses Spark's RDD and Dataset APIs to represent RDF data and execute query plans, with data compression (DF) to reduce I/O and transfer costs.
  • Applies a hybrid join strategy that dynamically selects between broadcast join (for small relations) and partitioned join (for large relations) to minimize data movement.
  • Employs data partitioning and selective broadcasting based on estimated result sizes and selectivity to optimize join execution.
  • Integrates with Spark SQL but extends its capabilities by exposing low-level join optimization options not fully utilized by Catalyst optimizer.

Experimental results

Research questions

  • RQ1How do different Spark-based SPARQL query processing strategies compare in terms of execution time and data transfer overhead?
  • RQ2Can a hybrid join strategy combining broadcast and partitioned joins outperform existing approaches on diverse SPARQL query patterns?
  • RQ3To what extent does data compression (DF representation) improve performance in memory-constrained Spark clusters?
  • RQ4How does the proposed hybrid approach compare with S2RDF, a state-of-the-art Spark-based SPARQL engine, in terms of query speed and data transfer reduction?
  • RQ5Can the proposed approach be effectively combined with S2RDF’s VP fragmentation model to further improve performance?

Key findings

  • The SPARQL Hybrid approach outperforms the best existing system by a factor of up to 2.4 in query execution time across all major query shapes.
  • SPARQL Hybrid reduces data transfers by saving 483MB for star queries, 284MB for snowflake queries, and 1.7GB for complex queries compared to baseline approaches.
  • The hybrid strategy reduces the number of data accesses from five (SPARQL DF) to two, significantly improving efficiency.
  • SPARQL Hybrid DF achieves up to 6.2x speedup over SPARQL DF on uncompressed data, primarily due to drastically reduced data transfer.
  • The approach is compatible with S2RDF’s VP fragmentation model and improves its performance by 1.72x to 2.16x, demonstrating strong synergy.
  • The system achieves faster response times than S2RDF (e.g., 3.6s vs. 8.8s for query S1), even with less hardware, highlighting efficiency gains.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.