<!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>The Tale of Sansa Spark</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ivan Ermilov</string-name>
          <email>iermilov@informatik.uni-leipzig.de</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jens Lehmann</string-name>
          <email>jens.lehmann@cs.uni-bonn.de</email>
          <email>jens.lehmann@iais.fraunhofer.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gezim Sejdiu</string-name>
          <email>sejdiu@cs.uni-bonn.de</email>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Lorenz Bühmann</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Patrick Westphal</string-name>
          <email>patrick.westphal@informatik.uni-leipzig.de</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Claus Stadler</string-name>
          <email>cstadler@informatik.uni-leipzig.de</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Simon Bin</string-name>
          <email>sbin@informatik.uni-leipzig.de</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nilesh Chakraborty</string-name>
          <email>chakrabo@cs.uni-bonn.de</email>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Henning Petzka</string-name>
          <email>henning.petzka@iais.fraunhofer.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Muhammad Saleem</string-name>
          <email>saleem@informatik.uni-leipzig.de</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Axel-Cyrille Ngonga Ngomo</string-name>
          <email>axel.ngonga@uni-paderborn.de</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hajira Jabeen</string-name>
          <email>jabeen@cs.uni-bonn.de</email>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Fraunhofer IAIS</institution>
          ,
          <addr-line>Bonn</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Institute for Applied Informatics (InfAI), University of Leipzig</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Paderborn University, Data Science Group</institution>
          ,
          <addr-line>Paderborn</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>University of Bonn</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We demonstrate the open-source Semantic Analytics Stack (SANSA), which can perform scalable analysis of large-scale knowledge graphs to facilitate applications such as link prediction, knowledge base completion and reasoning. The motivation behind this work lies in the lack of scalable methods for analytics which exploit expressive structures underlying semantically structured knowledge bases. The demonstration is based on the BigDataEurope technical platform, which utilizes Docker technology. We present various examples of using SANSA in the form of interactive Spark notebooks, which are executed with Apache Zeppelin. The technical platform and the notebooks are available on SANSA Github and can be deployed on any Docker-enabled host, locally or in a Docker Swarm cluster.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        SANSA5 is an open-source6 structured data processing engine for performing distributed
computation over large-scale RDF datasets [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. It provides data distribution, scalability
and fault tolerance for (1) manipulating large RDF datasets, and (2) applying analytics
on the data at scale by making use of cluster-based big data processing engines. In this
demonstration paper, we describe a web-based prototype for interacting with SANSA
via a web interface.7 SANSA comes with: (i) specialised serialisation mechanisms
and partitioning schemata for RDF, using vertical partitioning strategies, (ii) a scalable
query engine for large RDF datasets and different distributed representation formats
for RDF, (iii) an adaptive reasoning engine which derives an efficient execution and
evaluation plan from a given set of inference rules, (iv) several distributed structured
machine learning algorithms that can be applied on large-scale RDF data, and (v) a
framework with a unified API that aims to combine distributed in-memory computation
technology with semantic technologies. To achieve the goal of storing and manipulating
      </p>
    </sec>
    <sec id="sec-2">
      <title>5 http://sansa-stack.net/</title>
      <p>6 https://github.com/SANSA-Stack
7 Please note that any similarities of the paper title to popular TV series are purely coincidental.
large RDF datasets, SANSA leverages existing big data frameworks like Apache Spark
and Apache Flink,8 which have matured over the years and offer a reliable method for
general-purpose processing of large-scale data.</p>
      <p>In this demonstration, we will present and describe our implementation of interactive
Spark Notebooks for SANSA.9 These notebooks are a collaborative environment
implemented as an interactive web editor. They allow access to the SANSA layers and hence
provide data scientists, data engineers and students with means to easily use and execute
the functionality of SANSA to explore, analyze and learn from large-scale RDF datasets.
2</p>
      <p>
        The SANSA Stack
Research efforts in the areas of distributed analytics and semantic technologies have
been mostly isolated until now. We aim to proceed one step further by using the semantic
modelling standard as a basis for machine learning and data analytics. The layered
architecture of SANSA is a direct consequence of this integrated vision and is depicted
at the top of Figure 1. For a detailed description of each layer, we refer to [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <sec id="sec-2-1">
        <title>Scalable Semantic Analytics Stack (SANSA)</title>
        <p>Machine Learning</p>
        <p>Inference
Querying
Knowledge Distribution &amp; Representation
Distributed In-Memory Processing
} Analytics
} bDuisttiorin- Technology</p>
        <p>Semantic</p>
        <p>Stack</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>8 http://spark.apache.org and http://flink.apache.org 9 https://github.com/SANSA-Stack/SANSA-Notebooks</title>
      <sec id="sec-3-1">
        <title>Distributed Machine Learning</title>
        <p>Machine Learning Libraries
