1
Adaptive Fault Tolerant Systems: Adaptive Fault Tolerant Systems: Reflective Design and Validation Reflective Design and Validation
Marc-Olivier Killijian
Dependable Computing and Fault Tolerance Research Group – Toulouse - France
Adaptive Fault Tolerant Systems: Adaptive Fault Tolerant Systems: - - PowerPoint PPT Presentation
1 Adaptive Fault Tolerant Systems: Adaptive Fault Tolerant Systems: Reflective Design and Validation Reflective Design and Validation Marc-Olivier Killijian Dependable Computing and Fault Tolerance Research Group Toulouse - France 2
1
Marc-Olivier Killijian
Dependable Computing and Fault Tolerance Research Group – Toulouse - France
2
– Open – Flexible – Dependability of both embedded and large scale distributed systems – Adaptation of fault tolerance strategies to environmental conditions and evolutions
– Test – Fault-injection
3
– Limits: static MO, inheritance, etc.
4
– Limits: static MO, inheritance, etc.
5
– Non functional requirements – Applications
– Selection of mechanisms w.r.t. needs – Changing strategies dynamically
– Reflective platform (relates to adaptation) – Meta-level software (mechanisms)
6
Baselevel (application objects) Metalevel (metaobjects and policies) One-to-one One-to-many Dynamic association Mechanisms Development Assumptions Failure Modes analysis Wrappers OS / kernel Middleware
Hardware platform
API
Faults
Fault model SWIFI Testing strategies
7
Identify information to be reified and controlled
Compile-time reflection Using CORBA facilities
Architecture and basic services Fault tolerance mechanisms Preliminary performance analysis
8
5-apply checkpoint
Replica Server Client 1-invocation 4-send checkpoint 6-return 7-reply 2-process invocation 3-obtain checkpoint
9
Replica Server Stub Meta Stub MO Server MO Replica 4-send checkpoint 6-return
Observation Control
1-invocation invocations 3-obtain checkpoint state capture 2-process invocation method calls 5-apply checkpoint state restoration 7-reply Client
10
– Interception
(In and out)
– State capture – Links control
Meta Object Object
Observation Reification
– Activation
– State restoration – Links control
Control Intercession
11
Client Meta stub Metastub 1 Stub Meta
1 2 Server Stub Object Metaobject Protocol and interfaces specific to a mechanism 2
12
interInfo TranslateMethodCall ( ReifiedInfo) { ….. return NewCode; }
NewCode
Meta Class Open Compiler Compile-time MOP Class + MOP Class
13
Node 1 Node 1
C1 C1 MS1 MS1
MOP
Node 2 Node 2
S1 S1 MO1 MO1
MOP
Node 3 Node 3
S2 S2 MO2 MO2
MOP
ORB ORB
OF OF MOF MOF GS GS OF OF MOF MOF GS GS OF OF MOF MOF GS GS
Services
14
– Analysis of mechanisms’ needs ! MOP features
– Transparent and dynamic association – Automatic handling of internal state (full/partial)
– Smart stubs delegate adaptation to meta-stubs – CORBA compliant (black-box) – Some programming conventions
15
– No assumption on low layers – Based on CORBA features
! With a platform «black-box»
! Additions of new features to the MOP ! Optimization of reflective mechanisms ! Language level reflection still necessary
ORB Runtime OS Language FT
16
– Concurrency models: Middleware level – Threading and synchronization: Middleware/OS level – Communication in progress: Middleware/OS level
– Site-independent internal state : Open Languages – Site-dependent internal state:
monitors
– External state
" Concept of multilevel reflection
17
– Interception
(In and out)
– State capture
– Links control
Observation Reification
– Activation/control
– State restoration
– Links control
Control Intercession
Object Meta Object
18
Hardware OS Middleware S
Hardware OS Language Support Middleware Hardware OS Language Support Middleware Universal VM for Distributed Objects C S Fault-Tolerance
19
Hardware OS Middleware S
Hardware OS Language Support Middleware Hardware OS Language Support Middleware Universal VM for Distributed Objects C S Fault-Tolerance This one ?
But difference between OS/MW … LS/MW?
20
Hardware OS Middleware S
Hardware OS Language Support Middleware Hardware OS Language Support Middleware Universal VM for Distributed Objects C S Fault-Tolerance Or this one ?
21
Hardware S
Hardware Hardware Universal VM for Distributed Objects C S Fault-Tolerance FT needs to be aware of everything (potentially) Under-ware Under-ware
22
Fault-Tolerance FT needs to be aware of everything (potentially) but how ? Reflective languages … Reflective middleware … Reflective OS … A lot of different concepts to manipulate
23
Fault-Tolerance
multi-level meta-model
aggregation
Self-contained, integrated, meta-interface mono-level meta-models
24
– Application, Middleware, Operating System
– Transactions, stable storage, assumptions – Memory, data, code – Objects, methods, invocations, servers, proxies – Threads, pipes, files – Context switches, interrupts
– Which metainterface (one per level? Generic?) – Consistency # metamodel
25
Fault-Tolerance
multi-level meta-model
aggregation
Self-contained, integrated, meta-interface
– Necessary for FT – Efficiency (lowest possible? Same concepts at ≠ levels?)
– ML management (inter-level coupling) – Adaptation – Concepts/levels navigation
mono-level meta-models
26
! ! ! !Interlevel interactions mostly asynchronous Trend: Leverage know-how on FT asynch. distributed sys. ! ! ! ! Causality tracking/ monitoring of non-determinism is needed. ! ! ! ! State capture/ recovery at appropriate granularity is needed. ! ! ! ! … (?)
P P p q r p q r
t1 t2
[Kasbekar99, Basile02]
t2
t1
27
– Concepts – Primitives / base entities (keywords, syscalls, data types, …) – Rules on how to use them
– Very broad notion (includes programming languages) – Self contained
– Can’t be split in smaller entities within the programming model. – Implemented by more elementary entities within the component. – Implementation is internal ⇒ hidden to component user.
(I)
28
CORBA interaction client server client server mutex socket thread signal
invocation
– Communication “medium” ( pipes, sockets, … ) – Local control flow ( POSIX threads, Java threads, LWP, …) ⇒ Global control flow abstraction
transparent interaction composite interaction chain
(II)
Mw. Appli.
29
– Coupling between emerging entities of next upper level and implementation entities of lower levels
mappings”)
– translation / aggregation / multiplexing / hiding
– creation / binding / destruction / observation / modification
Level N+1 Level N
(III)
Mw. Appli.
30
CORBA interaction client server client server mutex socket thread signal
(I)
Mw. Appli.
31
Berkeley sockets as seen by the middleware programmer
(II)
close | shutdown
send
bound idle accepting connections
accept call accept return
unbound
bind ; listen socket call to recv return from recv
idle new socket waiting for reception
32
Dynamic coupling between CORBA invocations and the socket API
Object Creation Thread Creation Method Invocation
Socket API
bind listen accept recv send shutdown
(III)
33
Executive Layer Ln+1 Executive Layer Ln Abstraction Level Levn+1 Abstraction Level Levn System's Functional Interface Application Layer LA
– State capture – Monitoring of non-determinism
Abstraction Level Levn-1
(I)
34
Executive Layer Ln+1 Executive Layer Ln Abstraction Level Levn+1 Abstraction Level Levn System's Functional Interface Application Layer LA
– Fault propagation analysis / confinement – Rollback propagation / state recovery
Abstraction Level Levn-1
(II)
35
– Specific mechanisms need specific info – Mechanisms can change over time
– Efficiency
– Simple boolean matrices – Code-injection techniques
36
– Radical style # full metamodel from scratch or based on modified open-source components – Middle-Way based on available reflective components + wrappers – EZ way wrapped COTS # limited metamodel
– Efficiency /ad-hoc /language level reflection – Evolution of non-funtionnal requirements/asumptions – Environmental evolution
– Rigourous testing stategies for reflective/adaptive systems – Characterization by various ad-hoc fault injection techniques
37
Reflection’00 - DSN’01- IEEE ToC 03 Ruiz, Fabre, Thevenod, Killijian
Dependable Computing and Fault Tolerance Research Group – Toulouse - France
38
– the MOP is the corner stone – FT completely rely on the reflective mechanisms
– Few on formal verification – None on testing
– Test of the underlying platform – Fault-injection
39
1.
Test order definition
(reification reification, intercession, introspection) , intercession, introspection)
2.
Test objectives for each testing level each testing level 3.
Conformance checks for for each testing level each testing level 4.
Test environments environments
40
TL0
. Testing preceding the MOP activation TL1
. Reification mechanisms TL2
. Behavioral intercession mechanisms TL3
. Introspection mechanisms TL4.
Structural intercession mechanisms
41
TL0 TL0. . TL1
. Reification mechanisms TL2
. Behavioral intercession mechanisms TL3
. Introspection mechanisms TL4.
Structural intercession mechanisms
implementation dependent implementation dependent implementation dependent
42
server server
service service test driver test driver
Method execution is
simulated by generatingsimulated by generating
a random value for eacha random value for each
Comparison: Comparison:
Invoked method
Parameter values values
Output values
Oracle Oracle metaobject metaobject
metaobject metaobject
(behavioral observation)
(behavioral observation) (behavioral observation)
43
Behavioral Behavioral i intercession ntercession service service test driver test driver
Reified information is systematically delivered systematically delivered to the server object to the server object
Output values are returned returned to to the test the test driver driver Server traces are Server traces are checked according to checked according to the data supplied by the data supplied by the test driver the test driver
Oracle Oracle metaobject metaobject
metaobject metaobject
(behavioral control)
(behavioral control) (behavioral control)
44
(structural observation)
(structural observation) (structural observation)
metaobject metaobject
metaobject metaobject metacontrol metacontrol
Behavioral Behavioral i intercession ntercession
Introspection Introspection
service service test driver test driver Is the introspected Is the introspected state consistent state consistent with with the initialization the initialization state? state?
Oracle Oracle
State State
45
(structural control)
(structural control) (structural control)
metaobject metaobject
metaobject metaobject metacontrol metacontrol
Behavioral Behavioral i intercession ntercession Introspection Introspection
service service test driver test driver Is the introspected Is the introspected state consistent state consistent with with the initialization the initialization state? state?
Structural Structural intercession intercession
Oracle Oracle
State State
46
(Service interfaces)
( (Service Service interfaces) interfaces)
interface interface shortTypeParameters shortTypeParameters{ { short short ReturnValue ReturnValue (); (); void void InValue InValue (in short v); (in short v); void void OutValue OutValue (out short v); (out short v); void void InOutValue InOutValue ( (inout inout short v); short v); short short All All ( in short v1, ( in short v1,
inout short v3); short v3); }; };
Introspection Introspection & & Structural Structural Intercession Intercession
Built Built-in types,
Strings, Strings, Class types, Class types, Structures Structures and Arrays and Arrays
Reification Reification & & Behavioral Behavioral Intercession Intercession
interface interface shortTypeAttributes shortTypeAttributes{ { attribute attribute short short ReadWriteValue ReadWriteValue ; ; attribute readonly attribute readonly short short ReadValue ReadValue ; ; }; };
47
Inheritance:
Encapsulation (methods and attributes): public / protected / private public / protected / private
(object-oriented properties considered
)
B A
B A C
48
– – Internal object activity was Internal object activity was incorrectly incorrectly encapsulated encapsulated
Reification / Behavioral intercession – – Method invocations were incorrectly Method invocations were incorrectly handled using inheritance handled using inheritance – – Object Object composit compositi ion
vs vs Object references Object references
Introspection / Structural intercession
external external
internal internal
reference reference deep deep copy/restore copy/restore
int fact int fact( (int int i){ i){ if (i==0) return 1; if (i==0) return 1; return i* return i*fact fact(i-1); (i-1); } }
shallow shallow copy/restore copy/restore
B B A A foo foo() () foo foo() () fooId fooId fooId fooId
49
Step forward for testing reflective systems
Reusing mechanisms already tested for testing the remaining ones.
Case Study Study: f : feasibility easibility and and effectiven effectivene ess ss of
the proposed approach
Automatic generation of test case input values
Guidelines for MOP design
Generalizing the approach
– – Multi-level reflective systems Multi-level reflective systems – – Aspect-oriented programming Aspect-oriented programming
Testing reflection # Reflection for testing
50
– Language reflection / middleware not reflective – CORBA Portable Interceptors
– Unified approach for multi layered open systems
– Test : augment the confidence – FI : failure mode analysis