<!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>Stressless RSP Benchmarking With RSPLab</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Andrea Mauri</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Riccardo Tommasini</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Emanuele Della Valle</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marco Brambilla</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Politecnico di Milano, DEIB</institution>
          ,
          <addr-line>Milan</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>RSPLab is an infrastructure that reduces the e ort required to design and execute reproducible experiments as well as share their results. It provides a programmatic environment to deploy RDF Streams and RSP engines, interact with them and continuously monitor their performances and collect statistics. In this demo well show how to deploy RDFStream and RSP engines in the cloud and how to interact with them registering and unregistering continuous queries lively. We will show how these action impact the performances and we transform the results in visual plot on a chart.</p>
      </abstract>
      <kwd-group>
        <kwd>Semantic Web</kwd>
        <kwd>Stream Reasoning</kwd>
        <kwd>RDF Stream Processing</kwd>
        <kwd>Benchmarking</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        In the RDF Stream Processing (RSP) community particular interest has arisen
on empirical research on benchmarks and evaluation methodologies. These
comprehend studies on query language expressive power, performance, correctness
of results, memory load and latency [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] (x 2.4).
      </p>
      <p>
        Beside community e orts, the evaluation of RSP engines is still not
systematic. This mostly because RSP engines have di erent semantics, interfaces, and
processing models. Moreover, existing test drivers [
        <xref ref-type="bibr" rid="ref1 ref5">5, 1</xref>
        ] are benchmark speci c.
This situation challenges comparability of the experiments, because it forces
researchers to set up ad-hoc con guration environments that might have
architectural bias and produce an unmeasurable experimental errors.
      </p>
      <p>
        In this paper, we present RSPLab [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] a cloud-ready open-source test driver
to support empirical research for RSP.
      </p>
      <p>We will show how it enables design of experiments by the means of a
programmatic interface that allows deploying the environment, running experiments,
measuring the performance, visualizing the results as reports, and cleaning up
the environment to get ready for a new experiment.</p>
      <p>The remainder of the paper is structured as follow: Section 2 shows the
RSPLab architecture, Section 3 describes how the demonstration will be carried
out and nally Section 4 concludes and provides information on where additional
material regarding the resource can be found.</p>
    </sec>
    <sec id="sec-2">
      <title>RSPLab</title>
      <p>RSPLab was developed using Docker, i.e. a lightweight virtualization
framework1. This allows to fully control the available resources enabling experiments
execution at scale and it guarantees components isolation. Moreover, it fosters
reproducibility by making the execution hardware-independent.</p>
      <p>
        Streamer. The data provisioning tier publishes RDF streams from existing sources.
It is implemented using a modi ed version of TripleWave [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]2
Consumer. The data processing tier exposes the RSP engines on the web
using the RSP Services [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], generalizing the processing model enabling streams
registration, queries registration and results consumption.
      </p>
      <p>Collector. This tiers is in charge of monitoring the execution of a benchmark,
in particular it includes: (1) a distributed continuous monitoring system3, that
collects performance statistics, (2) a time-series database4 which is used to store
the data collected and (3) a RSPSink that persists query results on a cloud le
systems, allowing for post-hoc correctness analyses.</p>
      <p>Controller. The control and analysis tier allows the RSPLab user to interact with
the whole environment by deploying streams and engines and monitoring the
performance of the latter. A programmatic interface, implemented using iPython
Notebooks5 includes wrappers for RSP services, TripleWave and RSPsinks.
Assisted data visualization dashboards are accessible, in real time, via Grafana6,
i.e. a dashboard that reads directly form the time-series database. Experimental
reports annotated with VOID can be generated also using the library.</p>
      <sec id="sec-2-1">
        <title>1 https://www.docker.com/</title>
        <p>2 https://github.com/streamreasoning/triplewave/tree/rsplab
3 https://github.com/google/cadvisor
4 https://www.influxdata.com/
5 https://ipython.org/notebook.html
6 https://grafana.com/</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Demonstration</title>
      <p>1 Q1 = rsp . BenchmarkQueries .</p>
      <p>CityBench . Q1
