25.01.2015 Views

Cost-Based Optimization of Integration Flows - Datenbanken ...

Cost-Based Optimization of Integration Flows - Datenbanken ...

Cost-Based Optimization of Integration Flows - Datenbanken ...

SHOW MORE
SHOW LESS
  • 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.3 Periodical Re-<strong>Optimization</strong><br />

riodical re-optimization, we cannot guarantee to find the globally optimal plan. However,<br />

<strong>of</strong>ten good plans are produced by these heuristics. Essentially, we discuss the<br />

criticalPath<strong>Optimization</strong> algorithm (A-CPO) as well as the heuristicPatternMatching<strong>Optimization</strong><br />

algorithm (A-HPMO), which are both based on our standard A-PMO.<br />

Critical Path <strong>Optimization</strong><br />

The application <strong>of</strong> our first heuristic, critical path optimization, promises optimization<br />

time reduction but does not change the asymptotic worst-case time complexity <strong>of</strong> the<br />

optimization algorithm. The critical path cp(P ) <strong>of</strong> the plan is determined in the form <strong>of</strong><br />

operator execution times [LZ05]. We then apply the A-PMO only for this critical path and<br />

thus we might reduce the number <strong>of</strong> operators evaluated by the optimization algorithm<br />

from m to m ′ , where m ′ denotes the number <strong>of</strong> operators included in the critical path<br />

with m ′ = |o i ∈ cp(P )| and m ′ ≤ m.<br />

The intuition <strong>of</strong> this heuristic is that the execution time <strong>of</strong> a plan instance does not<br />

depend on parallel subflows, which execution time is subsumed by more time-consuming<br />

subflows. As a result, we only benefit from this heuristic if the plan includes a Fork<br />

operator. This heuristic exploits the control-flow semantics <strong>of</strong> our flow meta model. In<br />

the following, we illustrate the concept <strong>of</strong> critical path optimization with an example.<br />

Example 3.5 (Critical Path <strong>Optimization</strong>). Recall the plan P 3 ′ from Example 3.2. Clearly,<br />

the critical path <strong>of</strong> a plan can only be different to this plan if and only if parallel subflows<br />

(Fork operator) exist. Then, we determine the most time-consuming subflow <strong>of</strong> each Fork<br />

operator as part <strong>of</strong> the critical path, while all other subflows are subsumed and hence,<br />

are marked as not to be optimized. Figure 3.8 illustrates the determined critical path <strong>of</strong><br />

the running example P 3 , where (o 3 ) is subsumed by (o 2 , o 5 ). Hence, we have reduced the<br />

number <strong>of</strong> operators that are included in the optimization.<br />

Assign (o1)<br />

[out: msg1]<br />

[5ms]<br />

Assign (o1)<br />

[out: msg1]<br />

[5ms]<br />

Fork (o-1)<br />

Fork (o-1)<br />

[60ms]<br />

Invoke (o2)<br />

[service s4, in: msg1, out: msg2]<br />

[35ms]<br />

Groupby (o5)<br />

[in: msg2, out: msg4]<br />

[26ms]<br />

Invoke (o3)<br />

[service s5, in: msg1, out: msg3]<br />

[60ms]<br />

Invoke (o2)<br />

[service s4, in: msg1, out: msg2]<br />

[35ms]<br />

Groupby (o5)<br />

[in: msg2, out: msg4]<br />

Join (o4)<br />

[in: msg4,msg3, out: msg5]<br />

[10.01ms]<br />

Join (o4)<br />

[in: msg4,msg3, out: msg5]<br />

[10.01ms]<br />

Assign (o6)<br />

[in: msg5, out: msg1]<br />

[5ms]<br />

Assign (o6)<br />

[in: msg5, out: msg1]<br />

[5ms]<br />

Invoke (o7)<br />

[service s5, in: msg1]<br />

[40ms]<br />

Invoke (o7)<br />

[service s5, in: msg1]<br />

[40ms]<br />

(a) Plan P ′ 3<br />

(b) Plan cp(P ′ 3)<br />

Figure 3.8: Example Critical Path <strong>Optimization</strong><br />

This algorithm is a heuristic because we cannot guarantee to find the globally optimal<br />

plan for two reasons. First, the critical path might change during the optimization. As<br />

a consequence <strong>of</strong> not considering certain operators <strong>of</strong> the new critical path, we might get<br />

suboptimal plans. Second, we do not consider data-flow-oriented operators not included<br />

51

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!