<!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>cient and E ective Source Selection in the Web of Data: a Smart Caching Approach</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Session Paper</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Francesco De Fino Supervised by: Barbara Catania</institution>
          ,
          <addr-line>Giovanna Guerrini</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Genoa</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <fpage>24</fpage>
      <lpage>27</lpage>
      <abstract>
        <p>Problem Statement and Motivation In the last decade, the traditional Web is evolved in the Web of Data, where huge collections of structured data are gathered over distributed, heterogeneous sources. These datasets are often exploited much below their potential due to difculties in accessing them. Processing complex requests on diverse and dynamic sources requires: (i) source selection; (ii) actual processing of the request on the relevant, and usually big in size, sources. The overall process may not guarantee user satisfaction, since the request may be processed on inaccurate, incomplete, unreliable data; or the processing time may be inadequate to the query urgency. In [1], the authors claimed that user pro les and request contexts, data and processing quality, and information about similar requests recurring over time could be exploited to inform query processing and cope with these issues. In this thesis, we focus on recurring retrieval needs for improving query processing. Recurring retrieval needs have been considered in query processing for a very long time in terms of materialized views and caching approaches. Both of them su er from some problems when applied to the reference scenarios. Materialized views associate a result with a given query even if, for improving e ciency, additional information could be of interest (e.g., the set of used data sources). On the other hand, caching approaches usually rely on precise query matching, not always suitable in the reference environments, and, similarly to materialized views, cached queries are usually associated with query results. The aim of the thesis is to exploit how information about similar requests recurring over time can be exploited in order to e ciently and e ectively process complex requests on heterogeneous and dynamic data sources, while guaranteeing user satisfaction and limiting as much as possible user interactions. In particular, we propose a new smart caching technique that gets over the limitations of current approaches by: (i) taking advantage of prior processing in order to obtain shortcuts to di erent points in the query processing stack, with a special emphasis on source selection, thus providing a multilayer caching approach;</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>(ii) relying on relaxed matches; (iii) providing a human-in-the-loop solution by
which user feedback as well as query and data contexts are taken into account
in cache management.</p>
      <p>We claim that the proposed approach could be quite e ective in processing
complex requests on diverse and dynamic sources. Indeed, by maintaining not
only query results but also more general processing information collected during
processing, like the set of selected sources, in distinct but related caches, we
will be able to cope with the trade-o between data dynamicity and accuracy
of the result. By exploiting relaxation, performance can also be improved, since
the number of cache hits will increase. Relaxation, as well as the adoption of
a human-in-the-loop solution, can nally increase user satisfaction, in terms of
both quality of data (accuracy and completeness of the result) and quality of
service (execution time).</p>
      <p>Our smart cache approach is also quite innovative: as far as we know, no
multilayer caching approach, taking into account source selection, has been
proposed so far. The exploitation of relaxation and human-in-the-loop features in
cache management is also quite original, moving to a traditional physical task
features that are typical of higher level processing steps.</p>
      <p>
        The proposed approach is an instantiation of the framework proposed in
[
        <xref ref-type="bibr" rid="ref2 ref3">2,3</xref>
        ] in the context of Linked Data but we claim it can be easily extended to
other graph-based contexts. Data sources correspond to RDF data sources1 and
queries are represented in SPARQL.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>A Relaxed Caching Approach for Source Selection</title>
      <p>We rst introduce the reference architecture for source selection caching we rely
on in the overall multilayer approach. Then, a preliminary proposal for relaxed
cache matches is discussed.
1 A RDF set of triples available on the Web.</p>
      <p>
        E cient and E ective Source Selection in the Web of Data