2 e = rsp . new experiment ( )
3 e . add engine ( " http : / / c q l e s . rsp
lab . org " , 80 , rsp . D i a l e c t s .</p>
      <p>CQELS)
4 e . add KPIs( rsp . KPI .</p>
      <p>Memory Consumption , rsp . KPI
. CPU Load)
5 e . add query ( "CB. Q1" , rsp .</p>
      <p>QueryType . Query , Q1 , rsp .</p>
      <p>D i a l e c t s .CQELS)
6 e . add tbox ( "CB. Q1" , name="
c i t y t r a f f i c . owl " , base=" rsp
lab . org " )
7 e . add graph ( "CB. Q1" , name="
Se ns orR ep osi to ry . r d f " , base
=" rsp lab . org " )
8 e . add stream ( "CB. Q1" , "</p>
      <p>AarhusTrafficData158505 " ,
base=" rsp lab . org " )
9 e . add stream ( "CB. Q1" , "</p>
      <p>AarhusTrafficData182955 " ,
base=" rsp lab . org " )
1 #WARM UP
2
3 rsp = RSPEngine ( ehost , eport ) ;
4
5 f o r d i n experiment . graphs ( ) :
6 rsp . register graph ( d )
7 f o r s i n experiment . streams ( ) :
8 rsp . register stream ( s )
9 f o r q i n experiment . q u e r i e s ( ) :
10 rsp . register query ( q )
11 rsp . new observer ( query , '
d e f a u l t ' )
12 spawn sinks ( experiment )
13
14 # OBSERVE
15 wait ( experiment . duration ( ) )
16
17 f o r q i n engine . q u e r i e s ( ) :
18 f o r o i n engine . o b s e r v e r s ( q ) :
19 rsp . unregister observer ( o )
20 rsp . unregister query ( q )
21 f o r s i n engine . streams ( ) :
22 rsp . unregister stream ( s )
23 rsp . report . publish ( experiment )</p>
      <sec id="sec-3-1">
        <title>Listing 1.1: Experiment Design</title>
      </sec>
      <sec id="sec-3-2">
        <title>Listing 1.2: Simple execution logic In this demo we show all the work ow necessary for deploying and executing a RSP benchmark using RSPLab. In particular we will present the following steps:</title>
        <p>Step-1 Deployment and con guration of RDF Streams: we show how to deploy
and con gure the Streamer component in order to stream the included datasets.
Step-2 Deployment and con guration of RSP Engines: we show how to deploy
and con gure the Consumer tier, with particular focus on the C-SPARQL and
CQELS engines.</p>
        <p>
          Step-3 Continuous query of the streams and collection of the results: we show
how to issue continuous queries to the streams using the programming interface.
We use the included Python library7 that allow to fully control all the tiers
included in RSPLab. In particular it allows to (1) create and launch experiments
following the structure described in [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ], (2) dynamically add and remove graphs
and streams to a RSP engine, (3) dynamically register and unregister queries and
observers to a RSP engine, and nally (4) publish the results following the linked
data principles. Listing 1.1 and 1.2 show respectively the basic code necessary
to create an experiment and and to implement a simple logic for executing a
benchmark. Notice that a RSPLab user is free to build any execution work ow
according to his requirements.
        </p>
        <p>Step-4 Visualization of statistics in real time: we show how to use Grafana on
the Controller tier in order to visualize the performance indexes in real-time
(an example is shown in Figure 2). Moreover we will show how with RSPLab is
possible to observe the di erent phases of an experiment: the warm-up phase,
where the engines are deployed and the streams and the queries are registered,
and the observation phase, where the engines are in steady state, consuming the
streams and answering the queries.
7 https://github.com/streamreasoning/rsplib</p>
        <p>With this
demonstration we aim to
show the e ectiveness
of RSPLab in
facilitating the
deployment and execution
of RSP benchmarks.</p>
        <p>We will run both the Fig. 2: A example of dashboard showing CPU load and
included benchmarks Memory usage.
(e.g., Citybench and
LSBench) and custom variation, by adding and removing queries in real-time,
in order to highlight how these actions impact on the performance.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Conclusion</title>
      <p>The main contribution of this demonstration paper is the proof of RSPLab e
ectiveness. The Docker-based architecture and the programmatic interface
facilitate the process of deploying the environment, running experiments, measuring
the performance, visualizing the results as reports.</p>
      <p>RSPLab is released as open-source8, examples, documentation and tutorials
are available on GitHub9, hosted by the Stream Reasoning organization.</p>
      <sec id="sec-4-1">
        <title>8 http://rsp-lab.org</title>
        <p>9 https://github.com/streamreasoning/rsplab</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Ali</surname>
            ,
            <given-names>M.I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gao</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mileo</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Citybench: A con gurable benchmark to evaluate RSP engines using smart city datasets</article-title>
          .
          <source>In: The Semantic Web - 14th ISWC</source>
          , Bethlehem, PA, USA, October
          <volume>11</volume>
          -
          <issue>15</issue>
          ,
          <year>2015</year>
          , Proceedings, Part II. pp.
          <volume>374</volume>
          {
          <fpage>389</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Balduini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Valle</surname>
            ,
            <given-names>E.D.:</given-names>
          </string-name>
          <article-title>A restful interface for RDF stream processors</article-title>
          .
          <source>In: Proceedings of the ISWC 2013 Posters &amp; Demonstrations Track</source>
          , Sydney, Australia, October
          <volume>23</volume>
          ,
          <year>2013</year>
          . pp.
          <volume>209</volume>
          {
          <fpage>212</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>DellAglio</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Della</given-names>
            <surname>Valle</surname>
          </string-name>
          , E.,
          <string-name>
            <surname>van Harmelen</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bernstein</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Stream reasoning: A survey and outlook</article-title>
          .
          <source>Data Science (Preprint)</source>
          ,
          <volume>1</volume>
          {
          <fpage>24</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Mauri</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calbimonte</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dell'Aglio</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Balduini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brambilla</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Della</given-names>
            <surname>Valle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            ,
            <surname>Aberer</surname>
          </string-name>
          ,
          <string-name>
            <surname>K.</surname>
          </string-name>
          :
          <article-title>Triplewave: Spreading RDF streams on the web</article-title>
          .
          <source>In: The Semantic Web - 15th International Semantic Web Conference</source>
          , Kobe, Japan,
          <source>October 17-21</source>
          ,
          <year>2016</year>
          , Proceedings, Part II. pp.
          <volume>140</volume>
          {
          <fpage>149</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Phuoc</surname>
            ,
            <given-names>D.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dao-Tran</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pham</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Boncz</surname>
            ,
            <given-names>P.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fink</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Linked stream data processing engines: Facts and gures</article-title>
          .
          <source>In: The Semantic Web - 11th ISWC</source>
          , Boston, MA, USA, November
          <volume>11</volume>
          -
          <issue>15</issue>
          ,
          <year>2012</year>
          , Proceedings, Part II. pp.
          <volume>300</volume>
          {
          <fpage>312</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Tommasini</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Della</given-names>
            <surname>Valle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            ,
            <surname>Balduini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Dell'Aglio</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          :
          <article-title>Heaven: a framework for systematic comparative research approach for rsp engines</article-title>
          .
          <source>In: 13th Extended Semantic Web Conference, ESWC</source>
          <year>2016</year>
          , Heraklion, Crete, Greece. pp.
          <volume>87</volume>
          {
          <fpage>92</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Tommasini</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Valle</surname>
            ,
            <given-names>E.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mauri</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brambilla</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          : Rsplab:
          <article-title>Rdf stream processing benchmarking made easy</article-title>
          .
          <source>In: The Semantic Web 16th International Semantic Web Conference</source>
          , Vienna, Austria,
          <source>October 21-25</source>
          ,
          <year>2017</year>
          , Proceedings, Part II
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>