App 2. QoS-Aware Middleware. Web Service A2. Web Service A1. Web Service An ..... tailed past RTT results, the service user only needs to store k + 2 counters ..... âDeclarative Composition and Peer-to-Peer Provisioning of. Dynamic Web ...
19th International Symposium on Software Reliability Engineering
A QoS-Aware Middleware for Fault Tolerant Web Services Zibin Zheng and Michael R. Lyu Department of Computer Science and Engineering The Chinese University of Hong Kong Hong Kong, China {zbzheng, lyu}@cse.cuhk.edu.hk
+ '
, (
- , + .
/01 2
' ,
3 % 4
"#$ $ /5 6 7 8 91 : ; < = "
>
5? = "
# @
Abstract Reliability is a key issue of the Service-Oriented Architecture (SOA) which is widely employed in critical domains such as e-commerce and e-government. Redundancy-based fault tolerance strategies are usually employed for building reliable SOA on top of unreliable remote Web services. Based on the idea of user-collaboration, this paper proposes a QoS-aware middleware for fault tolerant Web services. Based on this middleware, service-oriented applications can dynamically adjust their optimal fault tolerance strategy to achieve good service reliability as well as good overall performance. A dynamic fault tolerance replication strategy is designed and evaluated. Experiments are conducted to illustrate the advantage of the proposed middleware as well as the dynamic fault tolerance replication strategy. Comparison of the effectiveness of the proposed dynamic fault tolerance strategy and various traditional fault tolerance strategies are also provided.
1. Introduction
!
" # $ %$ "#$! &
&' ( ) *()! "#$
1071-9458/08 $25.00 © 2008 IEEE DOI 10.1109/ISSRE.2008.17
• 97
A QoS-aware middleware for achieving fault tol-
erance by employing user-participation and collaboration.
Application Logic QoS-Aware Middleware
Dynamic Selector
UDDI Registry
Autoupdater
App 2
Communicator
• A Dynamic fault tolerance strategy selection algo-
App n
Service Community Broker
Communication Bus
rithm.
Service Community A Web Service A1 Web Service A2 Web Service An
Service Community B Coordinator A
Web Service B1 Web Service B2
Coordinator B
Web Service Bm
Figure 1. Architecture of the Middleware
! " # $ % & ' ' (
7 =
! = 8 "
)
replica "
2. A QoS-Aware Middleware
) '
* *+
,-. 2.1. Service Communities
" !
/
0 1/02 ' 3 ,4 5.
6 7 8
! 9 7 7 "
,:; ::. //)2 1 2 $ ! / %$
98
! "
# $ % &'(
(
) * ( )( (
2.3. Types of Faults - ( . + •
! 0 #
• Logic-related faults. 1 0 . & )( . ( ( ( ( % ( ) .
0 * 0
2.4. Fault Tolerance Strategies . . ( #
. 2 . ( .
2 ( !
Retry 34 Recovery Block (RB) 3'4 #
&5%6 3 4 &758-% 34 * ( N-Version Programming (NVP) 3 4 Active 394 # :
&. 3"4( 3$4( .8 394 3;4 * (
%
! 3'8 ?
Dynamic selector:
* • Auto updater: ,
• Communicator: * !
&RRUGLQDWRU 8VHU
/ ! . & )( Communi-
cation Timeout, Service Unavailable (http 503), Bad Gateway (http 502), Server Error (http 500)( (
% &(
+ •
Network-related faults.
5HSOLFDOLVW2YHUDOOSHUIRUPDQFHLQIRUPDWLRQ ,QGLYLGXDO3HUIRUPDQFHLQIRUPDWLRQ 5HSOLFDOLVW2YHUDOOSHUIRUPDQFHLQIRUPDWLRQ
• ,QGLYLGXDO3HUIRUPDQFHLQIRUPDWLRQ 5HSOLFDOLVW2YHUDOOSHUIRUPDQFHLQIRUPDWLRQ
Retry: . @ f 8 t( m
( f1 .
( ti 8 ith f = f1m ;
Figure 2. User and Coordinator Interaction
t=
m i=1
99
ti (f1 )i−1
>?
•
RB: f=
m
fi ;
t=
i=1
•
m i=1
ti
i−1
fk
mi = 1$ Retry m1 = ∞ f=
v
F (i);
•
k=1
t = max({ti }vi=1 )
#
f=
u i=1
fi ; t =
min(Tc ) : |Tc | > 0 max(T ) : |Tc | = 0
i=1
j=1
.
k=1
F (i); t =
middle(v, Tc ) : |Tc | ≥ v max(T ) : |Tc | < v
0
3. Dynamic Fault Tolerance Strategy Selection Algorithm 3.1. User Requirement Model
1
$ 2
,- $ % & $ $ !
$ ) 3$ $
)
$ ! $ 4 5 tmax 4 ()) tmax ())$ ()) tmax fmax 4
'
) % & $ $ *$ + $ ! )
)
$ $ ,-
) -#' •
v i=v/2+1
Active: Active ! ! "'$ Tc ()) u
mi n i−1 (( ti fij−1 ) fkmi )
Dynamic Parallel Strategy: ) N V P Active ! u v v
$ v ≤ u ) Active v = 1$ N V P v = u middle(v, Tc ) ()) u v $ ()) v th f=
i=v/2+1
•
fimi ; t =
i=1
NVP: N V P ! ! "#$ v$
$ F (i) i i ≤ v % & $ v = 3$ f = 3i=2 F (i) = F (2) + F (3) = f1 × f2 × (1 − f3 )+f2 ×f3 ×(1−f1 )+f1 ×f3 ×(1−f2 )+f1 ×f2 ×f3 f=
n
Dynamic Sequential Strategy: ) Retry RB $ Retry RB
,- ) -#' ! ".$ mi ith $ n ) (/
100
rmax rmax mode mode sequential parallel auto Sequential ! mode P arallel Auto
+ 1 $ % " % " (2 % " % " $ 3 ! ) % " 4 % " % " " % " % " !
"
3.2. QoS Model of Web Service # $ $ % " & % " '() (( ( * + •
• tavg : , • tstd : , • f l : • f n :
% " , 5 % " ! % " 3 '( *
1
" % " , &
% "
•
! -.&/0
.&/
•
3.3. A Scalable RTT Prediction Algorithm & , & n {ws}ni=1 v -v ≤ n0 1 1 1 , 6
% "
101
* &-
! " # $ %
$ % tmax $ k $ k + 2 {ci }k+2 i=1 k $ $ f n $ f l & &' $ ci pi = k+2 i=1
ci
E(min(Tv )) =
k
(P(min(Tv ) == ti ) × ti ),
(-)
i=1
# E(min(Tv )) # P(min(Tv ) == ti ) Tv i . P(min(Tv ) == ti ) = P(min(Tv ) ≤ ti ) − P(min(Tv ) ≤ ti−1 ) P(min(Tv ) ≤ ti ) v " rttn Tv ti min(Tv ) ti $ P(min(Tv ) ≤ ti ) = P(rttn ≤ ti ) + P(rttn > ti ) × P(min(Tv−1 ) ≤ ti ) rtti ≤ tj &/, P(rtti ≤ tj ) =
j
pi,k .
(/)
k=1
$
Active $ # #$ * min(Tv ) max(Tv )
N V P * min(Tv ) middle(Tv , y)
yth $
Dynamic parallel strategy 0 " Dynamic parallel strategy 1 $ # 2 3rd
(')
*
" k + 2 + k $
"
{wsi }vi=1 ,
3.4. A Dynamic Fault Tolerance Strategy Selection Algorithm
Problem 1 Given: • {wsi }vi=1 ,
, (1 ≤ i ≤ v) • • {ti }ki=1 , i ti = (tmax × i)/k − tmax /(2 × k) • Tv = {rttj }vj=1 , v rttj k
pj,k
& .23 4. % .25 .22 $ $ , $
Find out:
3.4.1 Sequential or Parallel Strategy Determination
• E(min(Tv )), v min(Tv ) {rttj }vj=1
mode
auto
4. $
6
{pi,j }k+2 j=1
102
"
! !
"
ti
pi =
tmax
+
fi fmax
ri
+
rmax
ms
.
#
" "
#
fi
ri
fi
ri
'(( !
%
fi ri
ti
! "
0
) !
Dynamic ! Retry RB N V P Active
"
" "
p
*'!
!
" &
!
"
4. Experiments
ti " " $
v
" "
!
n
"
!
" " !
#
&
" " / #
!
!
ti tmax
v n " n! v " Cn = v!×(n−v)!
"
! "
v v ≤ n
&
! "
tmax
,-. "
'(( !
n
4.1. Experimental Setup
"
! " " !
1
! 234/ (( 0 5 65$7 / +
"
+" !
3.4.2 Dynamic Sequential Strategy Determination )
"
"
mode
sequential
"
! !
+"
"
ti+1 −ti 1 m ×( tmax
+ ! B.
)
" ! +
m d
applications
RT T ≥
!
" "
'( ! "
tmax
Java
+ !
Retry
C
% +"
" ! "
) ! !
! "
65/ 5D7
+
0
!
% " "
)
m
" !
! !
d > a ! a
!
! !%
−fi + fi+1 fmax )
9
. & : 8.; 5< =>? = &0@ @" A
*'
d=
Java Servlet
.8 0 .8
"
" "
)
! !
3.4.3 Dynamic Parallel Strategy Determination )
"
parallel
mode
"
tmax
timeout
103
!
Table 1. Requirements of Service Users
Users tmax fmax User 1 1000 0.1 User 2 2000 0.01 User 3 4000 0.03 User 4 10000 0.02 User 5 15000 0.005 User 6 20000 0.0001
rmax
50 20 2 1 3 80
U
Focus RTT RTT, Fail RTT, Fail, Res Res Fail, Res Fail
1
!" $ N V P Active '
Strategies Retry RB NVP Active Dynamic
All RTT Fail Res 50000 420 2853 1 50000 420 2808 1 50000 839 2 5 50000 251 110 6 50000 266 298 2.34
Perf 1.011 1.002 0.939 0.393 0.372
. 5 - , , $-- N V P , $-- . Active - , N V P 7. * , Active + . + 8
Dynamic * $-- . 4 - F ail - . - . Retry RB , . tmax = 1000ms 5 , N V P . - N V P . . 7 * , N V P * ) , timeout 9 ) , 1 tmax , N V P
7 * - Dynamic N V P :*, . 4 , . !fmax = 0.1" - Res - . 8
Retry RB 1 , * 5 - , * N V P . * Active ) ; , Res
Table 2. Parameters of Experiments Parameters Setting # % &
Table 3. Experimental Results of User 1
( ) * +
, - - permanent fault probability , network-related faults logic-related faults - performance degradation threshold . , / Dynamic degree 0/ ) , 0/ , $--
4.2. Experimental Results - ) ) * . - .% - !Strategies", 1 !All", * $-- 1 !RTT", !Fail", * !Res", *. !Perf, 21 " - $-- !" 3 , * ) ) /* 4 5 - , 1 * 4 6 tmax = 1000, fmaz = 0.1 rmax = 50 - 1 4 . , .
) 3 * ,
U 2
104
Table 4. Experimental Results of User 2
Strategies Retry RB NVP Active Dynamic
All RTT Fail Res 50000 471 285 1 50000 469 283 1 50000 855 0 5 50000 253 126 6 50000 395 3 4.03
Perf 5.985 5.944 0.677 2.946 0.459
U 3
U 4
Table 5. Experimental Results of User 3
Strategies
All
Retry RB NVP Active Dynamic
RTT Fail Res
50000 50000 50000 50000 50000
458 457 845 248 456
155 149 1 138 141
1 1 5 6 1
Perf
U
0.717 0.713 2.712 3.154 0.708
5
Table 6. Experimental Results of User 4
Strategies
All
Retry RB NVP Active Dynamic
RTT Fail Res
50000 50000 50000 50000 50000
498 493 868 251 494
145 131 1 119 109
1 1 5 6 1
Perf
U
1.194 1.180 5.087 6.144 1.158
6
are 5 and 6, respectively. The Dynamic strategy invokes 2.34 replicas in parallel on average. From the P erf column shown in the Table 3, we can see that Dynamic strategy achieves the best overall performance (calculated by Eq.10) among all the strategies. Although the Active strategy also achieves good performance for User 1, it is not good to other users with different requirement. As shown in Tables 4-8, for other service users, the Dynamic strategy can also provide suitable strategy dynamically to achieve good performance. As shown in Fig.3, the Dynamic strategy provides the best overall performance among all the fault tolerance strategies for all the six service users. This is because the Dynamic strategy considers user requirements and can adjust itself for optimal strategy dynamically according to the change of replica QoS. The other four traditional fault tolerance strategies
NVP Acitve
Overall Performance
Dynamic 20
15
10
3
Users
4
5
RTT Fail 454 450 779 249 489
Res
115 1 121 1 0 5 125 6 60 1.46
Perf
0.823 0.847 1.718 2.516 0.759
Table 8. Experimental Results of User 6
Strategies Retry RB NVP Active Dynamic
All
50000 50000 50000 50000 50000
RTT Fail 470 468 839 249 473
Res
Perf
146 1 29.236 119 1 23.835 1 5 0.304 132 6 26.487 1 3.56 0.268
& '( ) * " + *
5
2
All
50000 50000 50000 50000 50000
!
" # # $
% Dynamic
RB
1
Retry RB NVP Active Dynamic
5. Conclusion
Retry
0
Strategies
Dynamic
30
25
Table 7. Experimental Results of User 5
6
Figure 3. Overall Performance of Strategies
105
6. Acknowledgement
' 0