towards dynamic resource contractualisation for software components nicolas le sommer valoria...
TRANSCRIPT
Towards Dynamic Resource Contractualisation
for Software Components
Nicolas Le Sommer VALORIA Laboratory / University of South Brittany
Plan
Context and problematic
A framework for the contractualisation of resources
The RAJE environment
The JAMUS platform
Conclusion
Perspectives
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 2
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).
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 3
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
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 4
Heterogeneity of resource requirements
● Requires small amount of resources
● Any guarantee regarding resource availability
● Requires small amount of resources
● Any guarantee regarding resource availability
● Requires important amount of resources
● Requires guarantees regarding the resource availability
● Requires important amount of resources
● Requires guarantees regarding the resource availability
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 5
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 expectedNLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 6
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
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 7
Framework
Architecture of the framework
Contract management
Admission control Component monitoringLayer 2
Resource reification
Monitoring of resources Management of resources
Layer 1
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 8
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
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 9
Monitoring and access control in RAJE
Resource monitoring in RAJE relies on
A polling-based scheme
A notification-based scheme Socket
SocketObserver#1observe()
SocketObservationReport
Composant
write(data)
SocketObserver#2addListener(this)
checkWrite(quotas)
Resource access control in RAJE relies on
A locking-based scheme
An interposition-based schemeSocket
SocketObserver#1lock()/unlock()
Composant write(data)
SocketObserver#2addListener(this)
checkWrite(quotas)
exception
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 11
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)
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 12
Contracts pertaining to resources
clause#1 clause#2
clause#5 clause#4
clause#3
Contract
new FilePattern ("/tmp") new FilePermission(FilePermission.ALL)new FileQuota(30* Mo, 12*Mo)new BestEffort()
new FilePattern ("/tmp") new FilePermission(FilePermission.ALL)new FileQuota(30* Mo, 12*Mo)new BestEffort()
<filesystem> <directory name="/tmp" permissions="ALL" read_quota="12" read_unit="MBytes" write_quota="30" write_unit="MBytes"
availability_constraints = "BestEffort" /></filesystem>
<filesystem> <directory name="/tmp" permissions="ALL" read_quota="12" read_unit="MBytes" write_quota="30" write_unit="MBytes"
availability_constraints = "BestEffort" /></filesystem>
Resource pattern
PermissionsQuotasAllocation mode
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 13
Contract renegotiation
clause#1 clause#2
clause#5 clause#4
Contract
clause#3
Modification#1
clause#7
Ajout#1
clause#6
Amendment
clause#7
Modification
clause#6
Addition
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 14
Negotiation of contracts
Component
submit(contrat1)
JamusCM
canAdmit(clauses1)
Resource Broker
submit(contrat2)canAdmit(clauses2)
okok
nono
subscribe(contrat2) canAdmit(clauses2)
ok
reserve(clauses2)
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 15
Supervision of contracts
ResourceRegister
ResourceTracker
ComponentMonitor
socketComponent
addListener(this)
newResource(socket)
addResource(this)
SocketMonitor
new SocketMonitor (...)
FileMonitor
new FileMonitor (...)
new Socket (...)
read (...)
checkRead (...)
addListener(this)
newResource(socket)
getMonitors()
ResourceAccessException
container
[Monitors]
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 16
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
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 17
Heterogeneity of deployment platforms
Software heterogeneity
Unix (Linux, xxxBSD, ...)
Windows (95,98, NT, 2000, XP, Pocket PC, ...)
PalmOS, Symbian, QNX, ....
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 19
Hardware heterogeneity
CPU ≈ 100 MhzMemory ≈ 10 Mo
CPU ≈ 400 MhzMemory ≈ 128 Mo
CPU ≈ 3 GhzMemory≈ 512 MoDisk ≈ 80 Go
CPU ≈ 3 GhzMemory ≈ 1 GoDisk ≈ 250 Go
Architecture of JAMUS
RAJE
Con
tain
er
Resource Broker Component Monitoring
Contract Manager
Container Manager
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 20
JAMUS GUI
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 21
JAMUS GUI
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 22
JAMUS GUI
NLS/VALORIA/UBS Component Deployment 2004 -- Edinburgh 23