Cost-Based Optimization of Integration Flows - Datenbanken ...
Cost-Based Optimization of Integration Flows - Datenbanken ...
Cost-Based Optimization of Integration Flows - Datenbanken ...
- No tags were found...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
5.2 Horizontal Queue Partitioning<br />
5.2 Horizontal Queue Partitioning<br />
In order to enable plan execution <strong>of</strong> message partitions, several preconditions are required.<br />
First, we describe the tailor-made message queue data structure partition tree. It enables<br />
horizontal partitioning according to multiple attributes because a single plan might include<br />
several predicates, where we can benefit from partitioning. Second, we explain changes <strong>of</strong><br />
the deployment process, which include (1) the derivation <strong>of</strong> partitioning attributes from<br />
a given plan, (2) the derivation <strong>of</strong> the optimal partitioning scheme in case <strong>of</strong> multiple<br />
attributes, and (3) the rewriting <strong>of</strong> plans according to the chosen partitioning scheme.<br />
5.2.1 Maintaining Partition Trees<br />
As the foundation for multi-flow optimization, we introduce the partition tree as a partitioned<br />
message queue data structure. Essentially, this tree is a simplified multi-dimensional<br />
B * -Tree (MDB-Tree) [SO82] with specific extensions, where the messages are horizontally<br />
(value-based) partitioned. Similar to a traditional MDB-Tree, each tree level represents a<br />
different partitioning attribute. The major difference to a traditional MDB-Tree is that<br />
the partitions are sorted according to their timestamps <strong>of</strong> creation rather than according<br />
to the key values <strong>of</strong> index attributes. This is reasoned by queuing semantics that imply a<br />
temporal order. Thus, at each tree level, a list <strong>of</strong> partitions, unsorted with regard to the<br />
attribute values, is stored. Formally, the partition tree is defined as follows:<br />
Definition 5.1 (Partition Tree). The partition tree is an index for multi-dimensional<br />
attributes. It contains h levels, where each level represents a partition attribute ba i ∈<br />
{ba 1 , ba 2 , . . . , ba h }. For each attribute ba i , a list <strong>of</strong> batches (partitions) b are maintained.<br />
Those partitions are ordered according to their timestamps <strong>of</strong> creation t c (b i ) with t c (b i−1 ) ≤<br />
t c (b i ) ≤ t c (b i+1 ). Only the last index level ba h contains the queued messages. A partition<br />
attribute has a type with type(ba i ) ∈ {value, value-list, range}.<br />
Such a partition tree is used as our message queue representation. Similar to usual<br />
message queues, it decouples the inbound adapters from the process engine in order to<br />
enable receiving incoming messages even in the case <strong>of</strong> overload situations. For example,<br />
such situations might be caused by (1) workload peaks, or (2) temporarily unavailable<br />
target systems. Additionally, the partition tree realizes the horizontal queue partitioning.<br />
We use an example in order to explain the structure <strong>of</strong> this partition tree more clearly.<br />
Example 5.4 (Partition Tree). Assume two partitioning attributes ba 1 (customer, value)<br />
and ba 2 (total price, range) that have been derived from a plan P . Figure 5.6 shows this<br />
Inbound<br />
Adapters<br />
enqueue()<br />
Partitioned Queue<br />
dequeue()<br />
Process<br />
Engine<br />
ba1<br />
(Customer)<br />
ba2<br />
(Totalprice )<br />
partition b5 [“CustB“] partition b2 [“CustC“] partition b1 [“CustA“]<br />
tc(b5)<br />
partition b5.2<br />
[“<br />
partition b5.1<br />
[“[10,200)“]<br />
msg5 [„CustB“]<br />
msg9 [„CustB“]<br />
><br />
tc(b2)<br />
partition b1.3<br />
[“[10,200)“]<br />
msg4 [„CustA“]<br />
msg8 [„CustA“]<br />
msg10 [„CustA“]<br />
tc(b1)<br />
partition b1.2<br />
[“>200“]<br />
msg3 [„CustA“]<br />
msg7 [„CustA“]<br />
partition b1.1<br />
[“<br />
><br />
><br />
node message partition<br />
leaf message partition<br />
atomic message<br />
135