<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Querying Large-scale RDF Datasets Using the SANSA Framework</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Claus Stadler</string-name>
          <email>cstadler@informatik.uni-leipzig.de</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gezim Sejdiu</string-name>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Damien Graux</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jens Lehmann</string-name>
          <email>jens.lehmanng@cs.uni-bonn.de</email>
          <email>jens.lehmanng@iais.fraunhofer.de</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>ADAPT Centre, Trinity College of Dublin</institution>
          ,
          <country country="IE">Ireland</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Enterprise Information Systems</institution>
          ,
          <addr-line>Fraunhofer IAIS</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Institute for Applied Informatics (InfAI), University of Leipzig</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>Smart Data Analytics, University of Bonn</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper we present Sparklify: a scalable software component for e cient evaluation of SPARQL queries over distributed RDF datasets. In particular, we demonstrate a W3C SPARQL endpoint powered by our SANSA framework's RDF partitioning system and Apache Spark for querying the DBpedia knowledge base. This work is motivated by the lack of Big Data SPARQL systems that are capable of exposing large-scale heterogeneous RDF datasets via a Web SPARQL endpoint.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        One of such systems, built on the concepts of RDDs and SparkSQL, is
Sparklify [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] { a scalable software component for e cient evaluation of SPARQL
queries over distributed RDF datasets, already integrated into the SANSA
framework. It evaluates SPARQL queries while transforming them into a lower-level
of Spark programs. Our Sparklify query processor interfaces with Apache Spark
and can be used programmatically within Big Data work ow construction and
in SPARQL server mode. In contrast, most of the existing systems only feature
cli-oriented prototypes.
      </p>
      <p>In this demonstration, we present and describe our implementation of the
SANSA SPARQL endpoint. This interface allows access to the RDF data using
the common SPARQL endpoint which provides an easy-to-use method to run
SPARQL queries via the Web2.</p>
      <p>
        This is an accompanying poster paper for Sparklify [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], which was accepted
at the ISWC resource track. The addition made in this demo is the SPARQL
endpoint Web interface for Sparklify, which enables executing SPARQL queries
on-the- y using the Web interface i.e., without engineering e orts and command
line interfaces.
2
      </p>
      <p>
        Querying large-scale RDF data: DBpedia as a use case
DBpedia [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] is among the largest and most well-known sources of structured
information on the Web. The public DBpedia SPARQL endpoint3 at present o ers
access to 438.336.350 triples representing information in a variety of domains. In
addition, with public downloads of auxiliary information the data size exceeds
a billion triples. Due to its size and variety, DBpedia is often used as a test-bed
for novel Linked Data technology in order to analyze strengths and weaknesses.
For these reasons, we choose to run Sparklify over the DBpedia knowledge base.
The whole pipeline is described below.
      </p>
      <p>Figure 1 depicts the Sparklify architecture. The data (e.g. DBpedia
knowledge graph) rst has to be loaded on a distributed le system (Step 1 ). In our
case, we use Hadoop Distributed File System (HDFS) for storing the RDF graph
that SANSA can read e ciently. Afterwards, data ingestion is performed (Step
2 ). SANSA reads RDF data into an initial RDD of triples. Sparklify applies data
partition in parallel over the initial RDD (Step 3, part one). This partitioning
facilitates fast querying by giving both the SPARQL-to-SQL rewriter and the
Spark processor additional opportunities for pruning during static query
analysis. These partitioned data are then queried, based on the input SPARQL query
(Step 1 ) using the Sparq lify system { a SPARQL to SQL rewriter. This
leverage the potential of the optimizers of both the rewriter as well as those of the
underlying frameworks for SQL. The raw output of a query execution is a pair
comprised of the resulting RDD together with a mapping for construction of the
corresponding SPARQL result set, i.e. a set of bindings. The mapping associates
each of the requested SPARQL query's result variables with an expression over
2 Demo. resources: https://github.com/SANSA-Stack/SANSA-Examples
3 https://dbpedia.org/sparql
SANSA Engine
3</p>
      <p>Partitioning
Data Ingestion</p>
      <p>RDF Layer</p>
      <p>Views Views
Sparklifying
Query Layer</p>
      <p>4
Distributed Data</p>
      <p>Structures
the RDD schema, such that from each RDD row a corresponding binding can be
computed. Hence, the output is again a distributed data structure which can
further processed in a distributed fashion (Step 4 ) or visualized or as a result set of
records (Step 5 ). Figure 2 demonstrates reuse of a third-party SPARQL-based
Wikidata visualization app4 for DBpedia data served with SANSA.
3</p>
    </sec>
    <sec id="sec-2">
      <title>Conclusion</title>
      <p>Processing and querying RDF data becomes challenging when the size of the
data increases. To solve it, many systems have been proposed and try to solve it
using the distributed computing framework. Most of the existing systems mostly
are cli-oriented prototypes. This brings many confusion and a lot of engineering
e ort in order to run SPARQL queries over it. Most of the users, who are familiar
with the semantic web technologies, are capable of writing SPARQL queries. But,
when it requires cluster con guration, and running prototypes from the source; it
is considered as a dead-end. Therefore, we wanted to bring Sparklify { a scalable
software framework for e cient evaluation of SPARQL queries over distributed
RDF datasets. It contains a user interface as a SPARQL endpoint for easy to
write and query RDF data distributed across the Spark cluster.</p>
    </sec>
    <sec id="sec-3">
      <title>Acknowledgment</title>
      <p>This work was partly supported by the EU Horizon2020 projects
BigDataOcean (GA no. 732310), Boost4.0 (GA no. 780732), SLIPO (GA no. 731581) and
QROWD (GA no. 723088).
4 https://github.com/stevenliuyi/wikidata-visualization</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Armbrust</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xin</surname>
            ,
            <given-names>R.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lian</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Huai</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bradley</surname>
            ,
            <given-names>J.K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Meng</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaftan</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Franklin</surname>
            ,
            <given-names>M.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ghodsi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zaharia</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <string-name>
            <surname>Spark</surname>
            <given-names>SQL</given-names>
          </string-name>
          :
          <article-title>Relational Data Processing in Spark</article-title>
          .
          <source>In: Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data</source>
          . pp.
          <volume>1383</volume>
          {
          <fpage>1394</fpage>
          . SIGMOD '15,
          <string-name>
            <surname>ACM</surname>
          </string-name>
          , New York, NY, USA (
          <year>2015</year>
          ). https://doi.org/10.1145/2723372.2742797, http://doi.acm.
          <source>org/ 10</source>
          .1145/2723372.2742797
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Graux</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jachiet</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Geneves</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          , Layada, N.:
          <article-title>SPARQLGX: E cient Distributed Evaluation of SPARQL with Apache Spark</article-title>
          . In: Groth,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>Simperl</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            ,
            <surname>Gray</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Sabou</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          , Krotzsch,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Lecue</surname>
          </string-name>
          ,
          <string-name>
            <surname>F.</surname>
          </string-name>
          , Flock,
          <string-name>
            <given-names>F.</given-names>
            ,
            <surname>Gil</surname>
          </string-name>
          ,
          <string-name>
            <surname>Y</surname>
          </string-name>
          . (eds.)
          <source>The Semantic Web { ISWC 2016</source>
          . pp.
          <volume>80</volume>
          {
          <fpage>87</fpage>
          . Springer International Publishing,
          <string-name>
            <surname>Cham</surname>
          </string-name>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Lehmann</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Isele</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jakob</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jentzsch</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kontokostas</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mendes</surname>
            ,
            <given-names>P.N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hellmann</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Morsey</surname>
            , M., van Kleef,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Auer</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bizer</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>DBpedia - a large-scale, multilingual knowledge base extracted from wikipedia</article-title>
          .
          <source>Semantic Web Journal</source>
          <volume>6</volume>
          (
          <issue>2</issue>
          ),
          <volume>167</volume>
          {
          <fpage>195</fpage>
          (
          <year>2015</year>
          ), http://jens-lehmann.org/files/2014/swj_dbpedia.pdf
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Lehmann</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sejdiu</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          , Buhmann, L.,
          <string-name>
            <surname>Westphal</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stadler</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ermilov</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bin</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chakraborty</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Saleem</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Ngonga</given-names>
            <surname>Ngomo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.C.</given-names>
            ,
            <surname>Jabeen</surname>
          </string-name>
          , H.:
          <article-title>Distributed semantic analytics using the SANSA stack</article-title>
          .
          <source>In: ISWC Resources Track</source>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5. Schatzle,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Przyjaciel-Zablocki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Skilevic</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Lausen</surname>
          </string-name>
          , G.:
          <article-title>S2RDF: RDF querying with SPARQL on Spark</article-title>
          .
          <source>Proc. VLDB Endow</source>
          .
          <volume>9</volume>
          (
          <issue>10</issue>
          ),
          <volume>804</volume>
          {815 (Jun
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Stadler</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sejdiu</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Graux</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lehmann</surname>
          </string-name>
          , J.:
          <article-title>Sparklify: A Scalable Software Component for E cient Evaluation of SPARQL Queries over Distributed RDF Datasets</article-title>
          .
          <source>In: Proceedings of 18th International Semantic Web Conference</source>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Zaharia</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chowdhury</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Das</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dave</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ma</surname>
          </string-name>
          , J.,
          <string-name>
            <surname>McCauley</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Franklin</surname>
            ,
            <given-names>M.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shenker</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stoica</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Resilient distributed datasets: A fault-tolerant abstraction for in-memory cluster computing</article-title>
          .
          <source>In: Proceedings of the 9th USENIX conference on Networked Systems Design and Implementation</source>
          . pp.
          <volume>2</volume>
          {
          <issue>2</issue>
          .
          <string-name>
            <given-names>USENIX</given-names>
            <surname>Association</surname>
          </string-name>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>