<!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>Adaptive Selective Replication for Complex Event Processing Systems</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Franz Josef Gr u¨neberger</string-name>
          <email>franz.josef.grueneberger@sap.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Thomas Heinze</string-name>
          <email>thomas.heinze@sap.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pascal Felber</string-name>
          <email>pascal.felber@unine.ch</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>SAP AG</institution>
          ,
          <addr-line>Chemnitzer Str. 48, 01187 Dresden</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Neuchaˆ tel</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>As of today, active replication is used in complex event processing systems to enable near zero latency take over in case of host failures. Moreover, elastic complex event processing systems adapt their resource consumption to the actual system load. However, active replication is a coarse-grained approach demanding the duplication of all used resources. Therefore, we envision a system adopting adaptive ne-grained replication strategies allowing to trade o availability and used resources.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Switzerland</p>
    </sec>
    <sec id="sec-2">
      <title>1. INTRODUCTION</title>
      <p>
        The dissemination of high frequency event sources raises
the demand to extract information from high velocity data
streams. Prevalent application domains comprise automatic
stock trading, credit card fraud detection, automated
homecare, as well as scienti c experiments, logistics, and
telecommunication. To process high velocity data (&gt; 10.000 events
per second) with low latency (&lt; 100 ms), a new class of
applications enabling the e cient analysis of data in real-time
has ermerged. Prominent examples of such complex event
processing systems comprise Borealis [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], IBM System S [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ],
and Yahoo! S4 [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ].
      </p>
      <p>
        Distributed complex event processing systems spanning
thousands of hosts cope with very high data rates and
extensive computations. However, the error probability increases
with the number of components in a system. Because in data
centers the probability for a single host to fail at least once
a year is between 4 and 8 percent [
        <xref ref-type="bibr" rid="ref20 ref6">6, 20</xref>
        ] and distributed
complex event processing systems execute all computations
in memory, fault tolerance techniques have to be leveraged
to circumvent unrecoverable data loss.
      </p>
      <p>
        Various fault tolerance techniques like active replication [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]
and check pointing [
        <xref ref-type="bibr" rid="ref11 ref14">11, 14</xref>
        ] have been studied in the context
of complex event processing systems. To ensure failover with
almost zero latency, we focus on active replication.
However, actively replicating a system requires at least twice the
resources. Therefore, this paper envisions techniques and
outlines the major challenges for an elastic fault-tolerant
complex event processing system that achieves high availability
via adaptive selective replication. Speci cally:
1. We present an approach that leverages spare resources
to increase the availability of queries by replicating
selected parts, i. e. operators, of the running system.
Speci cally, we present di erent strategies to select
operators for replication. Moreover, striving for maximal
availability, we introduce di erent placement strategies
to deploy operators on hosts.
2. We envision an optimization component supporting the
replication of queries to hit a certain availability target
while adhering to resource constraints. Moreover, the
component should assist minimizing the resource usage
for a certain availability goal.
3. We explore the challenges arising from replication in
elastic distributed complex event processing systems,
where both queries and hosts are dynamically added
to and removed from the system.
      </p>
      <p>The remainder of this paper is structured as follows:
Section 2 introduces the assumed system model. Section 3
presents an approach leveraging spare resources to improve
the availability of queries. In Section 4 we propose an
optimization component to minimize the resource consumption
for a certain availability target. The challenges arising from
an application of the approaches in an elastic system are
outlined in Section 5. Related research is discussed in Section 6.
Finally, Section 7 concludes the paper.
2.
2.1</p>
    </sec>
    <sec id="sec-3">
      <title>SYSTEM MODEL</title>
    </sec>
    <sec id="sec-4">
      <title>Query Model</title>
      <p>Queries in the system are continuous queries that can be
added and removed at any point in time. As opposed to
one-shot queries that are sent to the system and then produce
a result once, continuous queries remain in the system for a
certain period of time and produce results continuously. Let
Q = fq1; q2; : : : ; qlg be the set of queries in the system.</p>
      <p>Queries are speci ed by the user in an event processing
language (EPL). In the system queries are represented as
directed acyclic graphs (DAGs). Nodes represent operators
that are connected by unidirectional edges. A query compiler
transforms queries speci ed in EPL into a query graph.</p>
      <p>Each operator has one or two inputs and multiple outputs.
