Appendix - A In Appendix-A how the proposed methodology works

advertisement
Appendix - A
In Appendix-A how the proposed methodology works is illustrated with an example.
To illustrate the working of Constraint Decomposition and Service Selection phases of the proposed approach,
consider the combinational workflow given in the following Fig. A-1.
Fig. A-1 Sample workflow taken for illustrating the proposed methodology
Constraint Decomposition Phase
Conversion
The given workflow consists of one AND unit with three sequential paths, one OR unit with two sequential paths,
one Loop consisting of single task with three iterations and one individual task. The example is illustrated with a
QoS attribute, response time. The details of the workflow are given in Table A-1.
Table A-1 Details of tasks present in the workflow
Task
ID
ut (ti )
u(ti )
sp(ti )
min_ rt (ti )
max_ rt (ti )
1
2
3
4
5
6
7
8
9
10
1
1
1
1
1
1
1
1
3
2
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2
3
3
3
0
1
10
10
20
20
10
10
20
40
10
60
200
300
400
100
500
300
400
500
100
400
it (ti )
0
0
0
0
0
0
0
0
3
0
lcrt (ti )
ucrt (ti )
11
2
1
12
2
1
13
2
1
14
2
1
15
4
0
Conversion of AND unit
1
2
2
2
0
70
40
50
60
10
700
700
600
800
100
0
0
0
0
0
Let u1 denote the AND pattern. Let P1 , P2 and P3 denote the sequential paths present in u1 . The values of
minimum response time and maximum response time of each path of AND unit are computed using equations (5)
and (6)
min_ rt ( P1 )  40
min_ rt ( P2 )  30
min_ rt ( P3 )  70
max_ rt ( P1 )  900
max_ rt ( P2 )  600
max_ rt ( P3 )  1200
Now the minimum response time and maximum response time of u1 , denoted by min_ rt (u1 ) and max_ rt (u1 ) are
computed using equations (8) and (9) as
min_ rt (u1 )  70
max_ rt (u1 )  1200
Now u1 is replaced with a new task t11 with minimum response time and maximum response time as 70 and 1200
respectively.
Conversion of Loop
Let Loop in Fig be denoted by u 2 . The Loop contains only one task, t9 . The number of iterations that the Loop
takes is 3 (i.e. m  3 ). The minimum response time and maximum response time of u 2 denoted by min_ rt (u2 ) and
max_ rt (u2 ) are computed using equations (9) and (10) as
min_ rt (u2 )  30
max_ rt (u2 )  300
Conversion of OR unit
Let u 3 denote the OR pattern in Fig. The pattern contains two sequential paths, denoted by P4 and P5 . Let
min_ rt ( P4 ) and max_ rt ( P4 ) denote the minimum response time and maximum response time of P4
. Let
min_ rt ( P5 ) and max_ rt ( P5 ) denote the minimum response time and maximum response time of P5 .The values of
min_ rt ( P4 ) , min_ rt ( P5 ) , max_ rt ( P4 ) and max_ rt ( P5 ) are computed using equations (5) and (6) as
min_ rt ( P4 )  130
min_ rt ( P5 )  150
max_ rt ( P4 )  1100
max_ rt ( P5 )  2100
Now the minimum response time and maximum response time of u 3 denoted by min_ rt (u3 ) and max_ rt (u3 ) are
computed using equations (7) and (8) as
min_ rt (u3 )  150
max_ rt (u3 )  2100
Now u 3 is replaced with a new task t31 with minimum response time and maximum response time as 150 and 2100
respectively.
Conversion of given workflow in sequential workflow
The sequential workflow equivalent to the given workflow, denoted by W 1 is constructed using the new-tasks and
sequential tasks present in the original workflow (in this example, t15 ) as given in Fig. A-2.
t11
t 21
t31
t15
Fig. A-2 Converted sequential workflow
Now the minimum response time and maximum response time of new-tasks and old-tasks are given in Table A-2.
Table A-2 Minimum response time and maximum response time of old- tasks and new-tasks
task
Minimum response time
Maximum response time
t11
70
1200
t 21
30
300
t31
150
2100
t15
10
100
For discussion, consider a typical value for global response time, grt . Let grt  1600
Decomposability Check
The minimum response time of converted workflow, min_ rt (W 1 ) and maximum response time of W 1 , max_ rt (W 1 )
are computed using equations, (11) and (12) as
min_ rt (W 1 )  260
max_ rt (W 1 )  3700
Now the given constraint satisfies the minimum response time of the converted workflow and hence the workflow is
found as a feasible workflow. Next, the given constraint is decomposed to local constraints of the new-tasks and
old-tasks present in the workflow.
Assignment of constraint to old task
Let lcrt (t15 ) denote the lower bound constraint of response time of old task, t15 . The value of lcrt (t15 ) is computed
using equation (13) as
lcrt (t15 )  10
Let ucrt (t15 ) denote the lower bound constraint of response time of old task, t15 . The value of ucrt (t15 ) is computed
using equation (16) as
ucrt (t15 )  (100 / 3700) 1600
ucrt (t15 )  43.24
The constraint values are rounded to floor value as
ucrt (t15 )  43
Assignment of constraints to new-tasks
Let lcrt (t11 ) , lcrt (t21 ) and lcrt (t31 ) denote the lower bound constraint of response time of t11 , t 21 and t31 respectively.
Let ucrt (t11 ) , ucrt (t 21 ) and ucrt (t31 ) denote the lower bound constraint of response time of t11 , t 21 and t31 respectively.
The values of lcrt (t11 ) , lcrt (t21 ) , lcrt (t31 ) , ucrt (t11 ) , ucrt (t 21 ) and ucrt (t31 ) are computed using equations (17) and (19)
lcrt (t11 )  70
lcrt (t21 )  30
lcrt (t31 )  150
ucrt (t11 )  (1200 / 3700)  1600
lcrt (t21 )  (300 / 3700)  1600
lcrt (t31 )  (2100 / 3700)  1600
ucrt (t11 )  518
ucrt (t21 )  129
ucrt (t31 )  908
Computation of constraints of AND, Loop and OR patterns corresponding to new-tasks
The AND pattern corresponding to t11 is u1 . Let lcrt (u1 ) denote the lower bound constraint of response time of u1 .
The value of lcrt (u1 ) , lcrt (u2 ) and lcrt (u3 ) are computed based on Error! Reference source not found. and using
Error! Reference source not found. as
lcrt (u1 )  70
lcrt (u2 )  30
lcrt (u3 )  150
Similarly, the upper bound constraint of response time of AND pattern, Loop pattern, and OR pattern, denoted by,
ucrt (u1 ) , ucrt (u2 ) and ucrt (u3 ) . The upper bound constraints are found out using
Error! Reference source not found. as
ucrt (u1 )  518
ucrt (u2 )  129
ucrt (u3 )  908
Now from the constraints of patterns, constraints of corresponding sequential paths and the tasks present in the
sequential paths are computed.
Consider the AND pattern, u1 . Let lcrt (ti ) denote the lower bound constraint of response time of an ith task. The
lower bound constraint of response time of tasks present in u1 are computed using equations (21) as given below.
lcrt (t1 )  min_ rt (t1 )  10
lcrt (t2 )  min_ rt (t2 )  10
lcrt (t3 )  min_ rt (t3 )  20
lcrt (t4 )  min_ rt (t4 )  20
lcrt (t5 )  min_ rt (t5 )  10
lcrt (t6 )  min_ rt (t6 )  10
lcrt (t7 )  min_ rt (t7 )  20
lcrt (t8 )  min_ rt (t8 )  40
Let ucrt (ti ) denote the upper bound constraint of response time of an ith task. The upper bound constraints of
response time of individual tasks of u1 are computed using equations (22) as given below.
ucrt (t1 )  max_ rt (t1 ) / max_ rt ( P1 )  ucrt (u1 )  200 / 900  518  115
ucrt (t2 )  max_ rt (t2 ) / max_ rt ( P1 )  ucrt (u1 )  300 / 900  518  172
ucrt (t3 )  max_ rt (t3 ) / max_ rt ( P1 )  ucrt (u1 )  400 / 900  518  230
ucrt (t4 )  max_ rt (t4 ) / max_ rt ( P2 )  ucrt (u1 )  100 / 600  518  86
ucrt (t5 )  max_ rt (t5 ) / max_ rt ( P2 )  ucrt (u1 )  500 / 600  518  431
ucrt (t6 )  max_ rt (t6 ) / max_ rt ( P3 )  ucrt (u1 )  300 / 1200  518  129
ucrt (t7 )  max_ rt (t7 ) / max_ rt ( P3 )  ucrt (u1 )  400 / 1200  518  172
ucrt (t8 )  max_ rt (t8 ) / max_ rt ( P3 )  ucrt (u1 )  500 / 1200  518  215
Consider the Loop pattern u 2 . The Loop pattern contains only one task, t9 . Let lcrt (t9 ) and ucrt (t9 )
denote the
lower bound constraint of response time and upper bound constraint of response time of t9 . The value of lcrt (t9 )
and ucrt (t9 ) are computed using equations (23) and (24) as
lcrt (t9 )  min_ rt (t9 )  10
ucrt (t9 )  max_ rt (t9 ) / max_ rt ( P1 )  ucrt (u2 ) / m  (100 /100 129 / 3)  43
Consider the OR pattern, u 3 . The values of minimum response time and maximum response time of various tasks
present in u 3 are computed using equations (21) and (22) as follows.
lcrt (t10 )  min_ rt (t10 )  60
lcrt (t11 )  min_ rt (t11 )  70
lcrt (t12 )  min_ rt (t12 )  40
lcrt (t13 )  min_ rt (t13 )  50
lcrt (t14 )  min_ rt (t14 )  60
ucrt (t10 )  max_ rt (t10 ) / max_ rt ( P4 )  ucrt (u3 )  400 / 1100  908  330
ucrt (t11 )  max_ rt (t11 ) / max_ rt ( P4 )  ucrt (u3 )  700 / 1100  908  577
ucrt (t12 )  max_ rt (t12 ) / max_ rt ( P5 )  ucrt (u3 )  700 / 2100  908  302
ucrt (t13 )  max_ rt (t13 ) / max_ rt ( P5 )  ucrt (u1 )  600 / 2100  908  259
ucrt (t14 )  max_ rt (t14 ) / max_ rt ( P5 )  ucrt (u1 )  800 / 2100  908  345
The above example shows how the method decomposes global constraints into local constraints.
Service Selection Phase
To explain how the best available service is selected for a particular task, two QoS attributes, say, response time and
cost are considered. Let q1 denote the value response time of ith service of jth service class. Let q2 denote the value
of cost ith service of jth service class. Let us consider user’s QoS preferences as: 0.6(or 60%) preference to response
time and 0.4(or 40%) preference to cost.
From equation (25) the utility function of an ith service of jth service class is expressed as
U ( s ji ) 
Qmax ( j ,1)  q1
Qmax ( j ,2)  q2
 0.6 
 0.4
