<!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>From Cloud to Fog and Sunny Sensors</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Position Paper</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hannes Grunert</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Bjorn Butzin</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Martin Kasparick</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andreas Heuer</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dirk Timmermann</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Rostock, Database Research Group</institution>
          ,
          <addr-line>18051 Rostock</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Rostock, Institute of Applied Microelectronics and Computer Engineering</institution>
          ,
          <addr-line>18051 Rostock</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Assistive systems collect large amounts of data in the internet of things and compute behavior and intentions of users in the cloud. Our approach is to push these computations (interpreted as database queries) as close as possible to the local sensors of the internet of things. We aim at replacing privacy-compromising cloud-based computations by fog- or edge-based computations or even by processing on the local sensors directly. Not only can this approach solve privacy problems, but also results in a better performance and energy-e ciency of the whole system: sensor-based computations are the (privacy-respecting) sunny side of the cloud. This position paper will give a short motivation and state of the art in di erent areas (from databases to wireless sensor networks) and will present our approach in combining modern interfaces to di erent sensors and concepts of database theory such as query rewriting and query containment.</p>
      </abstract>
      <kwd-group>
        <kwd>Cloud</kwd>
        <kwd>Fog and Edge Computing</kwd>
        <kwd>Internet of Things</kwd>
        <kwd>Sensor Networks</kwd>
        <kwd>Privacy</kwd>
        <kwd>Performance</kwd>
        <kwd>Query Rewriting</kwd>
        <kwd>Query Containment</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Assistive systems support the users at work (Ambient Assisted Working) while
they can remotely controls their homes (Ambient Assisted Living, AAL). Through
various sensors, information about the current situations and the actions of the
users are collected. Thie data is stored by the system and linked with other
data from the web, for example the Facebook pro les of the users. By designing
models for intention and activity recognition from the connected data, the smart
environment can react autonomously to meet the needs of the users.</p>
      <p>
        In assistive systems [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], signi cantly more information than required is