Reference architecture. We extend the caching framework for RDF data and
SPARQL queries in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] to deal with source selection. It represents query graphs
through canonical labels generated by a variation of the Bliss algorithm [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>
        Fig. 1 shows the resulting reference architecture. Given a query Q as input,
the Dynamic Programming Planner module, from [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], identi es the best query
plan relying on a dynamic programming approach. Query plan components
correspond to connected subgraphs of Q, whose results have then to be joined for
generating the nal result. For each connected subgraph, a cache look up is
performed; if no match is found, the subgraph will be executed by a traditional
graph query processing engine. The cost model takes into account the cost for
the cache look up and the cost for traditional graph query execution.
      </p>
      <p>
        In order to design a cache for source selection, we rst modi ed the cache
module with the aim of associating sets of source identi ers, instead of sets of
data items, to cached queries. All cached queries sharing a common structure
(called skeleton) are cached together, relying on a tree structure. The
processing engine has then been modi ed to cope with source selection execution. To
this aim, we relied on the index-based source selection approach proposed in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]
(but any other source selection technique can be used as well): a data summary,
called QTree, is used to index available sources by representing triples as points
in a three-dimensional space and source portions as hyper-rectangles in such a
space. Preliminary results show that our smart caching framework outperforms
the approach in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] for di erent types of recurring SPARQL queries.
Relaxation. Exact matching can represent a limitation to fully exploit caching
potential in speeding up source selection. If cached queries represent recurrent
requests, exact matching precludes the planner to choose entries that are similar
but not exactly equal to the current user request. For this reason, we propose
to extend our smart caching approach with query relaxation to fully exploit the
cache. The idea is to exploit a reference ontology O expressed by RDFS [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and
to consider relaxed matches w.r.t. the ontology. As a starting point, we consider
O as a predicate taxonomy, i.e., a taxonomy in which predicates are related by
a rdfs:subPropertyOf relationship.
      </p>
      <p>The problem is now the following: given a query Q and n cached queries
Q1,...,Qn, nd Q 2 fQ1; :::; Qng such that Q generalizes Q and it has the
minimum relaxation cost relax C from Q, i.e., relax C(Q; Q) = minin=1relax C(Q; Qi):
The relaxation cost is de ned on query canonical representations.
relax C(Q1; Q2) returns 1 if Q2 does not generalize Q1 (i.e., it is not
possible to nd in Q2, for each triple pattern in Q1, a triple pattern with a more
general predicate, according to the taxonomy O, and with the same subject and
object). Otherwise, the returned value depends on how "far" is each triple
pattern in Q2 from the corresponding one in Q1. Distance is de ned in terms of the
path length between predicates in the taxonomy O.</p>
      <p>In order to e ciently select query Q as described above, we assume that
cached queries are indexed by a tree, where each node corresponds to a query
triple pattern and each path from the root to a leaf corresponds to a cached
query. The cached query at the minimum cost is then selected by a variation of
the A algorithm.</p>
      <p>We are currently working on an extension of this algorithm to take into
account not only the generalization cost but also the cost for accessing sources.
To this purpose, we plan to associate some statistics related to sources with each
index leaf and use them, combined with the generalization cost, in computing
the total cost. Another relevant extension concerns the usage of more generic
ontologies for de ning relaxed matches.</p>
    </sec>
    <sec id="sec-3">
      <title>Future Research Plan</title>
      <p>We plan to extend the work presented in Section 2 in several directions:
{ Integrating the relaxation approach in the reference architecture.
{ Integrating the source cache with a traditional cache for query processing
over Linked Data and de ning speci c cache policies for a combined usage
of both caches, depending on data dynamicity and target result accuracy,
for both precise and relaxed queries.
{ Extending the proposed smart caching approach so that the choice of the
queries to cache is not only based on a recurrence principle, but also on a
diversi cation principle, thus avoiding to keep in cache queries that are too
similar or one is a slight relaxation of the other.
{ Extending the proposed smart caching approach to bring the human in the
loop, through the usage of speci c cache management policies taking care of
user feedbacks as well as query and data contexts.
{ Experimentally evaluating the proposed approach, with reference to Linked
Data sets, di erent query patterns, and di erent recurrence patterns. We will
start with a synthetic workload but we will then look for a real workload. The
main aim of the evaluation will be to measure the increase in e ciency (in
terms of source selection and overall query processing costs), with varying
amounts of available space, and the result accuracy due to the degree of
approximation introduced by relaxation.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>B.</given-names>
            <surname>Catania</surname>
          </string-name>
          et al.
          <article-title>Wearable Queries: Adapting Common Retrieval Needs to Data and Users</article-title>
          . DBRank Workshop (co-located
          <source>with VLDB</source>
          <year>2013</year>
          ),
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>B.</given-names>
            <surname>Catania</surname>
          </string-name>
          et al.
          <article-title>Recurring Retrieval Needs in Diverse and Dynamic Dataspaces: Issues and Reference Framework</article-title>
          .
          <source>EDBT/ICDT Workshops</source>
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <surname>3. F. De Fino</surname>
          </string-name>
          et Al.
          <article-title>Exploiting Recurrent Retrieval Needs in Querying Heterogeneous and Dynamic Graph Dataspaces</article-title>
          .
          <source>SEBD</source>
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>R.</given-names>
            <surname>Frosini</surname>
          </string-name>
          et al.
          <article-title>Flexible Querying for SPARQL</article-title>
          .
          <source>Semantic Web</source>
          <volume>8</volume>
          (
          <issue>4</issue>
          ),
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>T.</given-names>
            <surname>Junttila</surname>
          </string-name>
          et al.
          <article-title>Engineering an E cient Canonical Labeling Tool for Large and Sparse Graphs</article-title>
          .
          <source>ALENEX. Society for Industrial and Applied Mathematics</source>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>N.</given-names>
            <surname>Papailiou</surname>
          </string-name>
          et al.
          <article-title>Graph-aware, Workload-adaptive SPARQL Query Caching</article-title>
          .
          <source>ACM SIGMOD</source>
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>J.</given-names>
            <surname>Umbrich</surname>
          </string-name>
          . et al.
          <source>Comparing Data Summaries for Processing Live Queries over Linked Data. World Wide Web</source>
          <volume>14</volume>
          (
          <issue>5-6</issue>
          ),
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>