<!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>PLANET: Query Plan Visualizer for Shipping Policies against Single SPARQL Endpoints</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Maribel Acosta</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maria-Esther Vidal</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fabian Flo¨ck</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Simon Castillo</string-name>
          <email>scastillog@ldc.usb.ve</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andreas Harth</string-name>
          <email>harthg@kit.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute AIFB, Karlsruhe Institute of Technology</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Universidad Simo ́n Bol ́ıvar</institution>
          ,
          <country country="VE">Venezuela</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Shipping policies allow for deciding whether a query should be executed at the server, the client or distributed among these two. Given the limitations of public SPARQL endpoints, selecting appropriate shipping plans is crucial for successful query executions without harming the endpoint performance. We present PLANET, a query plan visualizer for shipping strategies against a single SPARQL endpoint. We demonstrate the performance of the shipping policies followed by existing SPARQL query engines. Attendees will observe the effects of executing different shipping plans against a given endpoint.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        In the context of the Web of Data, endpoints are acknowledged as promising SPARQL
server infrastructures to access a wide variety of Linked Data sets. Nevertheless, recent
studies reveal high variance in the behavior of public SPARQL endpoints, depending
on the queries posed against them [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. One of the factors that impact on the endpoint
performance is the type of shipping policy followed to execute a query.
      </p>
      <p>
        Shipping policies [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] define the way that the workload of executing a query is
distributed among servers and clients. Query-shipping policies conduct the execution of
query operators at the server, while plans following data-shipping exploit the capacity
of the client and execute the query operators locally. In contrast, hybrid approaches pose
sub-queries and operators according to the complexity of the queries, and the server
workload and availability. Current SPARQL query engines implement different
policies. For example, FedX [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] implements a query-shipping strategy, executing the whole
query at the endpoint, when the federation is comprised by one endpoint. ANAPSID [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]
usually follows a hybrid-shipping strategy, it locally gathers the results of star-shaped
sub-queries executed by the endpoint. To showcase an adaptive hybrid approach
alongside FedX and ANAPSID, we also demonstrate SHEPHERD [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], an endpoint-tailored
SPARQL client-server query processor that aims for reducing the endpoint workload
and benefits the generation of hybrid shipping plans.
      </p>
      <p>Analyzing the shipping policies followed to execute a query provides the basis not
only to understand the behavior of an endpoint, but also allows for the development of
endpoint-aware query processing techniques that preserve endpoint resources. The goal
of the work presented here is to assist data consumers or data providers in
understanding the effects of posing different shipping plans against an existing public SPARQL
endpoint. We introduce PLANET, a query plan visualizer for shipping strategies that
provides an intuitive overview of the plan structure, the used shipping strategies as well
as key metrics to understand the behavior of different engines when executing a query.
PLANET is designed to shed light on the distribution of operator execution between
client and server, which is crucial for investigating the type of plans that may lead to
severe under-performance of endpoints. Attendees will observe the impact of
different shipping strategies when queries are posed against a single endpoint. The demo is
published at http://km.aifb.kit.edu/sites/planet/.
2</p>
    </sec>
    <sec id="sec-2">
      <title>The PLANET Architecture</title>
      <p>PLANET invokes SPARQL query engines that implement different shipping strategies.
In this work, we studied the query-shipping plans produced by FedX, and the hybrid
shipping plans of ANAPSID and SHEPHERD. The plan retrieved from each engine is
processed by PLANET’s query plan parser, which translates the plans into JSON
structures to encode the visualization data that will be consumed by the rendering module.
Currently PLANET is able to parse plans generated by engines that use the Sesame1
framework, or the ANAPSID or SHEPHERD internal structures.</p>
      <p>The rendering module uses the “Collapsible Tree” layout of the D3.js JavaScript
library2 to generate the visualizations of plans produced by the SPARQL query
processing engines. Figures 1(a) and 1(b) show snapshots of plans rendered by PLANET.
Plan operator nodes are filled with different colors to distinguish whether the operator
is executed by the engine (locally) or at the server (remotely), which allows to easily
identify the type of shipping strategy followed in each plan.</p>
      <p>The plan descriptor reports a set of metrics characterizing the shipping plans.
Execution performance is measured by the execution time of the query and the number of
results produced. In addition, the metric hybrid ratio measures the quantitative relation
between the SPARQL operators executed at the local engine and the ones executed at
the endpoint. The hybrid ratio of a plan p is calculated as follows:
hybridRatio(p) =</p>
      <p>clientOp(p) serverOp(p)
totalOp(p) maxfclientOp(p); serverOp(p)g
where clientOp(p), serverOp(p) stand for the number of operations executed for plan
p at the client and server, respectively, and totalOp(p) = clientOp(p) + serverOp(p).
Note that the hybrid ratio for plans following data- or query-shipping strategies is zero.</p>
      <p>The output of PLANET is a set of plan visualizations and a summary report with
the metrics computed for each plan.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Demonstration of Use Cases</title>
      <p>As an illustrating example, consider the following query included in our online demo:
GP Query 2 against the DBpedia endpoint, comprised of 9 triple patterns and one
FILTER operator. Figure 1 reports on the plans depicted by PLANET for the
previous query. The plan reported in Figure 1(a) follows a hybrid shipping strategy where
the quantitive relation between the SPARQL operators executed locally and the ones
1 http://www.openrdf.org/
2 http://d3js.org/
(a) Hybrid Shipping Plan. Sub-query under red bar is posed against DBpedia endpoint;
Operators under blue bar are executed at the client side</p>
      <p>(b) Query Shipping Plan. The whole query is posed to the DBpedia endpoint
posed against the DBpedia endpoint or hybrid ratio is 0.27; the execution time is 0.63
secs. and one tuple is retrieved. On the other hand, when the query shipping-based plan
presented in Figure 1(b) is executed, the execution time is 1.44 secs. and no answer is
received. Finally, if the query is executed directly against the endpoint, the answer is
effectively retrieved but the execution time is 6.91 secs. For the three different engines,
we can observe that the combined performance of engine and endpoint deteriorates as
the number of operators posed against the endpoint increases.</p>
      <p>
        In congruence with the previous example result, the following research questions
arose: (i) is the observed behavior due to limitations of the endpoints? Or (ii) is this
behavior caused by the shipping plan followed during query execution? As part of this
demo, we will visualize characteristics of different plans and public endpoints that
provide evidence enabling to answer our research questions. By this time, we have
performed a comprehensive study of the execution of 70 queries against seven different
public SPARQL endpoints. We selected the query targets from the list of endpoints
monitored by the SPARQLES tool [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and classified them in quartiles. These included
two high-performant endpoints (Top25% Quartile), two medium-performant ((25%;
50%] Quartile), and three second-least performant endpoints ((50%;75%] Quartile). We
crafted ten SPARQL queries for each endpoint; five are composed of basic graph
patterns (BGP queries), and the others comprise any SPARQL graph pattern (GP queries).
Attendees of the demo have the possibility of analyze the results of executing these
queries currently loaded in the system, or visualize the plans of their own SPARQL
queries. Query plans are computed on-the-fly while the reported results were computed
off-line to facilitate demonstration. We will demonstrate the following use cases:
Effects of Shipping Policies in BGP Queries. We show that in setups as the one
reported in Figure 1 and where endpoints receive large number of concurrent request
per day, i.e., the endpoint is in the (50%;75%] quartile, hybrid-shipping policies can
reduce execution time and the results surpasses the 79% of the answers retrieved by
query-shipping plans. For high- and medium-performant endpoints, there is a trade-off
between execution time and size of retrieved answers. Nevertheless, in all the queries
the effectiveness of the endpoints is increased by up to one order of magnitude, i.e., the
number of answers produced per second following a hybrid-shipping plan can be up 20
times the number of answers produced by a query-shipping plan.
      </p>
      <p>Effects of Shipping Policies in GP Queries. We observed that for highly work-loaded
endpoints, 90% of hybrid-shipping plans reduce execution time by up two orders of
magnitude. Hybrid plans generated by SHEPHERD achieved the highest performance
on DBpedia. For endpoints in other quartiles, a competitive performance between
hybridand query-shipping plans is observed, but hybrid plan performance never significantly
deteriorates. This suggests that hybrid-shipping policies are appropriate to achieve
reasonable performance while shifting load from the server to the client.</p>
    </sec>
    <sec id="sec-4">
      <title>4 Conclusions</title>
      <p>PLANET visualizes the impact of shipping policies and provide the basis for the
understanding of the conditions that benefit the implementation of hybrid shipping plans,
e.g., attendees will be able to observe that for non-selective queries hybrid plans
significantly outperforms the others. Thus, PLANET facilitates the analysis of the behavior
of public endpoints, as well as, the development of scalable real-world client-server
applications against single SPARQL endpoints.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgements</title>
      <p>The authors acknowledge the support of the European Community’s Seventh
Framework Programme FP7-ICT-2011-7 (XLike, Grant 288342).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>M.</given-names>
            <surname>Acosta</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.-E. Vidal</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Flock</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Castillo</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Buil-Aranda</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Harth</surname>
          </string-name>
          .
          <article-title>Shepherd: A shipping-based query processor to enhance sparql endpoint performance</article-title>
          .
          <source>In ISWC Poster Track</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>M.</given-names>
            <surname>Acosta</surname>
          </string-name>
          , M.-E. Vidal,
          <string-name>
            <given-names>T.</given-names>
            <surname>Lampo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Castillo</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E.</given-names>
            <surname>Ruckhaus</surname>
          </string-name>
          .
          <article-title>Anapsid: an adaptive query processing engine for SPARQL endpoints</article-title>
          .
          <source>In ISWC</source>
          , pages
          <fpage>18</fpage>
          -
          <lpage>34</lpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>C. B. Aranda</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Hogan</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Umbrich</surname>
          </string-name>
          , and P.-Y. Vandenbussche.
          <article-title>SPARQL web-querying infrastructure: Ready for action? In ISWC</article-title>
          , pages
          <fpage>277</fpage>
          -
          <lpage>293</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>M. J. Franklin</surname>
            , B. T. Jo´nsson, and
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Kossmann</surname>
          </string-name>
          .
          <article-title>Performance tradeoffs for client-server query processing</article-title>
          .
          <source>In SIGMOD Conference</source>
          , pages
          <fpage>149</fpage>
          -
          <lpage>160</lpage>
          ,
          <year>1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>A.</given-names>
            <surname>Schwarte</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Haase</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Hose</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Schenkel</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Schmidt</surname>
          </string-name>
          . Fedx:
          <article-title>Optimization techniques for federated query processing on linked data</article-title>
          .
          <source>In ISWC</source>
          , pages
          <fpage>601</fpage>
          -
          <lpage>616</lpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>