220 likes | 302 Views
Towards Dynamic Resource Contractualisation for Software Components. Nicolas Le Sommer VALORIA Laboratory / University of South Brittany Nicolas.Le-Sommer@univ-ubs.fr. Plan. Context and problematic A framework for the contractualisation of resources The RAJE environment
E N D
Towards Dynamic Resource Contractualisation for Software Components Nicolas Le Sommer VALORIA Laboratory / University of South Brittany Nicolas.Le-Sommer@univ-ubs.fr
Plan Context and problematic A framework for the contractualisation of resources The RAJE environment The JAMUS platform Conclusion Perspectives 2 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh
Context Software components are emerging as the new fundamental architectural elements in the software industry. Development of application programs should be reduced to the selection and the assembling of pre-existing off-the-shelf components. Development of programs should be made without knowing the implementation details of components (''black box'' approach). 3 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh
Context Functional and non-functional properties of components must be perfectly defined The current models of software components do not provide functionalities to describe all non-functional properties of components Example : EJB (Enterprise Java Beans) and CCM (Corba Component Model) only take properties of persistence, transaction an security into account Non-functional properties of components pertaining to resources are not defined in models of components 4 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh
Heterogeneity of resource requirements 5 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh • Requires small amount of resources • Any guarantee regarding resource availability • Requires important amount of resources • Requires guarantees regarding the resource availability
Motivations To design software components able to describe their resource requirements dynamically perceive their execution context in order to adapt their behaviour to this context To design deployment environments able to know the resources they have To determinate whether components can –or cannot– be deployed take resource requirements of components into account To provide resource availability guarantees to components in order that components can provide quality of service to users control resources used by components dynamically To check whether components use resources as expected 6 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh
Contractual and Reflexive Approach Contractual Approach Aims at defining and at managing behavioural dependencies between components and their deployment environment Dependencies pertain to resource access conditions Reflexive Approach Aims at allowing components To analyse their execution conditions using contracts To define (to modify) their runtime conditions by negotiating (renegotiating) their contracts with their deployment environment To adapt their behaviour according to the contract terms 7 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh
Framework Architecture of the framework Contract management Layer 2 Admission control Component monitoring Management of resources Monitoring of resources Layer 1 Resource reification 8 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh
RAJE RAJE : Resource-Aware Java Environment Developed by specializing the first layer of the framework Based on the Kaffe virtual machine Provides facilities to reify resources as objects to monitor resources and to perform resource access control to track all resources created by components at runtime to select precisely the resources that must be monitored or managed 9 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh
Monitoring and access control in RAJE Resource monitoring in RAJE relies on A polling-based scheme A notification-based scheme observe() SocketObservationReport lock()/unlock() 11 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh SocketObserver#1 Socket write(data) checkWrite(quotas) Composant SocketObserver#2 addListener(this) • Resource access control in RAJE relies on • A locking-based scheme • An interposition-based scheme SocketObserver#1 Socket exception Composant checkWrite(quotas) write(data) SocketObserver#2 addListener(this)
JAMUS JAMUS : Java Accommodation of Mobile Untrusted Software Implemented as a specialization of the second layer of the framework Platform dedicated to the hosting of untrusted codes Relies on the RAJE environment Every component that applies for being hosted must negotiate with the platform a contract defining its resource access conditions Each component accepted to run is systematically monitored at runtime To check whether components respect their contract (their resource access conditions) 12 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh
Contracts pertaining to resources newFilePattern("/tmp") newFilePermission(FilePermission.ALL) newFileQuota(30* Mo, 12*Mo) newBestEffort() Resource pattern Permissions Quotas Allocation mode clause#3 clause#1 clause#2 <filesystem> <directoryname="/tmp" permissions="ALL" read_quota="12" read_unit="MBytes" write_quota="30" write_unit="MBytes" availability_constraints = "BestEffort" /> </filesystem> clause#4 clause#5 13 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh Contract
Contract renegotiation clause#7 clause#6 Modification Addition clause#6 clause#2 clause#7 clause#3 clause#1 clause#4 clause#5 14 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh Amendment Modification#1 Ajout#1 Contract
Negotiation of contracts JamusCM Resource Broker Component submit(contrat1) canAdmit(clauses1) no no submit(contrat2) canAdmit(clauses2) ok ok subscribe(contrat2) canAdmit(clauses2) ok reserve(clauses2) 15 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh
Supervision of contracts addListener(this) addResource(this) newResource(socket) newResource(socket) new Socket (...) getMonitors() [Monitors] read (...) addListener(this) checkRead (...) new FileMonitor (...) new SocketMonitor (...) SocketMonitor FileMonitor ResourceAccessException 16 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh container ResourceRegister ResourceTracker Component socket ComponentMonitor
Conclusion A framework that defines the structure of resource contractualisation systems 2 prototypes implemented with our framework RAJE Provides facilities to monitor resources and to perform resource access control JAMUS Supports dynamic contractualisation of resources Performs dynamic monitoring of components 17 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh
Heterogeneity of deployment platforms Software heterogeneity Unix (Linux, xxxBSD, ...) Windows (95,98, NT, 2000, XP, Pocket PC, ...) PalmOS, Symbian, QNX, .... • Hardware heterogeneity CPU ≈ 3 Ghz Memory≈ 512 Mo Disk ≈ 80 Go CPU ≈ 3 Ghz Memory ≈ 1 Go Disk ≈ 250 Go CPU ≈ 100 Mhz Memory ≈ 10 Mo CPU ≈ 400 Mhz Memory ≈ 128 Mo 19 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh
Architecture of JAMUS 20 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh Container Manager Contract Manager Container Resource Broker Component Monitoring RAJE
JAMUS GUI 21 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh
JAMUS GUI 22 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh
JAMUS GUI 23 NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh