<!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>Philip Stutz, Mihaela Verman, Lorenz Fischer, and Abraham Bernstein</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>DDIS, Department of Informatics, University of Zurich</institution>
          ,
          <addr-line>Zurich</addr-line>
          ,
          <country country="CH">Switzerland</country>
        </aff>
      </contrib-group>
      <fpage>2</fpage>
      <lpage>5</lpage>
      <abstract>
        <p>TripleRush1 is a parallel in-memory triple store designed to address the need for e cient graph stores that quickly answer queries over large-scale graph data. To that end it leverages a novel, graph-based architecture. Speci cally, TripleRush is built on a parallel and distributed graph processing framework. The index structure is represented as a graph where each index vertex corresponds to a triple pattern. Partially matched copies of a query are routed in parallel along di erent paths of this index structure. Among the existing triple stores, we only know of Trinity.RDF [3] to be implemented on top of a distributed graph processing abstraction. Trinity.RDF represents the graph with adjacency lists and combines traditional query processing with graph exploration. In TripleRush, an RDF triple is represented as a vertex and SPARQL queries are answered with a purely exploration-based approach. In other words, TripleRush does not use any joins in the traditional sense but searches the index graph in parallel. Whilst traditional stores pipe data through query processing operators, TripleRush routes query descriptions to data. We implemented TripleRush on top of our graph processing framework Signal/Collect [2]. TripleRush takes less than a third of the time to answer queries compared to the fastest of three state-of-the-art triple stores, when measuring time as the geometric mean of all queries for two benchmarks.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Signal/Collect [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] is a parallel and distributed large-scale graph processing
system written in Scala. Akin to Pregel [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], it allows to specify graph
computations in terms of vertex-centric methods.
      </p>
      <p>The key features of Signal/Collect are: a) it is suitable for expressing
data- ow algorithms and transparently parallelizes them, using vertices as
processing elements and edges for message propagation, b) it supports di erent
types of vertices, c) the graph structure can be changed during computation,
d) it supports bulk-messaging and combiners for message-passing e ciency, e)
it supports asynchronous scheduling, and f) it is exible with regard to edge
representation, messages can be routed directly.
TripleRush is a triple store with three types of Signal/Collect vertices:
1 Source code at https://github.com/uzh/triplerush</p>
      <p>Elvis inspired Dylan
Elvis
*
*</p>
      <p>Triple vertices (level 4, Fig. 1) represent triples in the database. Each contains
subject, predicate, and object information.</p>
      <p>Index vertices (levels 1-3, Fig. 1) represent triple patterns and are responsible
for routing partially matched copies of queries (referred to as query particles )
towards triple vertices that match their respective patterns. They also
contain subject, predicate, and object information, but one or several of them
are wildcards.</p>
      <p>Query vertices (Fig. 2) are added to the graph for each query that is being
executed. The query vertex emits the rst query particle that traverses the
index structure. Once all query particles|successfully matched or not|
get routed back to their respective query vertex, it reports the results and
removes itself from the graph.</p>
      <p>The graph is built bottom-up, starting by creating a triple vertex for each
RDF triple. These vertices are added to Signal/Collect, which turns them
into parallel processing units. A triple vertex will add its immediate index
vertices (if they do not exist yet) and an edge from these vertices to itself. The
construction process continues recursively for the index vertices until the parent
vertex has already been added or the index vertex has no parent.</p>
      <p>To ensure the uniqueness of a path from an index vertex to all triple vertices
below it, an index vertex adds an edge from at most one parent index vertex,
always according to the structure that is illustrated in Fig. 1.</p>
      <p>The index graph we just described is di erent from traditional index
structures, because it is designed for the e cient parallel routing of messages to
triples that correspond to a given triple pattern. All vertices that form the index
structure are active parallel processing elements that only interact via message
passing.</p>
      <p>Consider the subgraph shown in Fig. 2 and the query processing for the
query: (unmatched = [ ?X inspired ?Y ], [ ?Y inspired ?Z ]; bindings = fg). The
query execution starts by adding the query vertex to the TripleRush graph.
1</p>
      <p>The query vertex emits a single query particle, which is routed (by
Signal/Collect) to the index vertex that matches its rst unmatched triple
1</p>
      <p>Query Vertex
6</p>
      <p>Failure
Success
?X inspired ?Y
?Y inspired ?Z</p>
      <p>5
No vertex with id
[ Jobs inspired * ]
4</p>
      <p>2
Dylan inspired *
* inspired Jobs</p>
      <p>We further perform some optimizations: a) we do dictionary encoding, b)
we remove the triple vertices and turn the third index level into binding index
vertices, which hold a compact representation of all the triples that match their
pattern, c) the index vertices on levels 1 and 2, in addition to a compact edge
representation, use delta-encoding and variable length integers to further reduce
memory usage, d) we use a query optimizer that reorders patterns based on
cardinalities, e) we only send the tickets of the failed particles back to the query
vertex, and f) we use bulk-messaging and message-combiners.
4</p>
    </sec>
    <sec id="sec-2">
      <title>Evaluation</title>
      <p>
        In order to evaluate TripleRush, we wanted to compare it with the fastest
related approaches. Trinity.RDF [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] is also based on a parallel in-memory graph
store, and it is, to our knowledge, the best performing related approach. As
Trinity.RDF is not available for evaluations, we made our results comparable
by closely following the setup of their published parallel evaluations. The
Trinity.RDF paper also includes results for other in-memory and on-disk systems that
were evaluated with the same setup, which allows us to compare TripleRush with
these other systems in terms of performance.
      </p>
      <p>
        Consistent with the parallel Trinity.RDF [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] evaluation, we benchmarked the
performance of TripleRush by executing the same queries on the LUBM-160 and
DBPSB-10 datasets. More information about the setup is found in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>The execution time covers everything from the point where a query is
dispatched to TripleRush until the results are returned. Consistent with the
Trinity.RDF setup, the execution times do include the time used by the query
optimizer, but do not include the dictionary encoding and the triple materialization.</p>
      <p>
        The results in Figure 3 show the fastest execution time of 10 runs for all
stores. The results for the other stores are from the Trinity.RDF paper [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and
were measured on comparable hardware. TripleRush is fastest on all but one
query. These results indicate that the performance of TripleRush is competitive
with, or even superior to other state-of-the-art triple stores.
      </p>
      <p>LUBM-­‐160  Benchmark  </p>
      <p>DBPSB-­‐10  Benchmark  </p>
      <p>TripleRush  
Trinity.RDF  
RDF-­‐3X  
(In  Memory)  
BitMat  
(In  Memory)  </p>
      <p>TripleRush    
Trinity.RDF  
RDF-­‐3X  
(In  Memory)  
BitMat  
(In  Memory)  
L1   L2   L3   L4   L5   L6   L7  </p>
      <p>D1   D2   D3   D4   D5   D6   D7   D8  </p>
    </sec>
    <sec id="sec-3">
      <title>5 Conclusions</title>
      <p>The need for e cient querying of large graphs lies at the heart of most
Semantic Web applications. During the last decade, research in this area has made
tremendous progress based on a database-inspired paradigm. Parallelizing these
centralized architectures is a complex task. The advent of multi-core computers,
however, calls for approaches that exploit parallelization.</p>
      <p>With TripleRush we presented an in-memory triple store that divides the
work among a large number of active processing elements that work towards
a solution in parallel, and our evaluation shows that the performance of this
approach is promising.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>G.</given-names>
            <surname>Malewicz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. H.</given-names>
            <surname>Austern</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. J. C.</given-names>
            <surname>Bik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Dehnert</surname>
          </string-name>
          , I. Horn,
          <string-name>
            <given-names>N.</given-names>
            <surname>Leiser</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Czajkowski.</surname>
          </string-name>
          <article-title>Pregel: a system for large-scale graph processing</article-title>
          .
          <source>In SIGMOD Conference</source>
          , pages
          <volume>135</volume>
          {
          <fpage>146</fpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>P.</given-names>
            <surname>Stutz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Bernstein</surname>
          </string-name>
          , and
          <string-name>
            <given-names>W. W.</given-names>
            <surname>Cohen</surname>
          </string-name>
          . Signal/Collect:
          <article-title>Graph Algorithms for the (Semantic) Web</article-title>
          . In P. P.
          <string-name>
            <surname>-S</surname>
          </string-name>
          . et al., editor,
          <source>International Semantic Web Conference (ISWC)</source>
          <year>2010</year>
          , volume LNCS
          <volume>6496</volume>
          , pages pp.
          <volume>764</volume>
          {
          <fpage>780</fpage>
          . Springer, Heidelberg,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>K.</given-names>
            <surname>Zeng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Shao</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Z.</given-names>
            <surname>Wang</surname>
          </string-name>
          .
          <article-title>A distributed graph engine for web scale rdf data</article-title>
          .
          <source>Proceedings of the VLDB Endowment</source>
          ,
          <volume>6</volume>
          (
          <issue>4</issue>
          ),
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>