Distributed Data Sets / Streams
In-Memory Computing Framework</p>
        <p>Distributed Filesystem
manual data integration
often simple input formats
data formats often not standardised
measurable benefits
horizontal scalability
filebrowser</p>
        <p>Hadoop</p>
        <p>RDF</p>
        <p>Query
SANSA provides Notebooks for an easy local deployment for development and
demonstration purposes. SANSA-Notebooks is an interactive toolkit on top of
Hadoop-SparkWorkbench10 with Apache Zeppelin,11 which allows the copying of files from/to HDFS
and an interactive Spark code execution via a web GUI. The architecture of
SANSANotebooks is depicted in Figure 2. The authors utilize SANSA-Notebooks (see
Figure 3) in Big Data labs and courses as they alleviate the complicated Hadoop/Spark
setup and allow the students to focus on developing distributed algorithms on top of
SANSA. Cluster deployment of the examples is also possible through Docker images
(see SANSA-Examples Github repository12). Additionally, SANSA is readily available
from the Maven Central Repository. Thus it is straightforward to include it in other
projects using Maven or SBT – the most popular build managers for Scala – for both
Spark- and Flink-based setups.</p>
        <p>During the demonstration, we will present the example notebooks.13 These examples
give a quick overview of the SANSA APIs. SANSA is build on the concepts of distributed
datasets (i.e RDD, DataFrame, DataSet). A dataset is inferred from the external data,
then parallel operations e.g. transformations and actions are applied which trigger a job
execution on a cluster. Depending on the network connection, the demonstration will be
performed on a local single node cluster or a remote multi node cluster. In the following,
we provide a concise description for the examples grouped by the SANSA layers.
1. RDF.</p>
        <p>(a) Reading and writing triple files from HDFS or file system and some basic triple
operations.
(b) A distributed evaluation of numerous RDF Dataset Statistics dubbed RDF-Stats
(see Figure 3), for example, property distribution, class distribution, distinct
subjects/objects/entities as well as statistics summary.
(c) Assigning weights to a given entity based on the Spark GraphX PageRank
algorithm after triples have been transformed to a graph representation (i.e. PageRank
for resources).
10 https://github.com/big-data-europe/docker-hadoop-spark-workbench
11 https://zeppelin.apache.org/
12 https://github.com/SANSA-Stack/SANSA-Examples
13 The source code for all of them is provided at https://github.com/SANSA-Stack/SANSA-Examples. We
will present a tale / storyline using different examples across the SANSA layers for booth visitors and adapt them
interactively (with new parameters, other datasets etc.) in the web browser.</p>
        <p>One of the powerful features of the SANSA Notebooks is that you can view the
result set of the previous session within the Spark framework and, in case you have
found some insight for your data and would like to share, you can easily create a report
and either print or send it.
14 http://aksw.org/Projects/Sparqlify.html</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>J.</given-names>
            <surname>Lehmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Sejdiu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Bühmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Westphal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Stadler</surname>
          </string-name>
          , I. Ermilov,
          <string-name>
            <given-names>S.</given-names>
            <surname>Bin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Chakraborty</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Saleem</surname>
          </string-name>
          , A.
          <string-name>
            <surname>-C. Ngonga Ngomo</surname>
            , and
            <given-names>H.</given-names>
          </string-name>
          <string-name>
            <surname>Jabeen</surname>
          </string-name>
          .
          <article-title>Distributed Semantic Analytics using the SANSA Stack</article-title>
          .
          <source>In Proceedings of 16th International Semantic Web</source>
          Conference - Resources
          <string-name>
            <surname>Track</surname>
          </string-name>
          (ISWC'
          <year>2017</year>
          ),
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>