Qmax (1)  Qmin (1)
Qmax (2)  Qmin (2)
In the above expression Qmax ( j,1) and Qmax ( j,2) denote the maximum response time and maximum cost of jth service
class. Let Qmax (1) and Qmax (2) , denote the maximum response time and maximum cost of sequential equivalent of
the given workflow. Let Qmin (1) and Qmin (2) , denote the minimum response time and minimum cost of sequential
equivalent of the given workflow.
Let us consider some typical values for Qmax ( j,1) , Qmax ( j,2) , Qmin (1) , Qmin (2) , Qmax (1) and Qmax (2) . Let
Qmax ( j ,1)  100
Qmax ( j ,2)  200
Qmin (1)  300
Qmin (2)  400
Qmax (1)  500
Qmax (2)  800
Now U ( s ji ) is expressed as, U ( s ji ) 
100  q1
200  q2
 0.6 
 0.4 . Now the service which produces the maximum
500  300
800  400
value for U ( s ji ) is found out as the best service for jth service class. Let us assume that there are 4 services which
satisfy the local constraints of response time and cost. The values of response time and cost of these 4 services are
given in Table A-3. The utility values produced by these services are given in Table A-4.
Table A-3 Response time and cost of services which satisfy the constraints
Service
s1 j
Response time
70
Cost
120
s2 j
30
150
s3 j
50
100
s4 j
60
110
Table A-4 Utility of services which satisfy the constraints
Service
s1 j
Utility value
0.17
s2 j
0.26
s3 j
0.25
s4 j
0.21
As the service, s2 j gives the maximum value for utility, s2 j is chosen the best available service.
Download