Dependability of Adaptable and Evolvable Distributed Systems
Carlo Ghezzi DEIB-Politecnico di Milano
1
SFM-16 Bertinoro, June 2016
Dependability of Adaptable and Evolvable Distributed Systems SFM-16 - - PowerPoint PPT Presentation
Dependability of Adaptable and Evolvable Distributed Systems SFM-16 Bertinoro, June 2016 Carlo Ghezzi DEIB-Politecnico di Milano 1 Outline Of software and change Evolution, adaptation, self-adaptation How can they supported
Dependability of Adaptable and Evolvable Distributed Systems
Carlo Ghezzi DEIB-Politecnico di Milano
1
SFM-16 Bertinoro, June 2016
Outline
continuously running systems?
2
Software and change
3
Facts
4
Facts
4
Facts
4
Facts
4
Facts
4
Evolution: positive view of change
Embeds the notions of
5
Formal methods can be integrated into software engineering practice to achieve dependability and effectively and efficiently turn change into evolution
6
Why change?
7
The world and the machine
8
We build (abstract) machines to achieve certain real-world goals, satisfy certain requirements
ACM Trans. Softw. Eng. Methodol. 6, 1 (January 1997)
The world and the machine
8
We build (abstract) machines to achieve certain real-world goals, satisfy certain requirements
ACM Trans. Softw. Eng. Methodol. 6, 1 (January 1997)
The world and the machine
8
We build (abstract) machines to achieve certain real-world goals, satisfy certain requirements
ACM Trans. Softw. Eng. Methodol. 6, 1 (January 1997)
Environment properties & assumptions
… they bridge the gap between requirements and specifications (M. Jackson & P . Zave)
Software engineer's responsibilities
9
E S R
Software engineer's responsibilities
implementation) such, assuming that the environment behaves according to E, we can assure satisfaction of R
9
E S R
Software engineer's responsibilities
implementation) such, assuming that the environment behaves according to E, we can assure satisfaction of R
9
E S R
Software engineer's responsibilities
implementation) such, assuming that the environment behaves according to E, we can assure satisfaction of R
E & S ⊨ R
9
E S R
Software engineer's responsibilities
implementation) such, assuming that the environment behaves according to E, we can assure satisfaction of R
E & S ⊨ R
9
Dependability argument E S R
Change source: Getting the machine right
complete and stable solution
evolution
10
Change source: Requirements
requirements E & S ⊨ R
11
E S R
Change source: Requirements
requirements E & S ⊨ R
11
R E S R
Change source: Requirements
requirements E & S ⊨ R
11
R S E S R
Change source: The environment
hard
12
E S R
Change source: The environment
hard
12
E S R
Change source: The environment
hard
12
E S R
Change source: The environment
hard
12
E S R
Change source: The environment
hard
12
E S R
More on properties vs. assumptions
avgTrainAcceleration (t1, t2) > 0 implies trainSpeed (t2) > trainSpeed (t1)
“temperature is in the range -40..+40 Celsius” “device generates a measure every 2 ms.” “humans behave as instructed by the machine”
13
Change source: The environment
14
Change source: The environment
14
E & S ⊨ R
Change source: The environment
14
E & S ⊨ R
Change source: The environment
14
E
E & S ⊨ R
Change source: The environment
14
S E
The (in)famous Airbus accident (Sept. 1993)
15
The (in)famous Airbus accident (Sept. 1993)
15
The (in)famous Airbus accident (Sept. 1993)
15
The (in)famous Airbus accident (Sept. 1993)
15
The (in)famous Airbus accident (Sept. 1993)
15
WheelPulsesOn <—> WheelsTurning
The (in)famous Airbus accident (Sept. 1993)
15
WheelPulsesOn <—> WheelsTurning ActuateRevThrust <—> ReverseThrust
The (in)famous Airbus accident (Sept. 1993)
15
WheelPulsesOn <—> WheelsTurning ActuateRevThrust <—> ReverseThrust Sensor/actuator correctness assumption
The (in)famous Airbus accident (Sept. 1993)
15
WheelPulsesOn <—> WheelsTurning ActuateRevThrust <—> ReverseThrust WheelsTurning <—> TouchedDown Sensor/actuator correctness assumption
The (in)famous Airbus accident (Sept. 1993)
15
WheelPulsesOn <—> WheelsTurning ActuateRevThrust <—> ReverseThrust WheelsTurning <—> TouchedDown Sensor/actuator correctness assumption
The (in)famous Airbus accident (Sept. 1993)
15
WheelPulsesOn <—> WheelsTurning ActuateRevThrust <—> ReverseThrust WheelsTurning <—> TouchedDown Sensor/actuator correctness assumption
The notion of failure
lead to financial losses, penalties, or damage to reputation
16
A relevant case: multi-owner systems
make environment volatile
because a computer has failed that I never heard of
17
How can changes be handled?
adaptation
line, but they are increasingly performed on-line at run time (see continuously running systems)
18
A personal journey through dependable self- adaptation and on-line evolution with the SMScom ERC AdG (2008-2013)
19
The autonomic feedback loop
20
The autonomic feedback loop
20
The autonomic feedback loop
20
Where are the founding principles?
Paradigm shift
development time (DT) and run time (RT)
environment
21
Our view of the lifecycle
22
Our view of the lifecycle
22
Reqs
Our view of the lifecycle
22
Reqs Env
Our view of the lifecycle
22
Reqs
Modelling Modelling Development time
Env
Our view of the lifecycle
22
Reqs
Modelling Modelling Development time
Env
E 1
Machine+ environment
Our view of the lifecycle
22
Reqs
Implementation Modelling Modelling Development time
Env
E 1
Machine+ environment
Our view of the lifecycle
22
Reqs
Implementation Modelling Modelling Development time Run time
Env
E 1
Machine+ environment
Our view of the lifecycle
22
Reqs
Implementation Execution Modelling Modelling Development time Run time
Env
E 1
Machine+ environment
Our view of the lifecycle
22
Reqs
Implementation Monitoring Execution Modelling Modelling Development time Run time
Env
E 1
Machine+ environment
Our view of the lifecycle
22
Reqs
Implementation Monitoring Execution Reasoning Modelling Modelling Development time Run time
Env
E 1
Machine+ environment
Our view of the lifecycle
22
Reqs
Implementation Monitoring Execution Reasoning Modelling Modelling Development time Run time
Env
Self-adaptation
E 1
Machine+ environment
Our view of the lifecycle
22
Reqs
Implementation Monitoring Execution Reasoning Modelling Modelling Development time Run time
Env
Self-adaptation
E 1
Machine+ environment
Offline adaptation
Models&verification@run-time
machine+environment that support reasoning about the dependability argument (a learning step)
violations to the dependability argument
23
Known unknowns vs unknown unknowns
knowns, it can self-adapt
monitored
24
Whereof one cannot speak, thereof one must be silent (Wittgenstein)
25
25
Time Parameter Adaptation”, ICSE 2009
Integrated Services”, RE 2009
checking”, ICSE 2011
Quantitative Verification and Sensitivity Analysis at Run Time, IEEE TSE, January 2016
An exemplary framework
failure), cost (energy consumption)
User Integrated Service Workflow W Service S1 <uses> Service S2 <uses> Service Sn <uses> ....
26
An exemplary framework
failure), cost (energy consumption)
User Integrated Service Workflow W Service S1 <uses> Service S2 <uses> Service Sn <uses> ....
Sources of uncertainty (and change)
26
Non-functional requirements are quantitative
the gate as the sensor signals an incoming train" or "it should never happen that the gate is open and the train is in the intersection")
quantitative ("average response time shall be less than 3 seconds");
specification languages
quantitative verification
27
Formal modeling and analysis
models for non functional rquirements (reliability, performance, energy consumption)
28
Brief intro to Discrete Time Markov Chains
29
A DTMC is defined by a tuple (S, s0, P , AP , L) where
The modelled process must satisfy the Markov property, i.e., the probability distribution
!A simple communication protocol operating with a channel!
delivered try lost start
1 0.9 1 1 0.1
S D T L S 0 0 1 0 D 1 0 0 0 T 0 0.9 0 0.1 L 0 0 1 0
matrix representation
Note: sum of probabilities for transitions leaving a given state equals 1
30
Discrete Time Markov Reward Models
measure; we use non-negative real functions
execution time, outsourcing costs, pay per use cost, CPU time
31
Reward DTMC
, AP , L, µ), where S, s0, P , L are defined as for a DTMC, while µ is defined as follows:
negative real number to each state
At step 1, the system gains the reward µ(s0) associated with the state and moves to a new state...
32
PCTL
can predicate on the probability for the set of paths (leaving the state) that satisfy property
≤t
ϕ2
P>0.8 [◊(system state = success)]
33
Φ ::= true | a | Φ ∧ Φ | ¬ Φ | P
p (Ψ)
Ψ ::= X Φ | Φ U Φ | Φ U≤t Φ
absorbing state
1
R-PCTL
34
Reward-Probabilistic CTL for R-DTMC Φ ::= true | a | Φ ∧ Φ | ¬ Φ | P
p (Ψ)
Ψ ::= X Φ | Φ U Φ | Φ U≤t Φ | R
r (Θ)
Θ ::= I=k | C≤k | FΦ
R-PCTL
34
Reward-Probabilistic CTL for R-DTMC Φ ::= true | a | Φ ∧ Φ | ¬ Φ | P
p (Ψ)
Ψ ::= X Φ | Φ U Φ | Φ U≤t Φ | R
r (Θ)
Θ ::= I=k | C≤k | FΦ R
r(I=k)
R
r(C≤k)
R
r(FΦ)
R-PCTL
34
Reward-Probabilistic CTL for R-DTMC Φ ::= true | a | Φ ∧ Φ | ¬ Φ | P
p (Ψ)
Ψ ::= X Φ | Φ U Φ | Φ U≤t Φ | R
r (Θ)
Θ ::= I=k | C≤k | FΦ R
r(I=k)
R
r(C≤k)
R
r(FΦ)
true if expected state reward to be gained in the state entered at step k along the paths originating here meets the bound r
R-PCTL
34
Reward-Probabilistic CTL for R-DTMC Φ ::= true | a | Φ ∧ Φ | ¬ Φ | P
p (Ψ)
Ψ ::= X Φ | Φ U Φ | Φ U≤t Φ | R
r (Θ)
Θ ::= I=k | C≤k | FΦ R
r(I=k)
R
r(C≤k)
R
r(FΦ)
R-PCTL
34
Reward-Probabilistic CTL for R-DTMC Φ ::= true | a | Φ ∧ Φ | ¬ Φ | P
p (Ψ)
Ψ ::= X Φ | Φ U Φ | Φ U≤t Φ | R
r (Θ)
Θ ::= I=k | C≤k | FΦ R
r(I=k)
R
r(C≤k)
R
r(FΦ)
true if the expected reward cumulated after k steps meets the bound r
R-PCTL
34
Reward-Probabilistic CTL for R-DTMC Φ ::= true | a | Φ ∧ Φ | ¬ Φ | P
p (Ψ)
Ψ ::= X Φ | Φ U Φ | Φ U≤t Φ | R
r (Θ)
Θ ::= I=k | C≤k | FΦ R
r(I=k)
R
r(C≤k)
R
r(FΦ)
R-PCTL
34
Reward-Probabilistic CTL for R-DTMC Φ ::= true | a | Φ ∧ Φ | ¬ Φ | P
p (Ψ)
Ψ ::= X Φ | Φ U Φ | Φ U≤t Φ | R
r (Θ)
Θ ::= I=k | C≤k | FΦ R
r(I=k)
R
r(C≤k)
R
r(FΦ)
true if the expected reward cumulated before a state satisfying ϕ is reached meets the bound r
R-PCTL
34
Reward-Probabilistic CTL for R-DTMC Φ ::= true | a | Φ ∧ Φ | ¬ Φ | P
p (Ψ)
Ψ ::= X Φ | Φ U Φ | Φ U≤t Φ | R
r (Θ)
Θ ::= I=k | C≤k | FΦ R
r(I=k)
R
r(C≤k)
R
r(FΦ)
Example 1
Expected state reward to be gained in the state entered at step k along the paths originating in the given state
35
R
r(I=k)
Example 1
Expected state reward to be gained in the state entered at step k along the paths originating in the given state
35
R
r(I=k)
“The expected cost gained after exactly 10 time steps is less than 5”
Example 1
Expected state reward to be gained in the state entered at step k along the paths originating in the given state
35
R
r(I=k)
“The expected cost gained after exactly 10 time steps is less than 5”
Example 2
Expected cumulated reward within k time steps
36
r(C≤k)
“The expected energy consumption within the first 50 time units of operation is less than 6 kwh”
Example 2
Expected cumulated reward within k time steps
36
r(C≤k)
“The expected energy consumption within the first 50 time units of operation is less than 6 kwh”
Example 3
Expected cumulated reward until a state satisfying ϕ is reached
37
r(FΦ)
“The average execution time until a user session is complete is lower than 150 s”
Example 3
Expected cumulated reward until a state satisfying ϕ is reached
37
r(FΦ)
“The average execution time until a user session is complete is lower than 150 s”
A bit of theory
is 1 if otherwise
leading to sj from si
is which is the entry of
entry of
38
π = s0, s1, s2, . . . |π| = 1 Q|π|−2
k=0 P(sk, sk+1)
P
sx∈S pix · pxj
(i, j) P 2 (i, j) P k
A bit of theory
again after being reached is 1; it is otherwise transient (a non-zero probability that it will never be visited again)
state
39
An example
40
1 2 3 1 0.2 0.5 0.3
An example
40
1 0.2 0.5 0.3 1 1 1 2 3 1 0.2 0.5 0.3
An example
40
1 0.2 0.5 0.3 1 1 1 2 3 1 0.2 0.5 0.3
Probability of reaching an absorbing state (e.g., 2) 2 can be reached by reaching 1 in 0, 1, 2,...∞ steps and then 2 with prob .5 (1+0.2+0.22+0.23+ ... ) x 0.5 = ( ∑ 0.2n) x 0.5 = (1/(1-0.2)) x 0.5 = 0.625 Similarly, for state 3, (1/(1-0.2)) x 0.3 = 0.375 Notice that an absorbing state is reached with prob 1
A bit of theory
41
Qk → 0 as k → ∞
be eventually absorbed is 1
P = ✓ Q R I ◆ (1)
Reachability properties
42
states that the probability of reaching a state where holds matches the constraint
(denoting success/failure for reliability analysis)
P.
/p(♦ φ)
P.
/p(·)
A bit on theory
43
Consider again ni,k expected # of visits of transient state sk from si, i.e., the sum of the probabilities of visiting it 0, 1, 2, ...times Theorem: The geometric series converges to Consider . The probability of reaching absorbing state sk from si is
P = ✓ Q R I ◆ (1) N = I + Q1 + Q2 + Q3 + · · · =
∞
X
k=0
Qk (I − Q)−1 B = N × R bik = X
k=0..t−1
nij · rjk
j
Proving reachability
44
) Pr( End s = ◊
j End j j r
, ,
n0,j is the sum of the probabilities to reach state j in 1, 2, 3, ... ∞ steps
Model checking
expressed in Promela
properties and uses a symbolic representation of visited states (BDDs) to address the “state explosion problem”
support Markov models and perform probabilistic model checking
45
Question
evolution?
system
effects
46
An e-commerce case study
47
Login Search Buy [buy more] NrmShipping ExpShipping [proceed] [normal] CheckOut Logout [express]
An e-commerce case study
47
Login Search Buy [buy more] NrmShipping ExpShipping [proceed] [normal] CheckOut Logout [express]
Returning customers vs new customers
An e-commerce case study
47
3 probabilistic requirements: R1: “Probability of success is > 0.8” R2: “Probability of a ExpShipping failure for a user recognized as ReturningCustomer < 0.035” R3: “Probability of an authentication failure is less then < 0.06”
Login Search Buy [buy more] NrmShipping ExpShipping [proceed] [normal] CheckOut Logout [express]
Returning customers vs new customers
Assumptions
User profile assumptions External service assumptions (reliability)
RC RC RC NC NC
48
1
2
Logged
9
Buy
6
Search
1
Returning
3
NewCustomer
7
Buy
4
Search
11 10
ExpShipping
12 14
Logout
16
Success
5
1 FailedLg
8
FailedChk
15
1 FailedNrmSh
13
1 FailedExpSh
1
Login 0.97 0.03 0.65 0.35 1
1 0.2 0.5 0.05 0.6
NrmShipping
0.03 0.95 0.1 0.97 0.95 0.9 1 0.15
1
0.3 0.05
CheckOut
0.25
S, E, R in practice
49
1
2
Logged
9
Buy
6
Search
1
Returning
3
NewCustomer
7
Buy
4
Search
11 10
ExpShipping
12 14
Logout
16
Success
5
1 FailedLg
8
FailedChk
15
1 FailedNrmSh
13
1 FailedExpSh
1
Login 0.97 0.03 0.65 0.35 1
1 0.2 0.5 0.05 0.6
NrmShipping
0.03 0.95 0.1 0.97 0.95 0.9 1 0.15
1
0.3 0.05
CheckOut
0.25
R1: Probability of success > 0.8 R2: Probability of ExpShipping failure for ReturningCustomer < 0.035
S, E, R in practice
49
What happens at run time?
DTMC matrix (posterior) given run time traces and prior transitions
50
What happens at run time?
DTMC matrix (posterior) given run time traces and prior transitions
50
What happens at run time?
DTMC matrix (posterior) given run time traces and prior transitions
50
A-priori Knowledge
What happens at run time?
DTMC matrix (posterior) given run time traces and prior transitions
50
A-priori Knowledge A-posteriori Knowledge
Verification @ runtime as a trigger for adaptation
violations
51
52
1
2
Logged
9
Buy
6
Search
1
Returning
3
NewCustomer
7
Buy
4
Search
11 10
ExpShipping
12 14
Logout
16
Success
5
1 FailedLg
8
FailedChk
15
1 FailedNrmSh
13
1 FailedExpSh
1
Login 0.97 0.03 0.65 0.35 1
1 0.2 0.5 0.05 0.6
NrmShipping
0.03 0.95 0.1 0.97 0.95 0.9 1 0.15
1
0.3 0.05
CheckOut
0.25
52
1
2
Logged
9
Buy
6
Search
1
Returning
3
NewCustomer
7
Buy
4
Search
11 10
ExpShipping
12 14
Logout
16
Success
5
1 FailedLg
8
FailedChk
15
1 FailedNrmSh
13
1 FailedExpSh
1
Login 0.97 0.03 0.65 0.35 1
1 0.2 0.5 0.05 0.6
NrmShipping
0.03 0.95 0.1 0.97 0.95 0.9 1 0.15
1
0.3 0.05
CheckOut
0.25
Models&Verification @ runtime: challenges
techniques
53
Towards efficient verification @ runtime
Make verification incremental
try to restrict the check to what has changed
54
The quest for incrementality
Given a system (model) S, and a set of properties P met by S Change = new pair S’, P’ where S’= S + ∆S and P’= P + ∆P Let ∏ be the proof of S against P The proof ∏’ of P’ against S’ can be done by just performing a proof increment ∆∏ such that ∏’ = ∏ + ∆∏ Expectation: ∆∏ easy and efficient to perform
55
How can we achieve it?
56
An effective technique: incrementality by parameterization
as symbolic variable
evaluation (mixed numerical/symbolic processing)
parameters and is very efficient
57
An effective technique: incrementality by parameterization
as symbolic variable
evaluation (mixed numerical/symbolic processing)
parameters and is very efficient
57
The parametric WM approach
58
The parametric WM approach
58
Design-Time (offline) Partial evaluation
E 1
The parametric WM approach
58
Run-Time (online) Design-Time (offline) Partial evaluation
E 1
The parametric WM approach
58
Run-Time (online) Design-Time (offline) Partial evaluation
E 1
Parameter values
The approach
verification
normally only few variables
59
An example
60
r = 0.85− 0.85⋅ x + 0.15⋅ z − 0.15⋅ x⋅ z − y⋅ x 0.85+ 0.15⋅ z
Additional benefit: sensitivity analysis
Back to theory: flat reachability formula
61
We need to evaluate
where B = N x R; N is the inverse of I - Q,
ni,k expected # of visits of transient state sk from si, i.e., the sum of the probabilities of visiting it 0, 1, 2, ...times Matrix R is available, we need to compute N In our context, N must be evaluated partially, i.e., by a mix of numeric and symbolic processing
P = ✓ Q R I ◆ N = I + Q1 + Q2 + Q3 + · · · =
∞
X
k=0
Qk Pr(true U {sj ∈ T}) = X
sj∈T
b0j
Design-time vs run-time costs
computations
minor additional complications for full R-PCTL coverage (but still very efficient!)
62
Run-time performance comparison
63
PRISM MRMC WM Time (ms) 1 10 100 1000 System size (# of states) 50 100 150 200 250 300 350 400 450 500
128 randomly generated DTMCs, 50 to 500 states (with step 50), two absorbing states, and a normally distributed number of outgoing transitions per state with mean 10 and standard deviation 2. The number
with mean 40 and standard deviation 8.
64
Where are we?
65
Where are we?
and rigorous grounds that lead to effective and efficient evolution
environment changes
65
Where are we?
and rigorous grounds that lead to effective and efficient evolution
environment changes
throughout the software lifetime?
65
Looking forward: continuous assurance
66
Looking forward: continuous assurance
requirements drives both development and operation
66
Looking forward: continuous assurance
requirements drives both development and operation
verification methods in the light of continuous change
66
Looking forward
incremental, change-oriented, agile
67
Looking forward
incremental, change-oriented, agile
67
(replaced by user stories), specification (replaced by tests), modeling…
Looking forward
incremental, change-oriented, agile
67
Looking forward
incremental, change-oriented, agile
67
system…
Looking forward
incremental, change-oriented, agile
67
Looking forward
incremental, change-oriented, agile
67
step further
them in agile development
development in practice?
What needs to be done
68
What needs to be done
agile development?
68
What needs to be done
agile development?
68
Computer Aided Verification, vol. 1633 LNCS, Springer, 1999.
CONCUR 2000
partial behaviour models. ACM TOSEM 2011.
What needs to be done
agile development?
verification
68
Computer Aided Verification, vol. 1633 LNCS, Springer, 1999.
CONCUR 2000
partial behaviour models. ACM TOSEM 2011.
Support to incomplete, partial specifications
properties P to be met by S
69
Example of an incomplete model
70
Example of an incomplete model
70
E(¬( ) )U( )
Example of an incomplete model
70
E(¬( ) )U( )
Example of an incomplete model
70
E(¬( ) )U( )
Example of an incomplete model
70
E(¬( ) )U( )
Example of an incomplete model
70
E(¬( ) )U( )
Example of an incomplete model
70
E(¬( ) )U( )
Example of an incomplete model
70
E(¬( ) )U( )
Example of an incomplete model
70
E(¬( ) )U( )
MAYBE and this: "blah blah" is the proof obligation
Example of an incomplete model
70
E(¬( ) )U( )
MAYBE and this: "blah blah" is the proof obligation
Example of an incomplete model
70
E(¬( ) )U( )
MAYBE and this: "blah blah" is the proof obligation
Partial models vs. incremental changes
get
hierarchical decomposition?
found independent of model/program and property language to verify?
71
Towards a general theory of incremental verification
72
Agile Verification, Science of Computer Programming 2014
Syntactic-semantic incremental verification
property)
73
Intuition: back to the 1970's
“covering” the change w, rooted in <N>, and “plug-it-in” the unmodified portion of tree
74
hSi hN i xwz
Example
to rebuild and hook it into the unchanged part 6*5+3*2+1 6*5+4+1
75
Example
to rebuild and hook it into the unchanged part 6*5+3*2+1 6*5+4+1
75
Example
to rebuild and hook it into the unchanged part 6*5+3*2+1 6*5+4+1
75
Intuition: adding semantics
76
Intuition: adding semantics
and computed traversing the syntax tree (Knuth's attribute grammars)
76
Intuition: adding semantics
and computed traversing the syntax tree (Knuth's attribute grammars)
attribute functions
76
Current stage
compositions
Matching Logic properties
77
Reliability Analysis of Evolving Structured Workflows, ISOLA 2014
78
reconfiguration of component-based distributed systems, in Proceedings of ESEC/FSE ’11
Distributed Components, to appear on IEEE TSE
The problem
reconfiguration (i.e., an update of a distributed configuration)
79
Traditional solution
80
Requirements for dynamic update
activities must complete correctly)
81
A simple case study
82
Proc Portal DB Auth
Ditributed components and their static dependencies
Transactions
bounded time
sub-transactions
83
Transactions
84
Auth Auth Portal Portal Proc Proc DBAccess DBAccess
T0 T0 T1 T1 T3 T3 T2 T2 T4 T4 getToken (cred) return token process (token,data) verify(token)
dbOperation() db result proc result
root$transaction$ $ sub,transaction$ $
Extended set of a transaction T is set comprising T and all its direct and indirect subtransactions
Idleness
transaction
simplicity, we assume components to be stateless; i.e., dynamic update does not require application of a state transfer function)
must also be considered
85
Replacing Auth when idle
86
Portal
T0
Auth Proc DB
T1 getToken(cred) return token T2 process(token, data) T3 verify(token) OK T4 dbOp()
B
Replacing Auth when idle
86
Portal
T0
Auth Proc DB
T1 getToken(cred) return token T2 process(token, data) T3 verify(token) OK T4 dbOp()
A
D
C
Replacing Auth when idle
86
Portal
T0
Auth Proc DB
T1 getToken(cred) return token T2 process(token, data) T3 verify(token) OK T4 dbOp()
C
87
Quiescence (Kramer&Magee, TSE 1990)
A sufficient condition: all transactions initiated by dependent nodes must be completed
87
Progress of nodes that may (indirectly) activate Auth must also be blocked
Portal
T0
Auth Proc DB
T1
getToken(cred) return token
T2
process(token, data) T3 verify(token)
OK
T4
dbOp()
A C D
Quiescence (Kramer&Magee, TSE 1990)
A sufficient condition: all transactions initiated by dependent nodes must be completed
Tranquillity (Vandewoude et al. TSE 2007)
not request service of the node to be updated (even if it has been involved in the transaction in the past)
transaction will request service but they have not before
88
Tranquillity can be unsafe
89
Portal
T0
Auth Proc DB
T1 getToken(cred) return token T2 process(token, data) T3 verify(token) OK T4 dbOp()
Tranquillity can be unsafe
89
Portal
T0
Auth Proc DB
T1 getToken(cred) return token T2 process(token, data) T3 verify(token) OK T4 dbOp()
A
Tranquillity can be unsafe
89
Portal
T0
Auth Proc DB
T1 getToken(cred) return token T2 process(token, data) T3 verify(token) OK T4 dbOp()
A
D
Tranquillity can be unsafe
89
Portal
T0
Auth Proc DB
T1 getToken(cred) return token T2 process(token, data) T3 verify(token) OK T4 dbOp()
A
C
D
It is a sufficient condition if "components follow the black-box principle" but how can this be established?
Updates and version consistency
configuration (set of components), c is a component and c' is its update
, SP' to be the specs of S, S', — transactions that end before the update satisfy SP , — transactions that begin after the update satisfy SP', — those that begin before and end after the update satisfy either SP or SP'
no two transactions T1, T2 in ext(T) exist such that h(T1) = c and h(T2) = c'
system are version consistent
90
How to check version consistency?
consistency
structure representing dynamic dependencies
check of version consistency to enable its update
91
Intuitively
indicating that some node has invoked in the past n in the context of a root transaction T, or will invoke it in the future
f/T for all root transactions T
when the node is free
92
Intuitively
free, it is safely removed)
blocked to avoid creating a p/T if an f/T is present)
93
(details in L. Baresi, C. Ghezzi, X. Ma, and V. Panzica La Manna Efficient Dynamic Updates of Distributed Components, to appear on IEEE TSE)
In summary
support actions
better results (in terms of timeliness and disruption) than quiescence
94
Conclusions
95
Software evolution
the design time and the run time
96