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...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
3.4 <strong>Optimization</strong> Techniques<br />
Fork (o2)<br />
5ms<br />
10ms<br />
4ms<br />
Assign (o3)<br />
Assign (o6)<br />
Assign (o11)<br />
Fork (o2)<br />
130ms<br />
Invoke (o4)<br />
150ms<br />
Invoke (o7)<br />
220ms<br />
Invoke (o12)<br />
5ms<br />
Assign (o3)<br />
130ms<br />
Invoke (o4)<br />
10ms<br />
Assign (o6)<br />
150ms<br />
Invoke (o7)<br />
7ms<br />
Assign (o9)<br />
90ms<br />
Invoke (o10)<br />
4ms<br />
Assign (o11)<br />
220ms<br />
Invoke (o12)<br />
70ms<br />
Translation<br />
(o5)<br />
7ms<br />
Assign (o9)<br />
70ms<br />
Translation<br />
(o8)<br />
125ms<br />
Translation<br />
(o13)<br />
70ms<br />
Translation<br />
(o5)<br />
205ms<br />
70ms<br />
Translation<br />
(o8)<br />
230ms<br />
97ms<br />
125ms<br />
Translation<br />
(o13)<br />
349ms<br />
90ms<br />
Invoke (o10)<br />
302ms<br />
230ms<br />
349ms<br />
(a) Plan P 7<br />
(b) Optimized Plan P ′ 7<br />
Figure 3.14: Example Merging Parallel <strong>Flows</strong><br />
we iterate over all subflows in order to minimize the total number <strong>of</strong> subflows. There, for<br />
the first old subflow, we create a new subflow. Then, we check if the second old subflow<br />
fits into the first. Due to 205 ms + 230 ms > 349 ms, we create a second new subflow.<br />
Subsequently, we repeat this with the third old subflow and observe that we can merge it<br />
with the first new subflow. Finally, the fourth old subflow, obviously, cannot fit into an<br />
existing subflow and hence, we create a third new subflow. Figure 3.14(b) illustrates the<br />
result <strong>of</strong> this algorithm.<br />
As a result, this optimization technique reduces the number <strong>of</strong> required threads without<br />
sacrificing the estimated execution time <strong>of</strong> a Fork operator. Due to less synchronization<br />
and thread monitoring overhead, this results in execution time reductions. Note that this<br />
technique should be applied after WC2 and WC3 (rewriting sequences and iterations to<br />
parallel flows), but before WC1 (rescheduling parallel flows).<br />
Apart from these purely control-flow-oriented optimization techniques, there are several<br />
optimization techniques that can be classified as hybrid techniques because they combine<br />
data-flow- and control-flow-oriented aspects in order to achieve lower execution time. We<br />
will discuss them within the context <strong>of</strong> data-flow oriented optimization techniques.<br />
3.4.2 Data-Flow-Oriented Techniques<br />
The data-flow-oriented optimization techniques address the interaction-oriented operators<br />
and the data-flow-oriented operators <strong>of</strong> our flow meta model. This includes various<br />
techniques from traditional query processing, hybrid techniques combining data-flow and<br />
control-flow-oriented aspects, and techniques that are tailor-made for integration flows.<br />
Reordering and Merging <strong>of</strong> Switch Paths<br />
Programming language compilers and modern processors use only path probabilities for<br />
static and dynamic branch prediction in order to support speculative path computation.<br />
In contrast, expression evaluation within integration flows is typically more expensive due<br />
to the expression evaluation on messages (e.g., XPath expressions on XML messages).<br />
The techniques WD1: Reordering <strong>of</strong> Switch Paths and WD2: Merging <strong>of</strong> Switch Paths<br />
are applied to the Switch operator depending on the workload characteristics. For this<br />
65