<!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>Optimizing, Planning and Executing Analytics Workflows over Multiple Engines</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Katerina Doka ?</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maxim Filatov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Victor Giannakouris ?</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Verena Kantere</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nectarios Koziris ?</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Christos Mantas ?</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nikolaos Papailiou ?</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vassilis Papaioannou ?</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dimitrios Tsoumakos</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Geneva, Switzerland Ionian University</institution>
          ,
          <country country="GR">Greece</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Big data analytics have become a necessity to businesses worldwide. The complexity of the tasks they execute is ever increasing due to the surge in data and task heterogeneity. Current analytics platforms, while successful in harnessing multiple aspects of this \data deluge", bind their e cacy to a single data and compute model and often depend on proprietary systems. However, no single execution engine is suitable for all types of computation and no single data store is suitable for all types of data. To this end, we present and demonstrate a platform that designs, optimizes, plans and executes complex analytics work ows over multiple engines. Our system enables users to create work ows of variable detail concerning the execution semantics, depending on their level of expertise and interest. The work ows are then analysed in order to determine missing execution semantics. Through the modelling of the cost and performance of the required tasks over the available platforms, the system is able to match distinct work ow parts to the execution and/or storage engine among the available ones in order to optimize with respect to a user-de ned policy.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. INTRODUCTION</title>
      <p>
        Big data analytics have become indispensable for the
majority of industries, enabling engineers, analytics experts
and scientists alike to tap the potential of vast amounts of
business-critical data. Such data analysis demands a high
degree of parallelism in both storage and computation and
has given rise to diverse execution engines and data stores
that target speci c data and computation types.
Performance optimizations thereof assume strictly single-engine
environments, thus considering speci c data formats and
query/analytics task types [
        <xref ref-type="bibr" rid="ref14 ref9">9, 14</xref>
        ].
      </p>
      <p>
        However, modern work ows have become increasingly long
and complex and may include multiple data types such as
relational, key-value, graph, etc., as well as greatly diverse
operators, ranging from simple Select-Project-Join (SPJ)
and data movement to complex NLP-, graph- or custom
business-related operations. What is more, they are
executed under varying constraints and policies (e.g., optimize
performance or cost, etc.). There currently exists no single
platform that can optimize for this complexity [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ].
      </p>
      <p>
        Sensing this trend, companies now o er cloud software
distributions that incorporate di erent processing frameworks,
data stores and libraries to alleviate the burden of
multiple installations and con gurations [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ]. Yet, such
multiengine environments lack a meta-scheduler that could
automatically match tasks to the right engine(s) according to
multiple criteria, deploy and run them without manual
intervention.
      </p>
      <p>To address multi-engine analytics work ow optimization
we demonstrate an integrated, open source platform for
creating, managing, executing and monitoring complex
analytics work ows1. Its goal is twofold: (a) To allow the user
to design work ows that span multiple engines and data
stores by either giving speci c details on execution
semantics of tasks and data stores or leaving the platform to
determine them through an automated work ow analysis phase.
Then, the work ow goes through an automated optimization
phase, before being sent for execution. (b) To provide
costbased and customizable resource management of the diverse
execution and storage engines available by adaptively
choosing to execute each sub-part of the work ow to a (possibly
di erent) deployed engine in order to enhance performance</p>
      <p>Towards this direction, our system supports the most
prevalent open-source execution models (e.g., Map-Reduce, Bulk
Synchronous Parallel) as well as state-of-the-art centralized
and distributed storage engines (RDBMSs, NoSQL, distributed
le-systems, etc.) and is able to optimize work ows
consisting of tasks that range from simple group-by, aggregation
or complex joins between di erent data sources to
machinelearning tasks.</p>
      <p>
        Our demonstration will showcase our system's ability to i)
