<!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>RDF On the Go: An RDF Storage and Query Processor for Mobile Devices</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Danh Le-Phuoc</string-name>
          <email>danh.lephuoc@deri.org</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Josiane Xavier Parreira</string-name>
          <email>josiane.parreira@deri.org</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vinny Reynolds</string-name>
          <email>vinny.reynolds@deri.org</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Manfred Hauswirth</string-name>
          <email>manfred.hauswirth@deri.org</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Digital Enterprise Research Institute, National University of Ireland</institution>
          ,
          <addr-line>Galway Galway</addr-line>
          ,
          <country country="IE">Ireland</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We present RDF On the Go, a full- edged RDF storage and SPARQL query processor for mobile devices. Implemented by adapting the widely used Jena and ARQ Semantic Web Toolkit and query engine, it uses Berkeley DB for storing the RDF data, R-Trees for indexing spatial data indexing and a query processor that supports both standard and spatial queries. By storing and querying RDF data locally at the user's mobile device, RDF On the Go contributes to improving scalability, decreasing transmission costs, and controlling access to user's personal information. It also enables the development of a next generation of mobile applications. RDF On the Go is available for the Android platform and can be downloaded at http://rdfonthego.googlecode.com/.</p>
      </abstract>
      <kwd-group>
        <kwd>RDF storage</kwd>
        <kwd>SPARQL query processor</kwd>
        <kwd>mobile devices</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Mobile devices nowadays are equipped with powerful hardware and software,
as well as data connectivity and sensing functionalities such as location and
orientation. At the same time, the Semantic Web has been evolving and becoming
the preferable choice for representing information, with its Resource Description
Framework (RDF) for representing semantic data, and query languages such as
SPARQL.</p>
      <p>While currently most of the processing of semantic data is done in
centralized workstations, there are many advantages in executing this processing on
mobile devices: i) by distributing the computation among the large number of
existing mobile devices, a great level of scalability can be achieved; ii) if the
data generated locally on the mobile device such as the sensors, e-mails,
calendar appointments can be queried remotely and only the nal results need to
be sent to another machine for further processing, the data transmission costs
can be dramatically reduced; iii) the local processing of user generated data also
contributes to the privacy matter, since raw data no longer need to be shared in
order to be analysed.</p>
      <p>Having such RDF processing capability on the mobile device also enables
a new range of applications such as integrating personal information with the
Linked data cloud, Semantic Mobile Augmented Reality 1 and Mobile Semantic
Context-based applications.</p>
      <p>Although the processing power is on the rise in mobile devices, it is still far
behind workstations, and current implementations of RDF storage and query
processors for standard computers can not be directly ported to mobile devices,
where these resources are still constrained.</p>
      <p>While most of the available semantic based mobile applications have to ship
their queries to a remote SPARQL Endpoint, some applications, such as
microJena2, Androjena3 and i-MoCo4, do store and query RDF data locally. However,
they are tailored to speci c application scenarios and o er only limited features.</p>
      <p>RDF On the Go is the rst application to o er a full- edged RDF
storage and SPARQL query processor. It adapts the widely used Jena and ARQ
Semantic Web Toolkit and query engine to the constrained mobile device's
environment. The RDF data is stored in the B-Trees provided by the lightweight
version of the Berkeley DB for mobile devices5. Indexes are created for faster
data access, where R-trees are used for spatial data indexing, and our lightweight
query processor supports standard and spatial SPARQL queries. RDF On the
Go is available for the Android platform and can be downloaded at http:
//rdfonthego.googlecode.com/.</p>
      <p>The paper demonstrates our RDF On the Go system. Section 2 describes the
implementation in more detail and a short demonstration of the system in action
is given in Section 3. Section 4 concludes the paper and provide some thoughts
for future work.</p>
    </sec>
    <sec id="sec-2">
      <title>2 Implementation Details</title>
      <p>
        For storage of the data, RDF on The Go uses a lightweight version of the
Berkeley DB that is suitable for mobile devices, which provides a B-Tree
implementation for accessing the RDF graphs. For each RDF node, the system employs
dictionary encoding [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ] where node values are mapped to integer identi ers.
This reduces the space required to store each RDF node, since the encoded
version of the nodes are considerably smaller than the original ones. Moreover,
dictionary encoding also allows faster processing, since integer comparisons are
cheaper. Fast lookups are achieved in a two-step approach: rst, each triple node
is stored in multiple ways with di erent orderings of the triple elements,
similar to [
        <xref ref-type="bibr" rid="ref1 ref6">1, 6</xref>
        ]. Then indexes are built for every ordering of the triple pattern, as
proposed in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. To support spatial data, we also use R-Trees indexes for storing
URIs that have spatial properties. These indexes will output the bindings for
spatial graph patterns which are pipelined to the query execution plan.
      </p>
      <p>Currently we support all standard SPARQL operators except aggregation
and sorting operators, and the following three spatial operators: \nearby", \within"</p>
      <sec id="sec-2-1">
        <title>1 http://www.w3.org/2010/06/w3car/exploiting_lod_for_ar.pdf</title>
        <p>
          2 http://poseidon.ws.dei.polimi.it/ca/?page_id=59
