exchanging data with high frequency on the same
NUMA node in order to take advantage of the local
memory.
We defined a migration protocol for the DSE:
State Transfer. To explain the migration protocol, we
will use the query depicted in Figure 12. In the figure
there is a query Q with three sub-queries named
SQ_A, SQ_B and SQ_C. SQ_A and SQ_C are
deployed with 2 instances each and SQ_B is deployed
using 3 instances. Each sub-query is deployed in its
own Instance Manager. C and R represent
respectively the client application sending tuples and
the receiver application waiting for the query results.
Moreover let us assume that we want migrate SQ_B
2
from IM4 to IM8.
The completion time for the State Transfer
protocol depends on the state size, that is, the number
of tuples kept in the window structures at the time the
reconfiguration is issued.
State Transfer Protocol:
1. The protocol starts deploying a new Instance of
SQ_B (SQ_B
2NEW
) in the Instance Manager IM8.
2. Then, the upstreaming sub-queries,SQ_A
1
and
SQ_A
2
are informed that the sub-query SQ_B
2
will
be moved from IM4 to IM8. As a result of this
action, the IMs running SQ_A
1
and SQ_A
2
flush
their output streamss, and turn in a reconfiguration
mode where they start buffering all new output
tuples with destination SQ_B
2
.
3. IM4 takes a snapshot of the state (if any) of SQ_B
2
and
transfers it to the new instance SQ_B
2NEW
running in IM8.
4. Once the state is transferred, SQ_A
1
and SQ_A
2
first send to SQ_B
2NEW
all the tuples stored in the
meanwhile in the buffers and then turn themselves
back in the normal operation mode.
6 FAULT-TOLERANCE
The simplest solution to provide high availability in a
datacentre is simply to deploy the DSE in another
appliance (backup) and resume the processing of
tuples in that appliance if the active one fails
(primary). A replication manager is needed for
detecting the failure of the primary appliance. The
replication manager also sends the queries to be
deployed to the backup. These queries are registered
in the backup during regular processing. When the
primary fails in a primary-backup scenario in a data
centre, the backup will redeploy all the queries and
resume the processing.
This solution is valid if some tuples can be lost
and this does not affect the application. However, if
no tuple should be missed then, either an active
replication approach is followed or some check
pointing mechanisms must be in place. In that case
some mechanisms are needed to store the tuples so
that they can be replayed in case of a failure. If tuples
are replayed, two semantics are possible: at least once
or exactly once. That is, tuples are processed exactly
once (there are no duplicates in case of failures) or
there can be duplicates (at least once). The exactly
once policy is more expensive as it needs to register
every outcome. The DSE currently implements at
least once semantics by implementing active
replication. That is, all events are sent to the two
appliances, and both of them process all events. The
sinks that receive the outcome of the data streaming
engine will receive output events from the two
appliances and filters them in order to avoid sending
duplicates to the client during regular processing.
When a failure happens, one of the appliances will
stop sending output events. At that point the sink will
receive events from one appliance and send these
results to the client. In this scenario there will be no
duplicate outcomes (exactly once guarantee).
7 PERFORMANCE EVALUATION
UPM-CEP performance has been measured using the
Intel HiBench benchmark (Intel, 2017). This
benchmark allows to evaluate different big data
frameworks and contains 19 different workloads that
are distributed in: micro, machine learning, sql,
graph, websearch and streaming. Specifically, we
focus on the streaming workloads: 1) Identity: This
workload reads input tuples and produces the same
tuples without any modification. A map operator is
defined with the same input and output fields. 2)
Repartition: Modifies the parallelism level and
distributes the load in a round robin fashion. It defines
a map operation that copies the input to the output.
Figure 12: Example query for the migration protocol.