model operator performance according to di erent engines
and their resources and ii) adaptively decide on which
operator version to run based on the optimization policy and the
available engines. The demonstration platform will integrate
Hadoop [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], Spark [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], PostgreSQL [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and HDFS and
operate upon real-life and synthetic work ows chosen to include
diverse datasets and computation types. The participants
will have a rich interaction with the platform, controlling
1The presented system is part of the ASAP (Adaptive, highly
Scalable Analytics Platform) EU-funded project. ASAP
envisions a uni ed, open-source execution framework for
scalable data analytics. http://www.asap-fp7.eu/
PAW
r
e
z
i
m
i
t
p
O
workflow
      </p>
      <p>user policy</p>
      <p>Interface
r
e
z
y
l
a
n
A
parse
match
refine
validate</p>
      <sec id="sec-1-1">
        <title>Decision</title>
        <p>Making
r
e
z
iim Planner
t
p
O
r
o
t
u
c
e
x
E</p>
      </sec>
      <sec id="sec-1-2">
        <title>Operator lib</title>
      </sec>
      <sec id="sec-1-3">
        <title>Model DB</title>
      </sec>
      <sec id="sec-1-4">
        <title>Modeling</title>
      </sec>
      <sec id="sec-1-5">
        <title>Profiling</title>
      </sec>
      <sec id="sec-1-6">
        <title>Enforcer</title>
      </sec>
      <sec id="sec-1-7">
        <title>Model refinement</title>
        <p>policy and input aspects, while being able to evaluate the
advantages of multi-engine optimization by inspecting
generated plans and output.</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>2. SYSTEM ARCHITECTURE</title>
      <p>
        The system integrates two core components of the ASAP
project, namely PAW (Platform for Analytics Work ows),
which acts as the work ow management tool of ASAP and
IReS (Intelligent Resource Scheduler) [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], which creates the
optimal plan and executes it. The two components
collaborate with the IReS platform for the creation, optimization
and execution of user work ows. Figure 1 depicts the
architecture of the integrated system to be demonstrated.
      </p>
      <p>The components of PAW communicate using the internal
work ow representation and are:</p>
      <p>Interface. The interface enables users to interactively
create and/or modify a work ow.</p>
      <p>Analyzer. The analyzer parses the work ow, identi es
operators and data stores and maps them to existing
operator implementations, generates metadata of edges, nds
edges where the data conversion should be applied and
adds the appropriate conversions. The operator
implementations reside in the IReS operator library. The
operators are classi ed as, either analytics operators, which
perform the core analytics jobs over the data, or the
associative operators, which serve as `glue' between di erent
engines and perform move and transformation operations.
Optimizer. The optimizer generates a functionally
equivalent work ow, optimized for performance objective.</p>
      <p>After the generation of the optimized work ow, PAW hands
it to the IReS platform for further cost-based optimization
according to the use-de ned policy, planning and execution.
IReS receives from PAW the input that is necessary for its
operations and identi es execution artifacts such as
operators, data, their dependencies and accompanying metadata.
Moreover, it validates the user-de ned policy. All this
information must be robustly identi ed, structured in a
dependency graph and stored.</p>
      <p>IReS is decomposed in two layers, the cost-based optimizer
and the executor layer:
The cost-based optimizer layer is responsible for
optimizing the execution of an analytics work ow with respect
to the policy provided by the user. The core component
of the optimizer is the Decision Making module, which
determines the optimal execution plan in real-time. This
entails deciding on where each subtask is to be run, under
what amount of resources provisioned, the plan for
moving data to/from their current locations and between
runtimes (if more than one is chosen) and de ning the output
destinations. Such a decision must rely on the
characteristics of the analytics task in hand and the models of all
possible engines. These models are produced by the
Modeling module and stored in a database called Model DB.
The initial model of an engine results from pro ling and
benchmarking operations in an o ine manner, through
the Pro ling module. This module directly interacts with
the pool of physical resources and the monitoring layer
in-between. While the work ow is being executed, the
initial models are re ned in an online manner by the Model
re nement module, using monitoring information of the
actual run. Such monitoring information is kept in the
IReS DB and is utilized by the decision making module
as well, to enable real-time, dynamic adjustments of the
execution plan based on the most up-to-date knowledge.
The executor layer is the layer that enforces the optimal
plan over the physical infrastructure. It includes methods
and tools that translate high level \start runtime under x
amount of resources", \move data from site Y to Z" type
of commands to a work ow of primitives as understood
by the speci c runtimes and storage engines. Moreover, it
is responsible for ensuring fault tolerance and robustness
through real-time monitoring.</p>
      <p>
        Both PAW and IReS are open source2. The interface of
PAW is a web application in Jade [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] and Co eeScript [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ],
and Grunt [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] compiles it in HTML and JavaScript,
respectively. It communicates with other modules using Nginx
web server [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] and PHP-FPM [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. The analysis and
optimisation modules of PAW are implemented in Python. The
IReS platform modules are implemented in Java. The
en2https://github.com/project-asap
forcer module relies on YARN [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] and extends Cloudera
Kitten [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], a framework that allows the de nition of
operator execution on top of YARN.
      </p>
    </sec>
    <sec id="sec-3">
      <title>DEMONSTRATION DESCRIPTION</title>
      <p>
        The demonstration shows how PAW and IReS
collaborate in order to optimize an analytics work ow, produce an
execution plan that conforms to a user-de ned policy and
enforce it. We show that the system can be used by users
with di erent level of expertise in order to create work ows.
The tool implements a novel work ow language [
        <xref ref-type="bibr" rid="ref11 ref12">11, 12</xref>
        ] that
allows the design of a work ow that spans multiple engines
and data stores by either giving speci c details on execution
semantics of tasks and data stores or leaving the platform to
determine the execution semantics and data stores, through
an automated work ow analysis phase. The analysed
workow then goes through a decision making phase, where the
execution plan that optimizes user-de ned parameters (e.g.,
performance, cost, etc.) is produced based on the operator
models. Finally, the optimized work ow is sent for
execution.
      </p>
      <p>The system is controlled by a comprehensive web-based
GUI that attendees will utilize. The GUI controls a
cloudbased deployment of several runtime engines and data stores
over 16 virtual machines of an Openstack cluster.</p>
      <p>The users will be able to test the system either using one
of our prede ned work ows or assembling their own, using
operators from the ASAP operator library. A diverse set of
operations of varying complexity is covered including basic
SQL queries (selections, projections, joins) and ML
algorithms (classi cation and clustering).</p>
      <p>The prede ned work ows represent real use cases driven
by business needs. These cover complex data manipulations
in the areas of business analytics on telecommunication data
and web data analytics, provided by a large
telecommunications company and a well-known web archiving organization
respectively. The input datasets for these work ows consist
of anonymized telecommunication traces and web content
data (WARC les). Subsets of those datasets can be used
for each of the available work ows.</p>
    </sec>
    <sec id="sec-4">
      <title>USE CASE EXAMPLE</title>
      <p>This example shows the telecommunication use case of
ASAP. This work ow detects peaks representing an event,
by comparing the density of population within a region in a
given moment against the expected density for that area at
that hour of the day. It involves processing of anonymized
Call Detail Records (CDR) data (residing in an RDBMS)
via clustering along time and space in order to detect peaks
in load according to a set of criteria. The dataset of peaks is
used to discover clusters of calls that occur with or without
regularity. Figure 2 displays the work ow.</p>
      <p>The rst steps of the process, data prep and convert ts,
consist of call aggregation by user id and extraction of time
periods (for instance, days) and smaller time slots (for
instance, hours). The regions table contains links of tower
ids and regions. Time slots and regions of analysis, which
are used in lter region, are parameters provided by the
user. These two parameters, then, allow de ning a
spatiotemporal grid, and each observation of an input dataset can
be assigned to one of its cells. The number of observations
that fall in a cell de nes its density. The input data is
partitioned into two sets: a training dataset (for instance, 1st
month) and a test dataset (for instance, left time period),
two lter s following after convert ts produce them. For both
datasets the spatiotemporal grid of densities is computed.
The rst is used to compute the densities of a typical
period for each region. The second dataset is then compared
against such typical period in order to detect signi cant
deviations. Based on the densities obtained for each region
and each time slot over the training dataset, an expected
density value is computed for each region, by averaging the
densities (week aggr ation) measured at the same time slot of
all the periods in the time window covered by the dataset.
For instance, we might obtain an expected density for each
pair (region, hour of the day), i.e., 24 values for each
region, assuming 24 one-hour time-slots. Then, for each region
and each time-slot, the corresponding density is compared
against its expected value (join and calc ration): if the
difference is signi cant ( lter peaks), an event of form (region,
weight, time slot) is produced (events), representing its
spatiotemporal slot and a discretized measure (weight) of how
strong was the deviation.</p>
      <p>Figure 3 displays the optimized work ow produced by
PAW's Optimizer. In this there are tasks pushed closer to
the start of the work ow and merged in a single node, these
tasks are in the original nodes join, lter region and regions
dataset. This optimization has been done accordingly to a
heuristic that moves restrictive operators (in this case lter
region) to the root of the work ow. Furthermore the
Optimizer of PAW checks that this rearrangement and merging
can be performed.</p>
      <p>This work ow is then handed to the IReS platform, where
the conceptual work ow operators are matched with
implementations that exist in the operator library, creating all
alternative execution paths. After consulting the cost
models of the implemented operators, the platform chooses the
plan and decides on the exact engines and their setup in
order to optimize the work ow in terms of the user-de ned
policy. In our running example, if the input dataset is large
the decision making module opts for a plan that contains
distributed implementations of the operators in Spark rather
than centralized ones in PostgreSQL. This choice entails the
transfer of the dataset from PostgreSQL (where it originally
resides) to HDFS, thus an auxiliary move operator is added
to the work ow. Moreover, assuming the user only cares to
minimize execution time, IReS decides to utilize all available
nodes of the cluster.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgements</title>
      <p>This work has been supported by the European Commission
in terms of the ASAP FP7 ICT Project under grant
agreement no 619706. Nikolaos Papailiou has received funding
from IKY fellowships of excellence for postgraduate studies
in Greece - SIEMENS program.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <source>[1] Cloudera Distribution CDH 5.2</source>
          .0. http://www.cloudera.com/content/cloudera/en/ downloads/cdh/cdh-5
          <article-title>-2-0</article-title>
          .html.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <issue>Hortonworks Sandbox 2</issue>
          .1. http://hortonworks.com/products/hortonworkssandbox/.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Postgresql</surname>
          </string-name>
          . http://www.postgresql.org/.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>The</given-names>
            <surname>Apache Software Foundation</surname>
          </string-name>
          : Apache Hadoop. http://hadoop.apache.org/.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>The</given-names>
            <surname>Apache Software Foundation</surname>
          </string-name>
          : Apache Spark. https://spark.apache.org/.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <article-title>[6] Co eescript</article-title>
          . http://co eescript.org/.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>K.</given-names>
            <surname>Doka</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Papailiou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Tsoumakos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Mantas</surname>
          </string-name>
          , and
          <string-name>
            <given-names>N.</given-names>
            <surname>Koziris</surname>
          </string-name>
          .
          <article-title>Ires: Intelligent, multi-engine resource scheduler for big data analytics work ows</article-title>
          .
          <source>In Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data</source>
          , pages
          <volume>1451</volume>
          {
          <fpage>1456</fpage>
          . ACM,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <article-title>[8] Grunt - the javascript task runner</article-title>
          . http://gruntjs.com/.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>H.</given-names>
            <surname>Herodotou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Lim</surname>
          </string-name>
          , G. Luo,
          <string-name>
            <given-names>N.</given-names>
            <surname>Borisov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Dong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F. B.</given-names>
            <surname>Cetin</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Babu</surname>
          </string-name>
          .
          <article-title>Star sh: A Self-tuning System for Big Data Analytics</article-title>
          .
          <source>In CIDR</source>
          , volume
          <volume>11</volume>
          , pages
          <fpage>261</fpage>
          {
          <fpage>272</fpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <article-title>Jade - template engine</article-title>
          . http://jade-lang.com/.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>V.</given-names>
            <surname>Kantere</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Filatov</surname>
          </string-name>
          .
          <article-title>A framework for big data analytics</article-title>
          .
          <source>In C3S2E</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>V.</given-names>
            <surname>Kantere</surname>
          </string-name>
          and
          <string-name>
            <given-names>F.</given-names>
            <surname>Maxim</surname>
          </string-name>
          .
          <article-title>Modelling processes of big data analytics</article-title>
          .
          <source>In WISE</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <article-title>Cloudera kitten</article-title>
          . https://github.com/cloudera/kitten.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>H.</given-names>
            <surname>Lim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Herodotou</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Babu</surname>
          </string-name>
          .
          <article-title>Stubby: A Transformation-based Optimizer for Mapreduce Work ows</article-title>
          .
          <source>Proceedings of the VLDB Endowment</source>
          ,
          <volume>5</volume>
          (
          <issue>11</issue>
          ):
          <volume>1196</volume>
          {
          <fpage>1207</fpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <surname>Nginx</surname>
          </string-name>
          . http://nginx.org/.
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <article-title>Php-fpm (fastcgi process manager)</article-title>
          . http://php-fpm.org/.
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>D.</given-names>
            <surname>Tsoumakos</surname>
          </string-name>
          and
          <string-name>
            <given-names>C.</given-names>
            <surname>Mantas</surname>
          </string-name>
          .
          <article-title>The Case for Multi-Engine Data Analytics</article-title>
          .
          <source>In Euro-Par 2013: Parallel Processing Workshops</source>
          , pages
          <volume>406</volume>
          {
          <fpage>415</fpage>
          . Springer,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>V. K.</given-names>
            <surname>Vavilapalli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. C.</given-names>
            <surname>Murthy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Douglas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Agarwal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Konar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Evans</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Graves</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lowe</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Shah</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Seth</surname>
          </string-name>
          , et al.
          <article-title>Apache hadoop yarn: Yet another resource negotiator</article-title>
          .
          <source>In Proceedings of the 4th annual Symposium on Cloud Computing, page 5. ACM</source>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>