collected in the cloud { which raises questions about privacy. The users usually have
no or only a very small in uence on the storage and processing of their personal
data. If the cloud service is not located in their native country, the users cannot
be sure that the same laws apply as in their home countries. As a result, their
right to informational self-determination is violated.
      </p>
      <p>The introduction of data privacy mechanisms in assistive systems is seen
very skeptical by the developers. It is feared that the anonymization of the
data hinders system development. Anonymization or pseudonymization of the
data may lead to loss of detail, so that the results of analytic processes become
inaccurate and, in extreme cases, unusable.</p>
      <p>Our idea is to support assistive systems in performing the necessary behavior
and intention recognition algorithms, but to automatically push the analysis
operations as far as possible from the cloud to the (local) sensors. In an AAL
environment, this results in a sensor-based or fog-based (edge-based) instead of
a cloud-based computation. Besides privacy aspects, sensor-based or fog-based
computing can also increase the performance and energy-e ciency of the system.
1.1</p>
    </sec>
    <sec id="sec-2">
      <title>Cyber-physical systems and wireless sensor networks</title>
      <p>
        The often cited law of Gordon Moore is used many times to argue that we
do not need to increase e ciency, one just has to wait for the next hardware
generation and thus a new boost of computational power. In wireless sensor
networks (WSN), cyber-physical systems (CPS) and the internet of things (IoT),
considerations are di erent. Here, the main driving factor is the reduction in
energy consumption. Even newly developed moting platforms like UC Berkeley's
Firestorm only have 512kB ROM and 64kB of RAM [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] which is not signi cantly
more than in devices of 2005 in terms of absolute numbers, e.g., TelosB: 48kB
ROM and 10kB RAM. Instead, the idle power consumption has been reduced,
in this example by about 55 percent from 5.1 A to 2.3 A. Hence, the focus on
developing them is di erent. To save as much energy as possible, moting devices
are kept asleep as long as possible. If awake, the transmission of data is the most
costly operation in WSN, thus, it is tried to avoid them. Data should only be
sent when requested by others or local memory is going to exceed. Additionally,
through aggregation, preprocessing and compression, the time to send the next
data-set can be extended. At this point computational power as well as memory
capacities have to be utilized in an e cient way. After reducing the amount and
frequency of transmissions required, the next level is to keep the middleware and
transmission protocol energy-e cient. This means to reduce protocol overhead
but also stack sizes and dynamic memory consumption need to be taken into
account.
      </p>
      <p>The idea of privacy through locality and energy saving constraints of
wireless sensor networks harmonize with each other. However, other requirements of
databases might be contradictory to the requirements of WSN e.g. in terms of
latency, reliability, and consistency.
1.2</p>
    </sec>
    <sec id="sec-3">
      <title>Privacy and Performance</title>
      <p>By reducing and pre-aggregating raw sensor data to its minimal essence of
required information, it is possible to protect privacy in smart systems.
Additionally, the overall performance of the system can be enhanced when less data is
analyzed on frequently busy nodes.</p>
      <p>As part of our research project, privacy concepts for processing queries in
assistive systems are designed. However, these concepts are not placed on top
of the existing analysis functions, but are integrated in close cooperation during
the development process.</p>
      <p>The data-avoidant passing of the information regarding sensors and
context to the analytical tools of the assistive system will not only improve the
privacy-friendliness of the system. By pre-compressing the data by means of
selection, aggregation, and compression operators on the sensor itself it is possible
to increase the e ciency of the system. The privacy rights and the information
requirements of the analysis tools can be implemented as integrity constraints
in the database system. Through the integrity constraints, the necessary
algorithms for anonymization and preprocessing can be run directly on the database.
Thus, a transfer of the local data to external programs or modules, that might
be located on di erent computing units, is omitted.</p>
      <p>
        Instead of using hundreds of thousands of computers in the cloud (e.g. Google
or Amazon), we can also use hundreds of billions of sensors or devices in the IoT
to perform the necessary computations for the behavior and intention recognition
of assistive systems. This results in fog or edge computing [
        <xref ref-type="bibr" rid="ref11 ref4">11, 4</xref>
        ] and even in
local data processing on sensors.
2
      </p>
      <sec id="sec-3-1">
        <title>State of the Art</title>
        <p>We now give a short overview of the research areas cloud, Big Data, IoT
(especially middleware and embedded database systems) and fog computing.
Cloud and Big Data: In the era of Big Data, more and more information
is stored and processed in Cloud environments like IBM's Bluemix and
similar platforms. Such systems o er a variety of services and possibilities for data
storage, including services for the Internet of Things (e.g. APIs for REST and
MQTT).</p>
        <p>
          Unfortunately, privacy is often ignored or, at least, it is not guaranteed by
cloud services. For example, nearly every service o ered by IBM Bluemix states
in the Terms of Use that the service \[...] does not comply with the US-EU [...]
Safe Harbor Frameworks" (e.g. the Watson service \Driver Behavior" [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]).
Internet of Things | Middleware: IoT, CPS and WSN are distributed
networks of small and heterogeneous applications. The service oriented architecture
(SOA) approach has shown to be useful in such environments. SOA is well known
for its capability to integrate di erent applications horizontally and vertically.
Due to the restrictions of the devices in such scenarios, SOA approaches have
been tailored to t the needs for reduced overhead, descending memory footprint
and less required computational power. Examples of those are the constrained
application protocol (CoAP) and the devices pro le for web services (DPWS).
CoAP is a promising candidate for IoT applications, as it is a RESTful SOA
type with less overhead than HTTP and adds publish subscribe mechanisms.
A comparison of di erent CoAP implementations can be found in [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. Another
competing protocol for networked embedded devices is Message Queue
Telemetry Transport (MQTT). It is a pure publish subscribe protocol, that uses a
centralized broker to manage the message ow. Often the cloud is used as
broker. Thus, due to its centralized nature, MQTT is less optimal than CoAP for
our proposed solution.
        </p>
        <p>Data publishing of \traditional" database systems is performed on
established interfaces like JDBC or ODBC. By these standardized interfaces, the
programmer does not have to care about the actual implementation and can
write code independent of the actual database system.</p>
        <p>
          Embedded Databases: Besides standard database systems there exist several
specialized databases like Berkeley DB [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] and TinyDB [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]. These systems are
designed to run on resource limited devices like Raspberry Pis or even as
embedded databases directly on the sensor. In [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ], several approaches to a distributed
database management on sensor networks are compared, TinyDB among them,
here especially aiming at energy e ciency. Acquisitional query processing [
          <xref ref-type="bibr" rid="ref5 ref9">5, 9</xref>
          ]
can push queries to sensors and select relevant sensors in a WSN to reduce the
amount of sensors needed for a computation (sensor reduction). In the existing
approaches mentioned in [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] , this sensor reduction is completely done manually
(by the programmer).
        </p>
        <p>Fog Computing: What is missing in fog computing, is a database-centered
approach to computation, that is, given a query respresenting a necessary
computation on the sensor data of the IoT, how to automatically prevent to simply
transfer the complete data sets to the cloud servers.</p>
        <p>
          In [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] we introduced a framework for privacy aware query processing in
layered networks of \traditional" databases. The query processor includes modules
for query rewriting and transformation, detecting key-like combinations of
attributes and di erent anonymization concepts like k-anonymity and slicing,which
can be extended by including new concepts for querying modern hardware,e.g.
by rewriting a SQL query to di erent data management layers, the lowest of
these being only able to perform some simple lter operations (like selections
against given attribute values).
3
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>Vision</title>
        <p>We propose a layered architecture with four logically distinguishable layers (see
Fig. 1). The Sensor Layer includes the sensors which are very resource
constrained in terms of CPU, memory, and power. The Personal Layer consists of
typically mobile devices or embedded systems with higher performance but also
high power constraints, like smartphones or edge nodes of a WSN. Router, home
automation control units, private servers, etc. build up the Fog Layer. As these
Fog
Layer
complex analysis
in R and SQL
complex SQL
queries with
recursion
Personal simple queries
Layer with aggregation
Sensor
Layer
simple filter
operations
devices have a wired power supply power saving is not as relevant as for the
two lower layers. The Cloud Layer is built by powerful server farms without
notable constraints according to power, CPU, or memory. Note that it is possible
to have multiple layers within one of the four major layers, e.g. there could be
several Fog Layers within a multi-tenancy or o ce building. From the top to
the bottom layer resource constraints are increasing and the amount of possible
(database related) functionalities and operations decreases. This layer approach
has several advantages: In terms of privacy, each layer de nes a strict transition
where it can be de ned which data is passed upwards and its granularity. This
allows the ne-grained protection of critical personal data like health data, as
the information can be stored and processed within the local parts of the system.
Generally, the lower the layer, the higher is the ability of the user to control its
own data.</p>
        <p>As lower layers are more resource constrained than the upper ones, the middle
layers provide functionalities for data processing as well as data transmission
and additionally proxy functionalities. This enables optimized query execution
according to the given resource constraints. The proxy functionality allows a
reduction of the amount of communication. Especially within the Sensor Layer
and between Sensor and Personal Layer this is a major aspect of power e ciency.
The layered approach enables the power e ciency optimization of the overall
system and not only for local nodes.</p>
        <p>The constrained set of database operations at the lower layers can be
compensated e ciently by the vertical fragmentation of queries into pushed-down
and remainder queries. Thus, the privacy constraints of the users of these smart
environments such as assistive systems are supported.</p>
        <p>We apply our concept on machine learning algorithms to show how they
will be transformed and pushed down in several steps resulting in simple lter
operations.</p>
        <p>A remaining open problem is to decide whether such queries can be performed
on a resource-constrained device. If not, we have to check if the data can be sent
to an upper layer without violating the privacy constraints of the users. This
open problem results in a query containment problem that will be part of our
future research.</p>
        <p>
          Currently, only simple algorithms can be split up into their basic functions.
The transformation of complex queries into simple fragments should be done
automatically. By rewriting the complex query Q into Qj and Q , where Q is
executed outside of the protected system environment, we hope to only transfer
data to the cloud that do not compromise privacy. We use extensions of the
theory of query containment and query optimization for conjunctive queries
[
          <xref ref-type="bibr" rid="ref3 ref8">3, 8</xref>
          ] to consider more complex queries (including complex statistical functions
using aggregation and grouping) [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. This approach can be extended to an IoT
scenario with multiple layers, where the top layer is a cloud system while the
bottom layer consists of embedded hardware.
        </p>
        <p>The handling of data in IoT environments will be rethought fundamentally.
Currently data is just pushed to the cloud while the layered approach enables
new methods to store, process, and query data on the lower layers. To achieve
this, IoT and database middleware have to be collated.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Andersen</surname>
            ,
            <given-names>M.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fierro</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Culler</surname>
            ,
            <given-names>D.E.</given-names>
          </string-name>
          :
          <article-title>System design for a synergistic, low power mote/BLE embedded platform</article-title>
          .
          <source>In: 2016 15th ACM/IEEE International Conference on Information Processing in Sensor Networks (IPSN)</source>
          . pp.
          <volume>1</volume>
          {
          <fpage>12</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Butzin</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Konieczek</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fiehe</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Golatowski</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Applying the BaaS reference architecture on di erent classes of devices</article-title>
          . In: 2nd International Workshop on Modelling,
          <article-title>Analysis, and Control of Complex CPS (CPS Data)</article-title>
          . pp.
          <volume>1</volume>
          {
          <issue>6</issue>
          (Apr
          <year>2016</year>
          ), to be published
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Chirkova</surname>
          </string-name>
          , R.:
          <article-title>Query containment</article-title>
          .
          <source>In: Encyclopedia of Database Systems</source>
          , pp.
          <volume>2249</volume>
          {
          <fpage>2253</fpage>
          .
          <string-name>
            <surname>Springer</surname>
            <given-names>US</given-names>
          </string-name>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Dastjerdi</surname>
            ,
            <given-names>A.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gupta</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calheiros</surname>
            ,
            <given-names>R.N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ghosh</surname>
            ,
            <given-names>S.K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Buyya</surname>
          </string-name>
          , R.:
          <article-title>Fog computing: Principles, architectures, and applications</article-title>
          .
          <source>CoRR abs/1601</source>
          .02752 (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Diallo</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rodrigues</surname>
            ,
            <given-names>J.J.P.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sene</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mauri</surname>
            ,
            <given-names>J.L.</given-names>
          </string-name>
          :
          <article-title>Distributed database management techniques for wireless sensor networks</article-title>
          .
          <source>IEEE Trans. Parallel Distrib. Syst</source>
          .
          <volume>26</volume>
          (
          <issue>2</issue>
          ),
          <volume>604</volume>
          {
          <fpage>620</fpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Grunert</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Heuer</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Datenschutz im PArADISE</article-title>
          .
          <source>Datenbank-Spektrum</source>
          <volume>16</volume>
          (
          <issue>2</issue>
          ),
          <volume>107</volume>
          {
          <fpage>107</fpage>
          (
          <year>July 2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>IBM: IBM Watson IoT Driver Behavior</surname>
          </string-name>
          <article-title>Service</article-title>
          . http://www-03.ibm.com/ software/sla/sladb.nsf/sla/bm-7328-01?Open, last access:
          <volume>09</volume>
          .
          <fpage>06</fpage>
          .2016
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Kolaitis</surname>
            ,
            <given-names>P.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vardi</surname>
          </string-name>
          , M.Y.:
          <string-name>
            <surname>Conjunctive-Query Containment</surname>
            and
            <given-names>Constraint</given-names>
          </string-name>
          <string-name>
            <surname>Satisfaction</surname>
          </string-name>
          .
          <source>17. Symposium on Principles of Database Systems</source>
          , Seattle pp.
          <volume>205</volume>
          {
          <issue>213</issue>
          (
          <year>1998</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Madden</surname>
            ,
            <given-names>S.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Franklin</surname>
            ,
            <given-names>M.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hellerstein</surname>
            ,
            <given-names>J.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hong</surname>
            ,
            <given-names>W.:</given-names>
          </string-name>
          <article-title>TinyDB: an acquisitional query processing system for sensor networks</article-title>
          .
          <source>ACM Transactions on Database Systems (TODS) 30(1)</source>
          ,
          <volume>122</volume>
          {
          <fpage>173</fpage>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10. Oracle: Oracle Berkeley DB 12c. http://www.oracle.com/technetwork/ database/database-technologies/berkeleydb/overview/index.html, last access:
          <volume>09</volume>
          .
          <fpage>06</fpage>
          .2016
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Shi</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dustdar</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>The Promise of Edge Computing</article-title>
          .
          <source>Computer</source>
          <volume>49</volume>
          (
          <issue>5</issue>
          ),
          <volume>78</volume>
          {81 (May
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Weiser</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>The Computer for the 21st Century</article-title>
          .
          <source>Scienti c American</source>
          <volume>265</volume>
          , 94{
          <fpage>104</fpage>
          (
          <year>1991</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>