Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
1
Software Architecture & Composition
Guillaume Waignier, Anne-Françoise Le Meur, Laurence Duchien Project-Team U. Lille 1/CNRS-INRIA
http://adam.lille.inria.fr
April 2009
2
Scientific context
Future applications will be multi-paradigms and will be deployed on multi-scale environments
New forms of complexity • Applications should be adapted in the best way to exploit these
networks • Need for reasoning on the environmental conditions to adapt the
software with a minimum of effort
Report: beyond the Horizon, thematic Group 6, FP7, Software Intensive Systems, 2006
2
3
3
ADAM’s challenge
Grid5000
Adaptive Deployment
LAN WiFi
Network
Adaptive distributed application design (UML, ADL, DSL)
Adaptive component frameworks for
distributed applications (Fractal, SCA, SOA)
Adaptation throughout
the software lifecycle
4
4
Software Models
FraSCAti Soleil FraSCAme TINAP
Software Systems
DeployWare
Services/Fractal Embedded/Fractal
4
CALICO CAPucine
5
Outline
Scientific context
Component AssembLy Interaction Control framewOrk 1. CALICO Framework [MODeLS 2008] 2. CALICO model-level
Unified framework for designing and analyzing application properties • Structure design • Contractual application specifications • Contractual specifications composition
3. CALICO platform-level
Conclusion and perspectives
6
Scientific context
7
Context
• Software Architecture • components or services
– Visible external properties – Interface, behavior
– Relations – assembly
• Understandable (high level abstraction) • Construction (reuse) • Architecture Description Languages (ADLs)
C1 C2
C3
Abstract model
Execution model
8
1. Safe architecture • Specify the application properties
• Structure : constrain the connection between elements • Behavior : express the workflow going in and out • Dataflow : limit the allowed range of value of exchanged messages • QoS : define the maximal response time, …
• Needs for Safe Architecture • Specification of component properties (structural, behavioral, ...) • Identify violation of application properties in the assembly • Analysis of the interaction compatibility between components
9
1. Illustrating example (PHR)
10
1. Illustrating example (PHR)
Security : structural property
11
1. Illustrating example (PHR)
Security : structural property Authentication : behavioral property
1
2
12
1. Illustrating example (PHR)
Security : structural property Authentication : behavioral property High reliability : dataflow property
data.size<100Mb
13
1. Illustrating example (PHR)
Security : structural property Authentication : behavioral property High reliability : dataflow property Reactivity : QoS property
Time<20s
14
1. Illustrating example (PHR)
How to help the architect to identify inconsistency?
Security : structural property Authentication : behavioral property High reliability : dataflow property Reactivity : QoS property
15
1. Problems
• Existing static analysis tools are not suitable • Handle a subset of application properties • Are coupled with component or service models
How to provide a platform-independent approach supporting all kind of properties ?
16
2. Illustrating example (PHR)
PCclient
data2.size<2Mb
data1.size<3Gb data2=data1
assumption guarantee
PDAclient
Cache ImageServer
data2.size<4Gb Compatible Interaction
Partially Compatible Interaction (depends on runtime values)
Need to perform runtime debugging
17
2. Problems with existing tools
• Existing tools are not suitable • Break the continuity in the development process • Add assertions in the application code • Provide feedback at code level • Lose relation between the runtime errors and the design concepts
• Limited component platform support • Lack of static analysis tools • Lack of dynamic checking tools
To address these problems, we propose CALICO
18
Main results of CALICO: Component AssembLy Interaction Control framewOrk
1. CALICO Framework [MODeLS 2008]
2. CALICO model-level Unified framework for designing and analyzing application properties
• Structure design • Contractual application specifications • Contractual specifications composition
3. CALICO platform-level
19
CALICO Framework
20
1. CALICO Framework
2. CALICO model-level [QoSA2008] Unified framework for designing and analyzing application properties
• Structure design • Contractual application specifications • Contractual specifications composition
3. CALICO platform-level
21 Uniform approach for specifying contractual specifications
• Based on the assume-guarantee paradigm [Abadi-Lamport93] • Widely used in QoS • assume(P) = application properties required by P from its environment • guarantee(P) = application properties offered by P
• assume(P) → guarantee(P)
• Advantage of the assume-guarantee paradigm • Can be composed to compute the specification of an assembly • Can be analyzed statically
22
Application structure
Common elements in component and service models
• Entity : computational element • Component or service
• Connector: interaction between entities • Binding or partnerLink
• Communication point : access point of an entity that allows it to communicate • Port, interface or portType
• Communication element : action performed to communicate • Operation
• Argument : element exchanged between entities • Typed object or message
23
Application structure metamodel
24
Behavioral specification
Describe the workflow going in and out of the communication point
Assumption : expected behavior Guarantee : offered behavior
25
Assembly of entities
• Create the assembly of entities • Add connectors between entities • Check the assembly
– Need to compose the contractual specifications
Client GlobalSearch Access
26
Unified contract computation
• Contract = composition of specifications • C{P1 * P2} = SpecP1 ∘ SpecP2
– Pi: participant i – SpecPi : specification of Pi – ∘ : compositional operator (associative, commutative)
• Incremental computation • Specification of an assembly computed from the contract of this assembly
– Spec{P1 U P2} = f( C{P1 * P2} )
27
Contract composition order
• Contract composition = tree • Leaf : contractual specification written by the architect • Node : contractual specification of a sub part of the architecture • Root : contractual specification of the entire architecture
Client GlobalSearch Access
B1 B2 B3
B2,B3
B1,B2,B3
D1 D2 D3
D2,D3
D1,D2,D3
28
PHR example
29
Static interaction analysis
• CALICO's interaction analysis tool • Identify compatible, incompatible and partially compatible interaction • Is independent of any component platform
• Behavioral analysis • Based on existing process algebras (CSP, FSP, ...) • Creating the global CFG by synchronizing CFGs
• Dataflow analysis • Based on partial program validation • Forward propagation of the guarantees • Backward propagation of the assumptions
30
PHR example
31
PHR example
Forward propagation
32
PHR example
Forward propagation Backward propagation
33
Insertion of validation points where runtime checks are needed
PHR example
Forward propagation Backward propagation
V
V
34
1. CALICO Framework
2. CALICO model-level Unified framework for designing and analyzing application properties
• Structure design • Contractual application specifications • Contractual specifications composition
3. CALICO platform-level
35
Adding the missing functionality
• Lack of services for capturing runtime context • Few platforms are able to capture the required runtime information (trace) • Need to add the missing functionality for capturing runtime information
→ CALICO's code instrumentation tool • Instruments automatically the application code
– Capturing the trace : 3 aspects – send a trace, receive a trace, propagate the trace between components
• Generates and weaves aspects accordingly to the models • Is independent of any platform
36
Performing dynamic checking
• Loading of the running application • Generates the sequence of system construction operations • Translates them into calls to platform-specific API
• Need to complete the validation of partially compatible interactions • Check the runtime information
→ CALICO's dynamic validation tool • Receives runtime information • Analyzes it at the model-level • Provides design feedback to the architect • Is independent of any component platform
37
Fixing the errors
38
Conclusion
39
Towards full runtime....and adaptation
-> reification of the whole runtime system • manage the co-evolution of the abstract model and the running model
Abstract model
Execution model
- keep coherent structural modifications - on the ADL - on the running system
- keep an updated view of the specified properties and current contracts
40
Conclusion
• Model-level • Describes the software architecture (structure + properties) using models • Performs static interaction analysis • Is platform independent
• Platform-level • Holds the running system • Contains tools for loading the system • Adds missing services for capturing runtime information
• Couple model-level with platform-level • Capture runtime information at the model level • Locate model elements leading to runtime errors
http://calico.gforge.inria.fr
41
Questions ?
42
Towards full runtime....and adaptation
Calico : a framework that offers
- Coherent abstract models/views of an application from its construction to its execution/adaptation/evolution • Structure • Properties • Deployment • Execution context
- Not platform specific
- Verification supports (static and dynamic)
- Adaptation policies and mechanisms
43
7. Future work
• Handle more platforms • OpenCOM, SCA, Web Services, ...
• Support more kinds of properties and analyses • Behavioral protocol, QoS
http://calico.gforge.inria.fr
44
ADAM Adaptive Distributed Applications and Middleware
• Joint project-team INRIA, Univ. Lille 1 & CNRS since January 2008 • 2 Prof., 2 MCF, 1 CR, 1 MCF (secondment INRIA –Paris 6), 7 Ph.D students, 8 engineers
Scientific challenge • Definition of an Adaptation Model throughout the Software Lifecycle
• Adaptive Component Frameworks for Middleware & Services • Self-configurable components • A framework for composing, deploying, and executing heterogeneous components
• Distributed Applications Design for Adaptive Platforms • Adaptive languages for software architectures • Context-aware modelling for context-aware platforms
Scientific community animation • 25 program committees, 6 ws organisations, Board of GDR GPL
Scientific production • 10 articles, 41 papers, 2 book chapters
Software production • OW2 ecosystem: Suite Fractal - FAC, AOKell, Fraclet, Fractal Explorer, FraSCAti • INRIA ecosystem: Spoon, CALICO, DeployWare/FDF
Industrial transfer • DeployWare/FDF in JOnAS and JASMINe - Bull & in PEtALS - EBM WebSourcing
* PME
45
2. Problems
• Existing static analysis tools are not suitable • Handle a subset of application properties • Are coupled with component or service models
46
2. Problems
• Existing static analysis tools are not suitable • Handle a subset of application properties • Are coupled with component or service models
47
Aspects as first-class entities
47
object JAC, Spoon…
component AOKell
architecture FAC, TranSAT
48
Aspects in architecture & component FAC A programming model that merges AOSD
and CBSE
Notion of an aspect domain in a software architecture
aspect binding + aspect component + dynamic un/weaving
AOKell Engineering technical services for Fractal component-based applications • http://fractal.ow2.org/aokell • http://fac.gforge.inria.fr • France Telecom • [CBSE06, ARES 07, IJCAT 08] • [PhD Pessemier 07]
48
49 Adaptation throughout the software life cycle
49
FraSCAti Soleil FraSCAme TINAP
Software Systems
DeployWare
Adaptation at each step Development process - FAROS [Waignier] - SPL Cappucino [Parra] - Soleil [Plsek]
Transformation tools - Spoon [Noguera]
Architecture framework - CALICO [Waignier]
Runtime platforms - FraSCAti [Collective work] - FraSCAme [Romero] - Soleil [Plsek] - TINAP [Loiret]
Deployment - DeployWare [Dubus]
Maintenance - DECOR [Moha]
Formal Model Fractal/Alloy
Services/Fractal Embedded/Fractal
CALICO CaDSPL
50 Framework for software architecture evolution
• Collaborations INRIA/Triskell, I3S/Rainbow
• ANR FAROS • http://calico.gforge.inria.fr • [Models 08, QoSA 08] • [Ph.D Waignier expected end 09]
50
CALICO Component AssembLy Interaction Control framewOrk Model-based framework 2 levels: Model & PF
51
FraSCAti Marriage of SCA and Fractal
m
Client Server s m s
SCA Fractal
FraSCAti
Reflective SCA components
SOA for Fractal
Reflective introspection, management, reconfiguration
Reflective components Components for SOA
52
Loading the system
• Loading of the running application • Generates the sequence of system construction operations • Translates them into calls to platform-specific API
→ CALICO's application loader tool • Driven by the model-level specifications • Direct Mapping of the common structural elements
– Create/remove components/connectors • Mapping of validation point into adaptor component
– Generates adaptor component forwarding calls – Intercepts the runtime information – Generic approach for creating interceptors