(redo). As there are no transaction mechanisms
available in current event processing systems, the
logic for this must be implemented individually.
• Identifying gaps with sequence numbers: every
event gets a sequence number while it is gener-
ated in the event producer. This allows the event
processing agent to recognize if there is a gap in
the event stream. This method works only for one
event producer and not in a distributed system.
To enable the detection of out-of-order events in a
distributed system, it is necessary to introduce clocks
and assign timestamps to events. Handling time and
therefore clocks in a distributed system introduces
a couple of problems. It is necessary to guarantee
that all event producers use the same time. Solutions
therefore could be to synchronize the clocks (e.g.
by using the Network Time Protocol (NTP) (Mills,
2010)) of the event producers or, that all event pro-
ducers use the same clock (e.g. using the GPS time
or a time server). NTP synchronizes the clocks in a
predefined interval, but clocks may drift on their own,
and the synchronization process has some inaccura-
cies too. The second approach is not always avail-
able, has some latency and might create varying time
stamps. In general, it depends on the purpose and the
temporal granularity at which events are produced, to
be able to decide if one of the above mentioned meth-
ods is feasible. (cf. (Etzion and Niblett, 2011, pp.
291 - 295), (Della Valle et al., 2013), (Neville-Neil,
2015)).
To illustrate the importance of temporally correct
event streams, we have the following scenario from
the domain of connected cars in mind. Suppose there
is a multi-lane road with two cars each driving side
by side in the same direction. The cars scan the road
in front of them and report important observations to
the cars behind them over a wireless ad hoc network.
The right lane car at the head of the convoy detects
a person on the road 200 meters in front of it. At a
speed of 80 km/h this will not require any immediate
action, but this occurrence should be reported to the
other cars by alerting them: Event 1 (car 1, right lane,
person on the lane, 200m). The leading car on the left
lane receives this event and reports that its lane is free
for the next 300 meters: Event 2 (car 2, left lane, lane
is clear, 300m). The person moves on, causing the
cars to report following events: Event 3 (car 1, right
lane, person on the lane, 175m), and another report
by the car on the left lane: Event 4 (car 2, left lane,
lane is clear, 300m). The person reaches the left lane:
Event 5 (car 2, left lane, person on the lane, 150m).
Now, the right lane is free: Event 6 (car 1, right lane,
lane is clear, 300m).
The vehicles following car 1 and car 2 must ensure
to process those events timely and in the correct tem-
poral order to react fast and adequately. If the events
are in correct temporal order, they can infer following
information: The right lane is clear for the next 300
meters, while on the left lane there is a person in a
distance of 150 meters, and there is a person moving
from right to left. This example illustrates a use case
where the order of events is of significant importance
and where a minimum delay is required for further ac-
tions. This use case also has multiple event producers
which work independently of each other.
In this work we want to find answers to follow-
ing questions: Is there a dynamic buffering method
which is preferred over a static buffer? Is a dynamic
buffering method applicable in an Internet of Things
application? The expectations for an ideal buffer are
high. The buffer should be as small as possible and as
large as necessary so that all incoming events can be
fully re-ordered. The buffer should adapt itself to en-
vironmental changes, such as varying network delays
or other influences. Subsequently, we discuss the im-
plementation of four different out-of-order compensa-
tion algorithms, which use different kinds of dynamic
time-out buffering techniques and compare those to
an algorithm using a static buffering method. This is
a generally applicable and easy to integrate approach
for existing distributed applications. For the evalu-
ation, specific datasets were recorded which are in-
troduced in this paper, and which are freely available
under a Creative Commons license.
The next section gives an overview of existing and
related work in the field of out-of-order event pro-
cessing and compensation. The content of the dataset
for evaluating out-of-order event compensation algo-
rithms is discussed in Section 3. Section 4 describes
the out-of-order compensation algorithms. The re-
sults of the evaluation are discussed in detail in Sec-
tion 5 and, finally, Section 6 concludes this work.
2 RELATED WORK
The authors in (Mutschler and Philippsen, 2013a)
present a system for reliable, low-latency, and dis-
tributed out-of-order event processing for use cases
with high data rates of events. They use a K-slack
buffer approach where the buffer length (K) is contin-
uously recalculated and adjusted. Events are delayed
for K time units at most, and within this timeframe
events can be reordered. The result is a correctly or-
dered event stream with minimal delay. This system
does not use a local or global clock but instead de-
rives the current time by incoming events. This ap-
proach has given us a basis to design some of our al-
A Dataset and a Comparison of Out-of-Order Event Compensation Algorithms
37