[email protected] DAIS, Paphos, Cyprus, 6 June 2007 Observability and Controllability of...
-
Upload
iyanna-stansfield -
Category
Documents
-
view
217 -
download
0
Transcript of [email protected] DAIS, Paphos, Cyprus, 6 June 2007 Observability and Controllability of...
[email protected] www.fromeo.fr 1
DAIS, Paphos, Cyprus, 6 June 2007
Observability and Controllability of Observability and Controllability of Wireless Software ComponentsWireless Software Components
Fabien RomeoFabien Romeo
Liuppa, Université de PauLiuppa, Université de Pau
[email protected] www.fromeo.fr 2
DAIS, Paphos, Cyprus, 6 June 2007
BackgroundBackgroundComponent-Based Software Engineering (CBSE)Component-Based Software Engineering (CBSE)
«A software component is a unit of composition with contractually specified interfaces and explicit context dependencies only. A software component can be deployed independently and is subject to composition by third parties. » — Szyperski et al (2002).
CBSE applied to Wireless Systems (WS)CBSE applied to Wireless Systems (WS)WS are heterogeneous systems and software componentization allows adaptationWS are dynamic and open systems, and as such, they often use Service-Oriented Architecture, which relies on software components (eg. OSGi bundles)
[email protected] www.fromeo.fr 3
DAIS, Paphos, Cyprus, 6 June 2007
The need for management in WSThe need for management in WSToward Open-World Software: Issues and ChallengesToward Open-World Software: Issues and Challenges
(IEEE Computer Magazine, October 2006):(IEEE Computer Magazine, October 2006):« A highly dynamic and open system necessitates « A highly dynamic and open system necessitates
runtime monitoringruntime monitoring to watch for situations that to watch for situations that might require suitable reactions to assure the might require suitable reactions to assure the desired level of global quality. […] As a result of desired level of global quality. […] As a result of monitoring, it should be possible to handle deviations monitoring, it should be possible to handle deviations from from expected behaviorsexpected behaviors and plan for a and plan for a reconfigurationreconfiguration. ». »
I. Crnkovic, “Component-based Software Engineering for Embedded I. Crnkovic, “Component-based Software Engineering for Embedded Systems,” in ICSE’05.Systems,” in ICSE’05.A. Möller, J. Fröberg, and M. Nolin, “Industrial Requirements on A. Möller, J. Fröberg, and M. Nolin, “Industrial Requirements on Component Technologies for Embedded Systems,” in CBSE’04.Component Technologies for Embedded Systems,” in CBSE’04.
——Luciano Baresi, Elisabetta Di Nitto, and Carlo GhezziLuciano Baresi, Elisabetta Di Nitto, and Carlo Ghezzi
[email protected] www.fromeo.fr 4
DAIS, Paphos, Cyprus, 6 June 2007
Management in CBSEManagement in CBSEMaintaining component-based systems is a difficult Maintaining component-based systems is a difficult problem – Voas (1998)problem – Voas (1998)
Black-boxes, in particular COTS componentsNo communication between providers and assemblersManagement is often an after-thought
Three kinds of approaches in the literature:Three kinds of approaches in the literature:based on the components’ infrastructure
Lifecycle management, low-level states (attributes) access
based on the application’s architectureComponents reify the architecture, control by replacement
based on the components’ behaviorExternal observations are confronted against behavior models
[email protected] www.fromeo.fr 5
DAIS, Paphos, Cyprus, 6 June 2007
Our proposalOur proposalA runtime management infrastructureA runtime management infrastructure
Address the internal behavior of software components Wireless remote accessDeployment on constrained devices (PDA, mobile phones, …)
Model-Driven Engineering philosophyModel-Driven Engineering philosophyThe components’ behavior is designed with UML State MachinesDirect execution and control of components’ behavior by their internal managers which embed a PauWare Model Execution EngineThe same models designed at development time are retrieved at runtime for management purpose
[email protected] www.fromeo.fr 6
DAIS, Paphos, Cyprus, 6 June 2007
Wireless Software Component’s Wireless Software Component’s ArchitectureArchitecture
Managed Component
BusinessComponent
InternalManager
provided interface
required interface
externaleffector
externalpushedsensor
externalpulledsensor
externalapplication
port
externalmanagement
port
internal effector
internal pulled sensor
internal pushed sensor
internalmanagement
port
internalmanagement
port
[email protected] www.fromeo.fr 7
DAIS, Paphos, Cyprus, 6 June 2007
StatechartsStatecharts
[Harel 1987] :[Harel 1987] : Statecharts = Statecharts = state-diagrams : XOR
On Offcreate/ stop/
restart/
destroy/
Wait Process
On
request /
Wait Process
On
[Queue->isNotEmpty] /
Listen
request / Queue->add(client)
+ depth : hierarchie
+ orthogonality : AND
+ broadcast-communication :Asynchronous Communication
Notation: ^signal
[email protected] www.fromeo.fr 8
DAIS, Paphos, Cyprus, 6 June 2007
The PauWare EngineThe PauWare Engine
Power the execution of Statecharts modelsPower the execution of Statecharts models(simulation, verification, implementation)(simulation, verification, implementation)
All-terrain Java Implementation (J2EE, J2SE et J2ME)
Statecharts
Model of the application dynamics
PauWare Library
PauWare Engine
[email protected] www.fromeo.fr 9
DAIS, Paphos, Cyprus, 6 June 2007
The PauWare LibraryThe PauWare Library
Declaration of states :Declaration of states :Classes Statechart and Statechart_monitor
Composition of states :Composition of states :XOR and AND operators
Declaration of transitions :Declaration of transitions :fires(String event, Statechart from, Statechart to, boolean guard, Object target, String action, Object[] args);
Generation of events :Generation of events :_statechart_monitor.run_to_completion("event");
Statechart
Statechart_monitor
[email protected] www.fromeo.fr 10
DAIS, Paphos, Cyprus, 6 June 2007
Example : LightExample : Light/* UML statecharts */Statechart _On = new Statechart("On");_On.doActivity(this,"display");
Statechart _Off = new Statechart("Off");_Off.inputState();
/* PauWare engine */
On Off
LightturnOff
turnOn
On Offdo / display
Statechart_monitor _Light = new Statechart_monitor(_On.xor(_Off),"Light");
/* UML transitions */_Light.fires("turnOn",_Off,_On);_Light.fires("turnOff",_On,_Off);
/* UML events */public void turnOn() throws Statechart_exception { _Light.run_to_completion("turnOn");} public void turnOff() throws Statechart_exception { _Light.run_to_completion("turnOff");}
/* the code is incomplete */
[email protected] www.fromeo.fr 11
DAIS, Paphos, Cyprus, 6 June 2007
PauWare Component ModelPauWare Component Model« interface »
Light functional interface
turnOn()turnOff()
Light
« class »Light implementation class
« service » turnOn()« service » turnOff()
« action » display()
On Off
LightturnOff
turnOn
On Offdo / display
_Composytor::Statechart_monitor
1_Light
« implement »
Internal Manager1
_StateMachine
[email protected] www.fromeo.fr 12
DAIS, Paphos, Cyprus, 6 June 2007
PauWare PauWare → → WMXWMXPauWare with JMX provides a management PauWare with JMX provides a management framework for non-wireless componentsframework for non-wireless componentsToo much for constrained devicesToo much for constrained devices
PauWareJava Reflexion MechanismsJMXWeb ServerNot feasible
Java ME
[email protected] www.fromeo.fr 13
DAIS, Paphos, Cyprus, 6 June 2007
WMXWMXWireless Management eXtensionsWireless Management eXtensions
http://wmx.fromeo.frhttp://wmx.fromeo.fr
Manager
Statechart
Management InterfaceControle
Monitor
Application SideManagement Side
Java ME Java SE
[email protected] www.fromeo.fr 14
DAIS, Paphos, Cyprus, 6 June 2007
Demo : Traffic LightDemo : Traffic Light
[email protected] www.fromeo.fr 15
DAIS, Paphos, Cyprus, 6 June 2007
WMX: new problemsWMX: new problemsWireless Management eXtensionsWireless Management eXtensions
http://wmx.fromeo.frhttp://wmx.fromeo.fr
Manager
Statechart
Management InterfaceControle
Monitor
Replication ?Coherence ?
What to transmit and how ? - Events ? - States ?
Unreliable Communication:Asynchronous Mode ?
[email protected] www.fromeo.fr 16
DAIS, Paphos, Cyprus, 6 June 2007
Coherence of statecharts (1)Coherence of statecharts (1)
On Off
Component
turnOff [component.temperature < 40]
turnOn
On Off On Off
Component
turnOff [component.temperature < 40]
turnOn
On Offevent
turnOff
component.temperature = 43
turnOff
Unknown?
Application Side Management Side
And we don’t want to sendlow-level states (attributes)
Forwarding events causesproblems with guards
[email protected] www.fromeo.fr 17
DAIS, Paphos, Cyprus, 6 June 2007
Coherence of statecharts (2)Coherence of statecharts (2)
On Off
Component
turnOff [component.temperature < 40]
turnOn
On Off On Off
Component
On Offtransition
turnOff
component.temperature = 43
Application Side Management Side
as we still don’t want to sendlow-level states (attributes)…
If we forward the transitions…
[email protected] www.fromeo.fr 18
DAIS, Paphos, Cyprus, 6 June 2007
Coherence of statecharts (3)Coherence of statecharts (3)
On Off
Component
turnOff [component.temperature < 40]
turnOn
On Off On Off
Component
On Offtransition
turnOff
component.temperature = 39
Application Side Management Side
On Off
we didn’t have to sendlow-level states (attributes)
… the statecharts are synchronized …
because the internal managerhandled them for us…
[email protected] www.fromeo.fr 19
DAIS, Paphos, Cyprus, 6 June 2007
Composition ManagementComposition Management
Desynchronization of automatesDesynchronization of automates(example : Traffic Light)(example : Traffic Light)
Undetectable Error by Model CheckingUndetectable Error by Model CheckingIt is supposed to work
Shows the possibility to define management Shows the possibility to define management policies based on the replicated statechartpolicies based on the replicated statechart
[email protected] www.fromeo.fr 20
DAIS, Paphos, Cyprus, 6 June 2007
States – Sub-states (1)States – Sub-states (1)
TrafficLight
Startentry: goRed Red
Yellow
Green
goRed/^RedLight.turnOn
goGreen/^GreenLight.turnOn,
^RedLight.turnOff
goYellow/^YellowLight.turnOn,^GreenLight.turnOff
goRed/^RedLight.turnOn,^YellowLight.turnOff
On Off
GreenLightturnOff
turnOn
On Offdo / display
On Off
RedLightturnOff
turnOn
On Offdo / display
On Off
YellowLightturnOff
turnOn
On Offdo / display
[email protected] www.fromeo.fr 21
DAIS, Paphos, Cyprus, 6 June 2007
States – Sub-states (2)States – Sub-states (2)
TrafficLight
Startentry: goRed Red
Yellow
Green
goRed/^RedLight.turnOn
goGreen/^GreenLight.turnOn,
^RedLight.turnOff
goYellow/^YellowLight.turnOn,^GreenLight.turnOff
goRed/^RedLight.turnOn,^YellowLight.turnOff
On Off
GreenLightturnOff
turnOn
On Offdo / display
On Off
YellowLightturnOff
turnOn
On Offdo / display
On Off
RedLightturnOff
turnOn
On Offdo / display
[email protected] www.fromeo.fr 22
DAIS, Paphos, Cyprus, 6 June 2007
States – Sub-states (3)States – Sub-states (3)
TrafficLight
Startentry: goRed Red
Yellow
Green
goRed/^RedLight.turnOn
goGreen/^GreenLight.turnOn,
^RedLight.turnOff
goYellow/^YellowLight.turnOn,^GreenLight.turnOff
goRed/^RedLight.turnOn,^YellowLight.turnOff
On Off
YellowLightturnOff
turnOn
On Offdo / display
On Off
GreenLightturnOff
turnOn
On Offdo / display
On Off
RedLightturnOff
turnOn
On Offdo / display
[email protected] www.fromeo.fr 23
DAIS, Paphos, Cyprus, 6 June 2007
Composite ManagerComposite ManagerCompositeManager
Monitor
Control
state_changed(transition)
to_state(state) / ^managed.to_state(state)
execute(action) / ^managed.execute(action)
part_state_changed [not valid_state_guard]
UndefinedState
Composition
DefinedState
Composition
part_state_changed/ ^self.check[valid_state_guard]
check/ ^self.to_state(state)[consistency_guard]
in(state) / ^managed.in(state)
valid_state_guard = [( part1Manager.managedIn(part1ComposedState1)
&& … && partNManager.managedIn(partNComposedState1) )
|| … || ( part1Manager.managedIn(part1ComposedStateN)
&& … && partNManager.managedIn(partNComposedStateN) )]
consistency_guard = [( !(state = compositeState1) &&
!(self.managedIn(compositeState1))
&& part1Manager.managedIn(part1ComposedState1)
&& … && partNManager.managedIn(partNComposedState1) )
|| … || ( !(state = compositeStateN) && !(self.managedIn(compositeStateN))
&& part1Manager.managedIn(part1ComposedStateN)
&& … && partNManager.managedIn(partNComposedStateN) )]
[email protected] www.fromeo.fr 24
DAIS, Paphos, Cyprus, 6 June 2007
Part ManagerPart Manager
PartManager
Monitorstate_changed(transition)/ ^CompositeManager.part_state_changed
in(state) / ^managed.in(state)
Control to_state(state) / ^managed.to_state(state)
execute(action) / ^managed.execute(action)
[email protected] www.fromeo.fr 25
DAIS, Paphos, Cyprus, 6 June 2007
Performances?Performances?
Deployed on a HP iPAQ hx4700Deployed on a HP iPAQ hx4700JVM IBM J9
Complex Case Studies :Complex Case Studies :Home automation system
Railcar System (J2EE + JMS)
…, your system Railcar
new destination(another terminal)
alert80(terminal,railcar,is clockwise)/ ^my next possible stop.approaching(terminal,railcar,is clockwise) Wait for alert80
entry/ ^cruiser.set Engaged20
Wait for terminal order
Arriving
Cruising entry/ ^cruiser.set Engaged80
terminal crossing
Stopped on railway
Stopped at terminal exit/ ^cruiser.set Engaged20
go on/ ^cruiser.set Engaged20
go
stop/ ^cruiser.set Disengaged
alert100(terminal,railcar,is clockwise)
terminal stopping/ ^cruiser.set Disengaged
Idle entry/ unset my current railcar
terminal crossing(terminal,railcar,is clockwise)/ ^railcar.terminal crossing
Busy entry/ ^clockwise ingoing vehicle.stop, ^counterclockwise ingoing vehicle.stop
approaching(terminal,railcar,is clockwise)/ set my current railcar(is clockwise)
Terminal alert100(terminal,railcar,is clockwise) new destination(another terminal)
time-out(30000)/ ^timer.to be killed, ^my current railcar.go,
^clockwise ingoing vehicle.go on, ^counterclockwise ingoing vehicle.go on
terminal stopping(terminal,railcar,is clockwise)/ ^timer.to be set(30000), ^my current railcar.terminal stopping
approaching(terminal,railcar,is clockwise)
Railcar new destination(another terminal)
alert80(terminal,railcar,is clockwise)/ ^my next possible stop.approaching(terminal,railcar,is clockwise) Wait for alert80
entry/ ^cruiser.set Engaged20
Wait for terminal order
Arriving
Cruising entry/ ^cruiser.set Engaged80
terminal crossing
Stopped on railway
Stopped at terminal exit/ ^cruiser.set Engaged20
go on/ ^cruiser.set Engaged20
go
stop/ ^cruiser.set Disengaged
alert100(terminal,railcar,is clockwise)
terminal stopping/ ^cruiser.set Disengaged
Railcar new destination(another terminal)
alert80(terminal,railcar,is clockwise)/ ^my next possible stop.approaching(terminal,railcar,is clockwise) Wait for alert80
entry/ ^cruiser.set Engaged20
Wait for terminal order
Arriving
Cruising entry/ ^cruiser.set Engaged80
terminal crossing
Stopped on railway
Stopped at terminal exit/ ^cruiser.set Engaged20
go on/ ^cruiser.set Engaged20
go
stop/ ^cruiser.set Disengaged
alert100(terminal,railcar,is clockwise)
terminal stopping/ ^cruiser.set Disengaged
Idle entry/ unset my current railcar
terminal crossing(terminal,railcar,is clockwise)/ ^railcar.terminal crossing
Busy entry/ ^clockwise ingoing vehicle.stop, ^counterclockwise ingoing vehicle.stop
approaching(terminal,railcar,is clockwise)/ set my current railcar(is clockwise)
Terminal alert100(terminal,railcar,is clockwise) new destination(another terminal)
time-out(30000)/ ^timer.to be killed, ^my current railcar.go,
^clockwise ingoing vehicle.go on, ^counterclockwise ingoing vehicle.go on
terminal stopping(terminal,railcar,is clockwise)/ ^timer.to be set(30000), ^my current railcar.terminal stopping
approaching(terminal,railcar,is clockwise)
Idle entry/ unset my current railcar
terminal crossing(terminal,railcar,is clockwise)/ ^railcar.terminal crossing
Busy entry/ ^clockwise ingoing vehicle.stop, ^counterclockwise ingoing vehicle.stop
approaching(terminal,railcar,is clockwise)/ set my current railcar(is clockwise)
Terminal alert100(terminal,railcar,is clockwise) new destination(another terminal)
time-out(30000)/ ^timer.to be killed, ^my current railcar.go,
^clockwise ingoing vehicle.go on, ^counterclockwise ingoing vehicle.go on
terminal stopping(terminal,railcar,is clockwise)/ ^timer.to be set(30000), ^my current railcar.terminal stopping
approaching(terminal,railcar,is clockwise)
Idle entry/ unset my current railcar
terminal crossing(terminal,railcar,is clockwise)/ ^railcar.terminal crossing
Busy entry/ ^clockwise ingoing vehicle.stop, ^counterclockwise ingoing vehicle.stop
approaching(terminal,railcar,is clockwise)/ set my current railcar(is clockwise)
Terminal alert100(terminal,railcar,is clockwise) new destination(another terminal)
time-out(30000)/ ^timer.to be killed, ^my current railcar.go,
^clockwise ingoing vehicle.go on, ^counterclockwise ingoing vehicle.go on
terminal stopping(terminal,railcar,is clockwise)/ ^timer.to be set(30000), ^my current railcar.terminal stopping
approaching(terminal,railcar,is clockwise)
T 1
C lo c k w ise
C o u n te rc lo c k w ise
T 2 T 4
T 3
R 1
R 2
R 3
[email protected] www.fromeo.fr 26
DAIS, Paphos, Cyprus, 6 June 2007
Implementation Benchmark Overhead per state change
Pure Java 2 ms 0 μsJava + reflect API 14 ms 0,12 μsJMX (internal access) 721ms 7,19 μsPauWare (w/o cache) 1491 ms 14,89 μsPauWare (w cache) 1027 ms 10,25 μsVelcro (w/o cache) 1529 ms 15,27 μsVelcro (w cache) 1038 ms 10,36 μs
Following implementations include I/O or networkingPure Java + System.out.print() 2584 ms 25,82 μs
WMX (velcro + sockets) 3893 ms 38,91 μsJMX + RMI connector 22077ms 220,75 μs
Performances – Quantitative StudyPerformances – Quantitative StudyBenchmarkBenchmark
100.000 loops of state changes (adapted from JAC Benchmark)
Intel Centrino 1600MHz, 512 Mo RAM, WinXP, JVM 1.5 SUN
[email protected] www.fromeo.fr 27
DAIS, Paphos, Cyprus, 6 June 2007
ConclusionConclusionPauWarePauWare
Components driven by executable statechartsBut also a framework for experimenting research results in MDA, CBSE, …
Velcro + WMXVelcro + WMXManagement of the software components’ behavior in the context of wireless systems
PerspectivesPerspectivesIntegration into other component models (OSGi, Fractal, …)Persistence at runtime of other types of models, (other views for management)Autonomic Computing: a solution to put the human on the loop…
[email protected] www.fromeo.fr 28
DAIS, Paphos, Cyprus, 6 June 2007
Thank you for listening!Thank you for listening!
Fabien Romeo, Franck Barbier, Jean-Michel Bruel, Fabien Romeo, Franck Barbier, Jean-Michel Bruel, Observability and Controllability of Wireless Software ComponentsObservability and Controllability of Wireless Software Components, , 7th IFIP Conference on Distributed Applications and Interoperable 7th IFIP Conference on Distributed Applications and Interoperable Systems, Paphos, Cyprus, 5-8 june, 2007.Systems, Paphos, Cyprus, 5-8 june, 2007.
Code available atCode available at http://www.pauware.com http://www.pauware.com http://wmx.http://wmx.fromeofromeo.fr.fr
« Power is not a means, it is an end. » — George Orwell, Nineteen Eighty-Four
[PauWare]
[email protected] www.fromeo.fr 30
DAIS, Paphos, Cyprus, 6 June 2007
VelcroVelcro
PauWare(java.lang.reflect)
PauWare(java.lang.reflect) VelcroVelcro
java.lang.reflect
PauWare
Velcro
[email protected] www.fromeo.fr 31
DAIS, Paphos, Cyprus, 6 June 2007
Horizontal CompositionHorizontal Composition
Components have the same granularityComponents have the same granularityClient / Server or Peer to Peer
Provided Interfaces / Required InterfacesProvided Interfaces / Required Interfaces
Low couplingLow coupling
Distributed ApplicationDistributed Application
Statecharts Communication by signalStatecharts Communication by signalJMS, Message-Driven Bean
[email protected] www.fromeo.fr 32
DAIS, Paphos, Cyprus, 6 June 2007
Example : Traffic LightExample : Traffic Light
TrafficLight
Startentry: goRed Red
Yellow
Green
goRed/^RedLight.turnOn
goGreen/^GreenLight.turnOn,
^RedLight.turnOff
goYellow/^YellowLight.turnOn,^GreenLight.turnOff
goRed/^RedLight.turnOn,^YellowLight.turnOff
RedLight:Light
GreenLight:Light
YellowLight:LightTrafficLight
On Off
LightturnOff
turnOn
On Offdo / display
[email protected] www.fromeo.fr 33
DAIS, Paphos, Cyprus, 6 June 2007
Vertical CompositionVertical Composition(De)composition composite/compound(De)composition composite/compound
Hierarchie (cf. Fractal)
A higher couplingA higher couplingLife-cycle Dependances, encapsulation, …
Theoretical FoundationsTheoretical FoundationsRevised formalization of aggregation and composition in UML (IEEE TSE 29(5) et 29(11) - 2003)
State Machines of compound components integrated into the State Machines of compound components integrated into the State Machine of the composite as concurrent macro states :State Machine of the composite as concurrent macro states :
public class Light extends _PauWare.Composable {/* ... */}Light redLight, yellowLight, greenLight;Statechart_monitor trafficLight = new Statechart_monitor(redLight.state_machine() .and(yellowLight.state_machine()) .and(greenLight.state_machine()) .and(start.xor(red).xor(yellow).xor(green)));
[email protected] www.fromeo.fr 34
DAIS, Paphos, Cyprus, 6 June 2007
Example : Traffic LightExample : Traffic LightTrafficLight
Startentry: goRed Red
Yellow
Green
goRed/^self.RedLight::turnOn
goGreen/^self.GreenLight::turnOn,
^self.RedLight::turnOff
goYellow/^self.YellowLight::turnOn,^self.GreenLight::turnOff
goRed/^self.RedLight::turnOn,^self.YellowLight::turnOff
GreenLight:Light
YellowLight:Light
RedLight:Light
TrafficLight
RedLight:Light
YellowLight:Light
GreenLight:Light
« delegate »
« delegate »
« delegate »
[email protected] www.fromeo.fr 35
DAIS, Paphos, Cyprus, 6 June 2007
PauWare Component ModelPauWare Component Model
A State Machine Execution Engine A State Machine Execution Engine (diagrammes UML 2)(diagrammes UML 2)
Model verification at development time
Support for implementation
Models persist at runtime
State Machine State Machine Components ? Components ?Structure-Behavior Binding(i.e. component-statechart)
Support for horizontal composition and vertical composition (hierarchical)
[email protected] www.fromeo.fr 36
DAIS, Paphos, Cyprus, 6 June 2007
PauWare Component ModelPauWare Component Model« interface »
Light functional interface
turnOn()turnOff()
Light
« class »Light implementation class
« service » turnOn()« service » turnOff()
« action » display()
On Off
LightturnOff
turnOn
On Offdo / display
_Composytor::Statechart_monitor
1_Light
« implement »
[email protected] www.fromeo.fr 37
DAIS, Paphos, Cyprus, 6 June 2007
Behavior modeled with StatechartsBehavior modeled with Statecharts
Managed Component
S11entry: action1
S2entry: action3
S10entry: action0
S12entry: action2
SB
SA
S3service2 serviceX / action4
service1
service1
service2 service2
service2 [guard1] / ^self.serviceX service2 [guard2] / action1
with (guard1 => not guard2) and (guard2 => not guard1)
[email protected] www.fromeo.fr 38
DAIS, Paphos, Cyprus, 6 June 2007
Detailed ArchitectureDetailed Architecture
«require»
«require»
«require»
«require»
«class»Business component implementation class
«service» service1() «service» service2() «service» serviceX() «action» action0() «action» action1() «action» action2() «action» action3() «action» action4() «guard» guard1() «guard» guard2()
Business Component
«implement»
«interface»Business Component functional interface
service1() service2()
serviceX is not part of the functional interface since it is only sent internally
1
«class»Internal Manager implementation class
control_service1() control_service2() control_serviceX() execute(action) to_state(state) in(state)
«implement»
_Composytor::Statechart_monitor
«interface»Internal Pushed Sensor
control_service1() control_service2() control_serviceX()
«interface»Internal Pulled Sensor
guard1() guard2()
«interface»Internal Effector
service1() service2() serviceX() action0() action1() action2() action3() action4()
«interface»External Pushed Sensor
state_changed(transition)
«interface»External Pulled Sensor
in(state)
«interface»External Effector
execute(action) to_state(state)
Internal Manager
[email protected] www.fromeo.fr 39
DAIS, Paphos, Cyprus, 6 June 2007
DemoDemo
Wireless Components(J2ME)
Management Communication(WMA) Management Console
(JMX)
[email protected] www.fromeo.fr 40
DAIS, Paphos, Cyprus, 6 June 2007
PauWare LibraryPauWare Library
public void f_c() throws Statechart_exception {
_Programmable_thermostat.fires(_Ambient_temperature_displaying,_Ambient_temperature_displaying);
_Programmable_thermostat.fires(_Target_temperature_displaying,_Target_temperature_displaying,true,this,"switch_mode");
_Programmable_thermostat.fires(_Program_target_temperature_refreshing,_Program_target_temperature_refreshing,true,this,"switch_mode");
_Programmable_thermostat.run_to_completion();
}
UML-2 UML-2 run-to-completionrun-to-completion model execution modemodel execution mode
EventEvent State-based State-based programming supportprogramming support
[email protected] www.fromeo.fr 42
DAIS, Paphos, Cyprus, 6 June 2007
DemoDemo
off/^programmable thermostat.season switch
turned off
Is cool
Is heat
Is on
cool
heatIs off
cool
heat
Season switch
Is on
Is auto
on/^programmable thermostat.fan switch turned
on
Fan switch
auto
[email protected] www.fromeo.fr 43
DAIS, Paphos, Cyprus, 6 June 2007
Demo : Home Automation SystemDemo : Home Automation System
+ PauWareView
[email protected] www.fromeo.fr 44
DAIS, Paphos, Cyprus, 6 June 2007
MDA + CBSEMDA + CBSE
MDA (Model-Driven Architecture)MDA (Model-Driven Architecture)Model Centric DeveloppementsModel TransformationUML : structural models and behavioral models
CBSECBSEStructural Models :architecture, composition, interfaces…Technological Component Model (model = format)
PIM
PSM PSMPSM
[email protected] www.fromeo.fr 45
DAIS, Paphos, Cyprus, 6 June 2007
Application ManagementApplication Management
MonitoringMonitoringSensors
ControllingControllingActivators
What to monitor?What to monitor?What to control?What to control?Where is the line between the applicationWhere is the line between the application and the management system? and the management system?
Management System
Application
sensors activators
[email protected] www.fromeo.fr 46
DAIS, Paphos, Cyprus, 6 June 2007
Towards Autonomic ComputingTowards Autonomic Computing
Cf. Cyril Ballagny’s on-going thesis…