3 http://code.google.com/p/androjena/
4 http://www.cs.vu.nl/~pmika/swc-2008/i-MoCo-Mobile%20Conference%20Guide-weissEtAl_
challenge08.pdf
5 http://www.oracle.com/technetwork/database/berkeleydb/overview
RDF On the Go: An RDF Storage and Query Processor for Mobile Devices
and \intersect". We plan to extend our SPARQL query processor to support most
of the patterns described in [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ].
        </p>
        <p>To encourage developers to use RDF On the Go to build their applications,
we have adapted the core APIs of Jena 6 and ARQ7 to the Android environment.
This allows the developers to manipulate RDF graphs in the same way as they
do with the desktop versions of Jena and ARQ . We also reuse some of the Jena
and ARQ packages such as the RDF parser and the SPARQL query parser.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Demonstration</title>
      <p>In this section we provide a short demonstration of our RDF On the Go system.
The current prototype loads sample RDF data set in the N3 format8 to the
RDF store on the mobile device. For demonstration purposes, the system loads
a dataset that contains all RDF triples from the LinkedGeoData collection9
that are about places in Galway, Ireland. The screenshots in gure 1 show the
prototype running on a HTC Desire mobile device10. Figure 1(a) demonstrates
the support for spatial SPARQL queries. It displays a map overlay containing all
URIs in the dataset that have geo data properties within a particular area. This
constrain is represented by the spatial graph pattern \?uri spatial:within(lat1
lon1 lat2 lon2)", where lat1, lon1 are the latitude and longitude of the left upper
corner of the area, and lat2, lon2 are the latitude and longitude of the right lower
corner. The spatial query pattern used can also be seen this this gure. Each
URI is rendered as a marker on the map. By clicking on a marker details of the
URI are shown in gure 1(b).</p>
      <p>Figure 1(c) shows the interface for standard SPARQL queries. Here we are
asking for the 10 nearest `cafes' or `fast food restaurants' to the current location.
To facilitate entering the query, some common patterns such as OPTIONAL and
UNION and the device's current location given by the device's GPS can be added
by selecting the corresponding options from a dropdown menu. The results of
this query are shown in gure 1(d).</p>
      <p>RDF On the Go is available for the Android platform, version 2.1 or newer.
The prototype, a video demonstrating the prototype in use, the data
collection used in the demonstration and more information are available at http:
//rdfonthego.googlecode.com/.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Conclusion</title>
      <p>This paper demonstrates the RDF On the Go system, a full- edged RDF storage
and SPARQL query processor for building semantic applications on mobile
devices. It not only meets the demand of emerging semantic applications on these
devices but also raises many interesting research problems in the areas of data
storage and query processing in the context of mobile environments. In the next</p>
      <sec id="sec-4-1">
        <title>6 http://jena.sourceforge.net/</title>
        <p>7 http://jena.sourceforge.net/ARQ/
8 http://www.w3.org/DesignIssues/Notation3
9 http://linkedgeodata.org
10 http://www.htc.com/www/product/desire/overview.html
(a) URIs shown on a (b) Details of an URI (c) Example
map SPARQL query
(d) Query results
steps, we will focus on e ciency issues, by building a mobile speci c query
optimizer and more e cient data storage machanism. In context of mobile devices
for example, bandwidth and battery are a crucial elements that need to be taken
into account in future work.
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgements</title>
      <p>This work has been supported by the Science Foundation Ireland under Grant
No. SFI/08/CE/I1380 (Lion-2), the European Union under Grant No.
FP7224342-ICT-2007-2 (PECES) and the Irish Research Council for Science,
Engineering and Technology (IRCSET).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>D. J.</given-names>
            <surname>Abadi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Marcus</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. R.</given-names>
            <surname>Madden</surname>
          </string-name>
          , and
          <string-name>
            <given-names>K.</given-names>
            <surname>Hollenbach</surname>
          </string-name>
          .
          <article-title>Scalable semantic web data management using vertical partitioning</article-title>
          .
          <source>In VLDB</source>
          , pages
          <volume>411</volume>
          {
          <fpage>422</fpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>J. B</surname>
          </string-name>
          . et al.
          <article-title>Sesame: An architecture for storing and querying rdf data and schema information</article-title>
          .
          <source>In Spinning the Semantic Web</source>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>K. W.</surname>
          </string-name>
          et al.
          <article-title>E cient RDF storage and retrieval in Jena2</article-title>
          .
          <source>In EXPLOITING HYPERLINKS 349</source>
          , pages
          <fpage>35</fpage>
          {
          <fpage>43</fpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>A.</given-names>
            <surname>Harth</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Decker</surname>
          </string-name>
          .
          <article-title>Optimized index structures for querying rdf from the web</article-title>
          .
          <source>In LA-WEB, page 71</source>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>J.</given-names>
            <surname>Perez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Arenas</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Gutierrez</surname>
          </string-name>
          .
          <article-title>Semantics and complexity of SPARQL</article-title>
          .
          <source>ACM Trans. Database Syst</source>
          .,
          <volume>34</volume>
          (
          <issue>3</issue>
          ):1{
          <fpage>45</fpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>C.</given-names>
            <surname>Weiss</surname>
          </string-name>
          , P. Karras,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Bernstein</surname>
          </string-name>
          .
          <article-title>Hexastore: sextuple indexing for semantic web data management</article-title>
          .
          <source>VLDB</source>
          ,
          <volume>1</volume>
          (
          <issue>1</issue>
          ):
          <volume>1008</volume>
          {
          <fpage>1019</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>