Operators with two inputs are referred to as binary operators.
Each operator has a type de ning its basic behaviour: source,
projection, lter, aggregation, sequence, join, and destination.
Besides a type all operators, except sources and sinks, have
a predicate re ning its functionality. For example in case of
a lter operator the predicate speci es the lter condition.</p>
      <p>The following example query calculates the average price
of the SAP stock over the last 10 minutes.</p>
      <p>INSERT INTO outStream</p>
      <p>SELECT compName, avg(tick)
FROM tickStream WITHIN 600 seconds
GROUP BY compName</p>
      <p>WHERE compName = "SAP";</p>
      <p>The corresponding query graph, which is depicted in
Figure 2, contains a source, lter, aggregation, and destination
operator.</p>
      <p>
        To minimize the number of operators in the system, all
queries are optimized via a query optimization component,
which analyses the query graph of already running queries
with respect to reusable operators leveraging incremental
multi query optimization (MQO) techniques [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. The
optimizer maintains an internal global query graph subsuming
all currently deployed queries. When adding a new query,
reusable parts are discovered using a breadth- rst search
on the global query graph. Figure 1 shows an example for
multi query optimization with two queries. Operators of
the already running query are depicted in the upper lane,
whereas operators for the newly added query are depicted in
the lower lane. Assuming that the same operator name
indicates the same operator type and predicate, the operators S1
and F1 are part of both queries. Instead of redeploying this
operators, they are reused from the already running query,
which is illustrated via the grey box.
      </p>
      <p>S1
S1</p>
      <p>F1
F1</p>
      <p>A1
merge
A2</p>
      <p>D1
D2</p>
      <p>Running</p>
      <p>Query
New
Query</p>
    </sec>
    <sec id="sec-5">
      <title>Replication Model</title>
      <p>To ensure near zero latency takeover, we assume active
replication in the system. Each operator can have multiple
replicas exhibiting exact the same behaviour as the primary
operator. However, this approach results in the consumption
of additional resources.</p>
      <p>Query operators and replicas are deployed independently
on available hosts. The current placement of operators on
hosts is described via a placement function plc : O ! H,
where O = fo1; o2; : : : ; omg is the set of operators for all
queries in the system and H = fh1; h2; : : : ; hng denotes the
set of used hosts.
2.3</p>
    </sec>
    <sec id="sec-6">
      <title>Failure Model</title>
      <p>
        According to the query model the system comprises several
operators (timed processes) that are executed on a set of
hosts. We assume that each host has a probability p to fail
with a crash stop failure. Crash stop failures result in an
immediate crash of all operators placed on the speci c host.
Moreover, we assume that Byzantine (value) errors caused
by erroneous executions can be transformed into crash stop
failures, e. g. by means of Software Encoded Processing [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
In the following we consider the time period of one day. Due
to the fact that in modern data centers the mean time to
repair (MTTR) can be up to two days [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], we assume that
crashed hosts will stay down for the whole day. Moreover,
host crashes are assumed to be uncorrelated, i. e. if some
hosts fail others will remain running.
      </p>
      <p>A query is considered broken, i for at least one of its
operators neither a primary operator nor an operator replica
is executed anymore.
2.4</p>
    </sec>
    <sec id="sec-7">
      <title>Load Model</title>
      <p>
        We assume a load model, which is based on work in the
context of the data streaming system Borealis [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ] and by
Viglas et al. [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ]. Each operator has one or two inputs and
multiple outputs that are associated with a certain event
rate. We assume that the input event rate for source
operators is given and the output event rate for source operators
equals the input event rate. Each operator op has a certain
load load(op). A load of 1.0 represents 100 % CPU usage
in a xed time interval - usually one second. This operator
load is calculated as product of the input event rate of an
operator multiplied by the cost c, which describes the time
required by the operator to process a single tuple.
      </p>
      <p>For the example query depicted in Figure 2 the load of the
di erent operators can be speci ed as load(S1) = r1 c(S1),
load(F1) = r1 c(F1), load(A1) = r2 c(A1), load(D1) =
r3 c(D1). Since each operator is associated with a
selectivity value, input event rates of operators can be
calculated as linear combination of source stream rates and
operator selectivity of predecessor operators. For example
the input event rate r3 of operator D1 can be expressed as
r3 = sel(A1) r2 = sel(A1) (sel(F1) r1).</p>
      <p>S1
r1</p>
      <p>F1
r2</p>
      <p>A1
r3</p>
      <p>D1</p>
      <p>Moreover, each operator has incoming (netin) and
outgoing (netout) network tra c. The incoming tra c netin(op)
is calculated as product of input rate and input tuple size
of the operator, whereas the outgoing tra c netout(op) is
calculated by the output rate multiplied with the output
tuple size.</p>
      <p>For the sake of convenience in the remainder of this paper
the term load is used interchangeably with CPU resources.
3.</p>
    </sec>
    <sec id="sec-8">
      <title>HEURISTIC REPLICATION</title>
      <p>Complex event processing systems are exposed to a
varying workload caused by di erent event rates as well as the
addition and removal of queries. Figure 3 sketches a ctitious
workload of a system processing queries for tra c monitoring.
Peak loads indicate rush hour tra c. To deliver results for
the queries in real-time, the system has to be equipped with
enough resources to handle those peak loads. However, since
the peak load can only be estimated, phases of
underprovisioning may occur, which are indicated by the dark gray
areas. Moreover, this leads to phases of overprovisioning
indicated by the dotted areas.</p>
      <p>70
60
ts50
s
o40
H
ed30
s
U20
10
0</p>
      <p>Overprovisioning</p>
      <p>Time</p>
      <p>Underprovisioning</p>
      <p>Heuristic replication targets the usage of such spare
resources in distributed complex event processing systems to
increase the availability of queries. Assume a system that
comprises a set of n hosts H = fh1; h2; : : : ; hng with an
overall CPU capacity of loadcap = n hostcap. Query operators
are placed according to an operator to host mapping plc.
The unused CPU resources loadrem can be calculated as
loadrem = loadcap</p>
      <p>X load(op)
op2O
Since queries can be added to and removed from the system
at runtime the amount of remaining resources usable to
improve the availability of queries in the system changes over
time. If the remaining load is smaller than the load of all
queries in the system, not all operators can be replicated
and, thus, a subset of operators has to be selected for
replication. Thus, we propose a three step approach. First, all
operators are rated according to their potential to improve
query availability by means of an operator importance
heuristic (see Section 3.1). Second, the set of operators as well as
the replication level, i. e. the number of replica instances,
is determined for each operator using an operator selection
algorithm (see Section 3.2). Third, the replica instances
are deployed on hosts according to an operator placement
strategy (see Section 3.3). Finally, in Section 3.4 we present
an evaluation.
3.1</p>
    </sec>
    <sec id="sec-9">
      <title>Operator Importance Heuristics</title>
      <p>The potential of operators to improve the availability of
queries is rated using a normalized importance function
impheur : O ! [0; 1] that associates each operator in the
system with a normalized importance value. Depending on
the source of information used for calculating this importance
value, static and dynamic heuristics can be distinguished.
3.1.1</p>
      <sec id="sec-9-1">
        <title>Static Heuristics</title>
        <p>Static heuristics calculate the importance of operators
based on properties observable in the global query graph.
Due to the multi query optimization operators can be reused
by multiple queries. Hence, if a reused operator fails, all
depending queries crash. One possible heuristic, referred to
as query out degree heuristic, is based on this observation
and rates the importance of operators that are reused by
multiple queries more important. The calculation of the
query out degree heuristic can be expressed as
impQOD(op) =
deg(op)
jQj
where deg(op) is the number of queries leveraging the
operator op, and jQj is the number of queries running in the
system.
3.1.2</p>
      </sec>
      <sec id="sec-9-2">
        <title>Dynamic Heuristics</title>
        <p>Dynamic heuristics assess runtime properties of operators
and are, thus, dependent on models providing estimations
if an operator is deployed for the rst time. If for example
the required resources are considered, the heuristics are
dependent on the load model of the system (see Section 2.4).
One example for a dynamic heuristic is the low utilization
heuristic that tries to replicate as much operators as possible.
Therefore, operators with a small load are preferred. The
calculation of the heuristic can be expressed as follows:
impLU (op) = 1</p>
        <p>load(op)
max(load(O))
where max(load(O)) is the maximum operator load among
all operators currently running in the system.
3.1.3</p>
      </sec>
      <sec id="sec-9-3">
        <title>Query Level Heuristics</title>
        <p>The heuristics introduced so far operate on an operator
level, i. e. operators are treated independent of each other.
Hence, operator-level heuristics might cause the selection of
only most but not all operators for a query. Not selected
operators are weak spots and decrease the achievable
availability for the query tremendously. Therefore, we propose to
combine operator importance values into query importance
values, which are expressed using a normalized importance
function for queries impQheur : Q ! [0; 1]. Operator
selection algorithms operating on query level heuristics will ensure
that once a query was selected for replication all operators
of that query are replicated. Only if not enough resources
are available to replicate a full query, single operators would
be selected.
3.2</p>
      </sec>
    </sec>
    <sec id="sec-10">
      <title>Operator Selection Strategies</title>
      <p>Operator selection strategies take care of the actual
operator selection based on the operator importance and the
remaining load loadrem in the system. The calculated
operator selection can be described as function sel : O ! Z, which
associates each operator with a number of replicas referred
to as replication level rep(op).
3.2.1</p>
      <sec id="sec-10-1">
        <title>Simple Operator Selection</title>
        <p>A simple operator selection strategy sorts all operators
descending based on their relative importance de ned via
impheur. Afterwards operators are selected for replication
until all spare resources loadrem are consumed. Selecting
operators for replication includes the determination of the
replication level, i. e. the number of replicas to create for
a single operator. Di erent selection procedures can be
established:
1. All operators can be selected for replication at least
once if enough remaining resources are available. If
afterwards spare resources are still available, the
replication level for the already selected operators can be
increased stepwise. This procedure ensures that each
operator is replicated at least once, if enough resources
are available.
2. A replication level larger than one might be set
directly for an operator. Hence, some operators might
be excluded from replication, if already all resources
are consumed.
3.2.2</p>
      </sec>
      <sec id="sec-10-2">
        <title>Optimized Operator Selection</title>
        <p>
          The simple operator selection strategy selects operators
for replication based on either a static or dynamic heuristic.
Thus, only one type of available information is incorporated
at a time and the resulting selection of operators can lead to
a non-optimal availability of queries. Therefore, we propose
to augment the selection process based on a static heuristic
with runtime information by modeling the operator selection
problem as 0-1 knapsack problem [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ].
        </p>
        <p>Each operator opi 2 O has a value vi = impheur(opi)
and a weight wi = load(opi). The maximum weight of the
bag equals the remaining resources loadrem in the system.</p>
        <p>Because the 0-1 knapsack problem is NP-hard and load
values of operators and, thus, the optimal solution changes
continuously, we suggest an approximation by means of a
combination of static and dynamic heuristics. The
optimization is based on the intuition that operators with the greatest
pro t per weight unit have to be selected rst. Thus, we
propose to leverage a product of the query out degree and
low utilization heuristic</p>
        <p>impQOD LU (op) = impQOD(op) impLU (op)
as basis for the operator selection.
3.3</p>
      </sec>
    </sec>
    <sec id="sec-11">
      <title>Fault-tolerant Operator Placement</title>
      <p>Operators selected for replication via the operator selection
algorithm have to be deployed on hosts. However, depending
on the chosen operator placement for the same set of selected
operators di erent availabilities can result.
3.3.1</p>
      <sec id="sec-11-1">
        <title>Simple Bin Packing</title>
        <p>
          A bin packing algorithm [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] for fault-tolerant operator
placement minimizes the number of used hosts, so that idling
hosts can be turned o to save energy. This property is in
line with the notion of elasticity. We propose a bin packing
algorithm, which is an extended version of a rst- t bin
packing, which has a complexity of O(mn), where m is the
number of replicas that shall be placed and n the number of
hosts.
        </p>
        <p>Each host is modeled as bin, where the available CPU
resources form the capacity. Replicas are rst sorted in
decreasing order according to their normalized importance
and then assigned using their load as weight. Moreover, two
constraints are ensured: (i) the network capacity of a host
should not be exceeded, (ii) two replicas of the same operator
are never placed on the same host. To reduce the consumed
network bandwidth, possible hosts are ordered according to
a neighboring factor representing the amount of predecessor
and successor operators deployed on the same host.
3.3.2</p>
      </sec>
      <sec id="sec-11-2">
        <title>Colored Bin Packing</title>
        <p>Even though the simple bin packing algorithm is
replicaaware due to the additional placement constraint, the system
availability is not maximized because as many replicas of
100%
Query Out Low Utilization (50%)
Low Utilization (50%)
Query Out (50%)</p>
        <p>Random (50%)
0.0 0.5 1.0 2.0</p>
        <p>Host Crash Probability (%)
●
3.0
di erent operators as possible are placed on one host. Thus,
multiple replicas crash in case of a host failure.</p>
        <p>
          Therefore, we propose to use a bin packing algorithm with
color constraints [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. Besides load and network consumption,
each replica will be associated with a unique color. The
colored bin packing algorithm ensures that each host contains
only replicas with at most c distinct colors, where c is a
pre-de ned positive integer. Because the number of
replicas placed on the same host shall be minimized, an upper
bound C with c C is speci ed for the color constraint.
Then the placement problem can be formulated with an
additional constraint that strives to minimize the
parameter c. If no placement can be found without violating the
upper bound C, the simple bin packing algorithm is used to
calculate a placement.
3.4
        </p>
      </sec>
    </sec>
    <sec id="sec-12">
      <title>Evaluation</title>
      <p>We have performed a preliminary simulation-based
evaluation of the proposed approaches. We used a query generator
to generate queries based on six query templates that di er in
structure and operator parameters. Operators were deployed
on simulated hosts with a CPU capacity of loadcap = 1. We
assume a system comprising 100 hosts. Moreover, operators
were replicated at most once. To guarantee statistical
correctness, 1000 runs were conducted for each experiment and
values have been averaged.</p>
      <p>Figure 4 depicts the percentage of remaining running
queries after a time period of one day assuming di erent
host failure probabilities p = f0:0025; 0:005; 0:01; 0:02; 0:03g
and di erent heuristics for rating the importance of
operators. Because a constant system load load(O) = 100 was
generated, the stated percentages of resources available for
replication are equal to the actual remaining load loadrem
in the system. Leveraging either the low utilization
heuristic or the query out degree heuristic to select operators for
replication improves the percentage of remaining running
queries by approximately 1.7 percentage points compared to
a random operator selection assuming a host failure
probability of p = 0:02 and loadrem = 50. Using a combination
of both heuristics improves the query availability further by
0.4 percentage points, resulting in 99.2 % remaining running
queries.</p>
      <p>Figure 5 shows the availability increase as a function of
available resources for replication. A combination of query
out degree and low utilization heuristic results in 99.2 %
remaining running queries, if a host failure probability of
p = 0:02 and loadrem = 50 is assumed. Moreover, the
achievable percentage of running queries is only diminished
)100 ● ● ●
%
(
ise98
r
e
u96
Q
g
in94
n
n
u
R92
100%
90%
50%
10%
1%
● 0%
●
●
●
3.0
0.0 0.5 1.0 2.0</p>
      <p>Host Crash Probability (%)
by approximately one percentage point compared to full
replication, if 50 % less spare resources are used for replication
and the host failure probability is p = 0:03. This result can
be explained by the fact that with loadrem = 50 available for
replication still 80 % of the query operators are replicated.
Moreover, those operators are reused to a large extent or
have small cost.</p>
    </sec>
    <sec id="sec-13">
      <title>REPLICATION OPTIMIZER</title>
      <p>Service level agreements are important in scenarios where
a certain availability is required. However, achieving a higher
availability by replicating more operators requires more
resources. Therefore, the solicited availability and the resulting
resource consumption should be traded o . Replication of
operators in a system can be optimized with respect to two
di erent optimization goals:
1. For a given resource limit costmax, the availability of
queries A(Q) can be maximized.
2. For a given availability of queries A(Q), the resource
consumption cost(Q) can be minimized.</p>
      <p>The achieved availability of queries is in uenced by the set
of operators selected for replication, the number of replicas
that is created for each of the selected operators, as well
as the placement of replicas on hosts. All those in uential
parameters are re ected in the placement plc and, thus, the
placement can serve as predictor for the achievable availability.
To optimize the replication decisions according to the two
speci ed optimization goals, additional models have to be
incorporated. To estimate the costs for a placement, the load
model for query operators can be leveraged. Moreover, an
availability model is required that enables the estimation of
the query availability resulting from a certain placement.</p>
      <p>Assuming the availability of those models, the optimization
problems can be formulated as follows:
maxfA(plc) j plc 2 P; cost(plc)
costmaxg
and
minfcost(plc) j plc 2 P; A(plc)
A(Q)g
where P is the set of all possible placements resulting from
di erent operator selections, di erent replication levels, as
well as di erent placement strategies.</p>
      <p>
        Those optimization problems can be solved using
wellknown optimization algorithms like genetic search [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
However, to lower the e ort for the optimization, heuristics to
restrict the search space have to be developed.
5.
      </p>
    </sec>
    <sec id="sec-14">
      <title>DYNAMIC REPLICATION</title>
      <p>Elastic data stream processing systems are able to cope
with varying query as well as event load. Mechanisms to
dynamically allocate and release hosts depending on the actual
demand prevent costly overprovisioning and performance
barriers due to underprovisioning. Ideally the system can
scale out inde nitely to serve high event rates and scale in
to lower the used resources in case of low utilization.</p>
      <p>Processing queries in an elastic environment poses various
challenges. Once new queries are submitted to the system,
the encompassed operators have to be distributed to the
running hosts. Because of operator reuse the load of already
deployed operators changes. To not impair the performance
of the system two reactive actions are taken: (i) overloaded
hosts might be relieved by automatically migrating operators
from one host to another, (ii) overload situations that cannot
be resolved by moving operators from one host to another
are resolved by splitting the operator into several operator
instances that handle only a portion of the overall load and
can be deployed independently.</p>
      <p>However, handling replicas in a dynamic system is
demanding:</p>
      <p>The complexity of the recon guration caused by the
exoneration of overloaded hosts is increased since
additional communication channels for replicas have to be
maintained.</p>
      <p>If operators are split into several instances, all replicas
have to be split too in order to maintain a consistent
system state.</p>
      <p>Systems that are used in conjunction with heuristic
replication (see Section 3), have to decide in case of
spare resources whether to release hosts or to create
additional replicas.</p>
      <p>Recon guration routines have to ensure that the new
placement does not violate existing service level
constraints for the queries (see Section 4).
6.</p>
    </sec>
    <sec id="sec-15">
      <title>RELATED WORK</title>
      <p>
        Fault tolerance techniques for data stream processing
systems like active replication [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], check pointing [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], and a
combination of active and passive replication [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ], are key
enablers for our proposed approaches.
      </p>
      <p>
        Moreover, operator placement algorithms are leveraged,
which have been studies extensively by various authors. A
survey is available in [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. Repantis et al. [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] presented
a procedure for replica placement considering performance
constraints like end-to-end latency. The ZEN system [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]
models di erent levels of availability in a systems and tries
to assign most important operators to hosts with the highest
availability. Another replication scheme based on graph
coloring is presented in [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ].
      </p>
      <p>
        Optimization in the area of data stream processing systems
is done for example to achieve an optimal overall
utilization [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ], or optimal utilization with limited resources [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
      </p>
      <p>
        An approach related to that in this paper has been studied
by Fernandez et al. in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. The authors present an integrated
approach to scale out streaming systems while achieving fault
tolerance via check pointing. In this paper we focus, however,
on active replication to ensure minimal latency and envision
also scale in.
      </p>
    </sec>
    <sec id="sec-16">
      <title>7. SUMMARY</title>
      <p>As of today, many data stream processing systems use
replication to ensure high availability in case of host failures.
However, to replicate a system completely, at least twice the
resources have to be allocated, which is costly.</p>
      <p>We proposed a heuristic replication approach enabling the
use of remaining system resources to increase the
availability of queries. An operator selection algorithm is used to
determine a subset of operators for replication that are then
placed via an operator placement algorithm. Moreover, we
suggested a replication optimizer which allows users to guide
the replication while trading o cost and availability. Finally,
the challenges arising from a combination of these techniques
with elastic data stream processing systems were discussed.
Using heuristic replication as well as the replication
optimizer with a system reacting on changes, e. g. in event rate
and selectivities, demands the adaptation of the placement
routines. However, the normalized importance functions as
well as the optimization routines might be reused unchanged.</p>
      <p>To validate the approaches we simulated a heuristic
replication approach comprising operator selection as well as
operator placement strategies. Given a set of remaining
resources, the fault tolerance of complex event processing
systems is improved. Choosing a proper heuristic can
improve the availability two percentage points compared to a
random operator selection. Compared to full replication only
one percentage point is lost spending 50 % less resources for
replication.</p>
      <p>In the future, we plan to implement the proposed
approaches with a state-of-the-art streaming system.</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>Y.</given-names>
            <surname>Ahmad</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Balazinska</surname>
          </string-name>
          ,
          <string-name>
            <given-names>U.</given-names>
            <surname>Cetintemel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Cherniack</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.-H.</given-names>
            <surname>Hwang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Lindner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Maskey</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Rasin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Ryvkina</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Tatbul</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Xing</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S. B.</given-names>
            <surname>Zdonik</surname>
          </string-name>
          .
          <article-title>The design of the Borealis stream processing engine</article-title>
          .
          <source>In CIDR</source>
          , pages
          <volume>277</volume>
          {
          <fpage>289</fpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>M.</given-names>
            <surname>Balazinska</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Balakrishnan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Madden</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Stonebraker</surname>
          </string-name>
          .
          <article-title>Fault-tolerance in the borealis distributed stream processing system</article-title>
          .
          <source>ACM Trans. Database Syst</source>
          .,
          <volume>33</volume>
          (
          <issue>1</issue>
          ),
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>N.</given-names>
            <surname>Bansal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Bhagwan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Jain</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Park</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Turaga</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Venkatramani</surname>
          </string-name>
          .
          <article-title>Towards optimal resource allocation in partial-fault tolerant applications</article-title>
          .
          <source>In INFOCOM</source>
          , pages
          <volume>1319</volume>
          {
          <fpage>1327</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>E. G.</surname>
          </string-name>
          <article-title>Co man</article-title>
          , Jr.,
          <string-name>
            <given-names>M. R.</given-names>
            <surname>Garey</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Johnson</surname>
          </string-name>
          .
          <article-title>Approximation algorithms for np-hard problems. chapter Approximation algorithms for bin packing: a survey</article-title>
          , pages
          <volume>46</volume>
          {
          <fpage>93</fpage>
          . PWS Publishing Co., Boston, MA, USA,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>M.</given-names>
            <surname>Dawande</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Kalagnanam</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Sethuraman</surname>
          </string-name>
          .
          <article-title>Variable sized bin packing with color constraints</article-title>
          .
          <source>Electronic Notes in Discrete Mathematics</source>
          ,
          <volume>7</volume>
          :
          <fpage>154</fpage>
          {
          <fpage>157</fpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>J.</given-names>
            <surname>Dean</surname>
          </string-name>
          .
          <source>Handling Large Datasets at Google: Current Systems and Future Directions. In Data-Intensive Computing Symposium</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>R. C.</given-names>
            <surname>Fernandez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Migliavacca</surname>
          </string-name>
          , E. Kalyvianaki, and
          <string-name>
            <given-names>P.</given-names>
            <surname>Pietzuch</surname>
          </string-name>
          .
          <article-title>Integrating scale out and fault tolerance in stream processing using operator state management</article-title>
          .
          <source>In ACM International Conference on Management of Data (SIGMOD)</source>
          , New York, NY, 06/
          <year>2013</year>
          2013. ACM, ACM.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>C.</given-names>
            <surname>Fetzer</surname>
          </string-name>
          ,
          <string-name>
            <surname>U.</surname>
          </string-name>
          <article-title>Schi el, and M. Su kraut. An-encoding compiler: Building safety-critical systems with commodity hardware</article-title>
          .
          <source>In SAFECOMP</source>
          , pages
          <volume>283</volume>
          {
          <fpage>296</fpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>B.</given-names>
            <surname>Gedik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Andrade</surname>
          </string-name>
          ,
          <string-name>
            <surname>K.-L. Wu</surname>
            ,
            <given-names>P. S.</given-names>
          </string-name>
          <string-name>
            <surname>Yu</surname>
            , and
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Doo</surname>
          </string-name>
          .
          <article-title>SPADE: the system s declarative stream processing engine</article-title>
          .
          <source>In SIGMOD Conference</source>
          , pages
          <volume>1123</volume>
          {
          <fpage>1134</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>D. E. Goldberg. Genetic</given-names>
            <surname>Algorithms</surname>
          </string-name>
          .
          <source>Pearson Education</source>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>J.-H. Hwang</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Xing</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          <string-name>
            <surname>Cetintemel</surname>
            , and
            <given-names>S. B.</given-names>
          </string-name>
          <string-name>
            <surname>Zdonik</surname>
          </string-name>
          . A Cooperative,
          <article-title>Self-Con guring High-Availability Solution for Stream Processing</article-title>
          .
          <source>In ICDE</source>
          , pages
          <volume>176</volume>
          {
          <fpage>185</fpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>C.</given-names>
            <surname>Jin</surname>
          </string-name>
          and J. G. Carbonell.
          <article-title>Predicate Indexing for Incremental Multi-Query Optimization</article-title>
          .
          <source>In ISMIS</source>
          , pages
          <volume>339</volume>
          {
          <fpage>350</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>E.</given-names>
            <surname>Kalyvianaki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Wiesemann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q. H.</given-names>
            <surname>Vu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Kuhn</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Pietzuch</surname>
          </string-name>
          . Sqpr:
          <article-title>Stream query planning with reuse</article-title>
          .
          <source>In ICDE</source>
          , pages
          <volume>840</volume>
          {
          <fpage>851</fpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Kwon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Balazinska</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A. G.</given-names>
            <surname>Greenberg</surname>
          </string-name>
          .
          <article-title>Fault-tolerant stream processing using a distributed, replicated le system</article-title>
          .
          <source>PVLDB</source>
          ,
          <volume>1</volume>
          (
          <issue>1</issue>
          ):
          <volume>574</volume>
          {
          <fpage>585</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>G. T.</given-names>
            <surname>Lakshmanan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Li</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R. E.</given-names>
            <surname>Strom</surname>
          </string-name>
          .
          <article-title>Placement strategies for internet-scale data stream systems</article-title>
          .
          <source>IEEE Internet Computing</source>
          ,
          <volume>12</volume>
          (
          <issue>6</issue>
          ):
          <volume>50</volume>
          {
          <fpage>60</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>S.</given-names>
            <surname>Martello</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>Toth</surname>
          </string-name>
          .
          <article-title>Knapsack problems: algorithms and computer implementations</article-title>
          .
          <source>Wiley-Interscience series in discrete mathematics and optimization. J</source>
          . Wiley &amp; Sons,
          <year>1990</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>L.</given-names>
            <surname>Neumeyer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Robbins</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Nair</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <surname>A. Kesari.</surname>
          </string-name>
          <article-title>S4: Distributed Stream Computing Platform</article-title>
          .
          <source>In ICDM Workshops</source>
          , pages
          <volume>170</volume>
          {
          <fpage>177</fpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>T.</given-names>
            <surname>Repantis</surname>
          </string-name>
          and
          <string-name>
            <given-names>V.</given-names>
            <surname>Kalogeraki</surname>
          </string-name>
          .
          <article-title>Replica placement for high availability in distributed stream processing systems</article-title>
          .
          <source>In DEBS</source>
          , pages
          <volume>181</volume>
          {
          <fpage>192</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>S.</given-names>
            <surname>Viglas</surname>
          </string-name>
          and
          <string-name>
            <given-names>J. F.</given-names>
            <surname>Naughton</surname>
          </string-name>
          .
          <article-title>Rate-based query optimization for streaming information sources</article-title>
          .
          <source>In SIGMOD Conference</source>
          , pages
          <volume>37</volume>
          {
          <fpage>48</fpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>K. V.</given-names>
            <surname>Vishwanath</surname>
          </string-name>
          and
          <string-name>
            <given-names>N.</given-names>
            <surname>Nagappan</surname>
          </string-name>
          .
          <article-title>Characterizing cloud computing hardware reliability</article-title>
          .
          <source>In SoCC</source>
          , pages
          <volume>193</volume>
          {
          <fpage>204</fpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>J. L.</given-names>
            <surname>Wolf</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Bansal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Hildrum</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Parekh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Rajan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Wagle</surname>
          </string-name>
          ,
          <string-name>
            <surname>K.-L. Wu</surname>
            , and
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Fleischer</surname>
          </string-name>
          . Soda:
          <article-title>An optimizing scheduler for large-scale stream-based distributed computer systems</article-title>
          . In Middleware, pages
          <volume>306</volume>
          {
          <fpage>325</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>F.</given-names>
            <surname>Xiao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Kitasuka</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Aritsugi</surname>
          </string-name>
          .
          <article-title>Economical and fault-tolerant load balancing in distributed stream processing systems</article-title>
          .
          <source>IEICE Transactions</source>
          , 95-D(4):
          <volume>1062</volume>
          {
          <fpage>1073</fpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Xing</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.-H.</given-names>
            <surname>Hwang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>U.</given-names>
            <surname>Cetintemel</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S. B.</given-names>
            <surname>Zdonik</surname>
          </string-name>
          .
          <article-title>Providing resiliency to load variations in distributed stream processing</article-title>
          .
          <source>In VLDB</source>
          , pages
          <volume>775</volume>
          {
          <fpage>786</fpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Gu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Ye</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Kim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Lei</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Z.</given-names>
            <surname>Liu</surname>
          </string-name>
          .
          <article-title>A hybrid approach to high availability in stream processing systems</article-title>
          .
          <source>In ICDCS</source>
          , pages
          <volume>138</volume>
          {
          <fpage>148</fpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>