Presentation is loading. Please wait.

Presentation is loading. Please wait.

Wireless Software Components Design for Management with PauWare and WMX Fabien Romeo Liuppa, Université.

Similar presentations


Presentation on theme: "Wireless Software Components Design for Management with PauWare and WMX Fabien Romeo Liuppa, Université."— Presentation transcript:

1 Wireless Software Components Design for Management with PauWare and WMX Fabien Romeo Liuppa, Université de Pau

2 Agenda Domain: CBSE applied to Wireless Systems Key Problem: Software Components Management PauWare: Executable Models Velcro: PauWare on Wireless Systems WMX: Wireless Management Perspective: Autonomic Computing

3 Agenda Domain: CBSE applied to Wireless Systems Demo: Bean Builder Key Problem: Software Components Management PauWare: Executable Models Demo: Home Automation System Velcro: PauWare on Wireless Systems Demo: Traffic Light WMX: Wireless Management Demo: Traffic Light – Composition Management Perspective: Autonomic Computing

4 Component-Based Software Engineering Software Engineering : Quality – Time – Cost Quality – Time – Cost How to develop high-quality software in a fast and cost- effective way? Software Components : Reuse vs. Invent Build vs. Create Architecture Infrastructure

5 Component Software – Beyond Object-Oriented Oriented Programming Second Edition, Addison-Wesley (2002) Second Edition, Addison-Wesley (2002) —Szyperski, C., Gruntz, D., and Murer, S. Provided Services : API, pre / post conditions, Extra-functionnal aspects Required Services Low coupling, Late binding Elementary piece Definition «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. »

6 Component Model A simple example : JavaBeans « A Java Bean is a reusable software component that can be manipulated visually in a builder tool. » – JavaBeans Specification 1.01 Methods Properties (attributes) Events BeanInfo

7 Demo : Bean Builder https://bean-builder.dev.java.net/ Mini Browser ClockWork

8 Analysis / Problems Information on components Documentation Reflexion : structure Bugs : where does the problem comes ? NIH syndrome : it’s the COTS components fault! Blind Trust : it’s the in-house built components fault! Component sellers only provide error-proof components. Incompatibilities Incomplete modeling until assembly : how to get an internal model of COTS components?

9 Ubiquitous Computing Inside Numerous component models pect, koala, pecos, beanome, frogi, … Trends in computing International Data Corporation, Transition to the Information Highway Era, in Information Industry and Technology Update software everyware

10 Ubiquitous Computing Today Boom of Wireless Technologies Domotics And lots of other applications… But … Automobile

11 Mobile Phone Trouble Connect Magazine (June 2006) [www.connect.de] software electronics other keypad display case 42% 13% 10% 9% 7% 19% PERCENT OF MALFUNCTIONS

12 Car Trouble German Automobile Association ADAC electrical/ ignition systems* 32.1% 14.0% electronic systems engine 11.7% radiator/cooling systems 8.2% wheels or tires 7.0% fuel systems 6.3% injection systems* 6.1% gears/transmission 5.5% chassis* 4% other 5.1% *also contain electronics PERCENT OF MALFUNCTIONS

13 Research Agenda Toward Open-World Software: Issues and Challenges (IEEE Computer Magazine, October 2006): (IEEE Computer Magazine, October 2006): « A highly dynamic and open system necessitates runtime monitoring to watch for situations that might require suitable reactions to assure the desired level of global quality. […] As a result of monitoring, it should be possible to handle deviations from expected behaviors and plan for a reconfiguration. » I. Crnkovic, “Component-based Software Engineering for Embedded Systems,” in ICSE’05. A. Möller, J. Fröberg, and M. Nolin, “Industrial Requirements on Component Technologies for Embedded Systems,” in CBSE’04. —Luciano Baresi, Elisabetta Di Nitto, and Carlo Ghezzi

14 Application Management Monitoring SensorsControlling Activators What to monitor? What to control? Where is the line between the application and the management system? Management System Application sensorsactivators

15 Objectives Management of the components’ behavior Behavioral models available at runtime Remote and Wireless Access Execution on « light-weight » devices

16 MDA + CBSE MDA (Model-Driven Architecture) Model Centric Developpements Model Transformation UML : structural models and behavioral modelsCBSE Structural Models : architecture, composition, interfaces… Technological Component Model (model = format) PIM PSM

17 Statecharts [Harel 1987] : Statecharts = state-diagrams : XOR On Off create/stop/ restart/ destroy/ WaitProcess On request / WaitProcess On [Queue->isNotEmpty] / Listen request / Queue->add(client) + depth : hierarchie + orthogonality : AND + broadcast-communication : Asynchronous Communication Notation: ^signal

18 The PauWare Engine Power the execution of Statecharts models (simulation, verification, implementation) All-terrain Java Implementation (J2EE, J2SE et J2ME) Statecharts Model of the application dynamics PauWare Library PauWare Engine

19 The PauWare Library Declaration of states : Classes Statechart and Statechart_monitor Composition of states : XOR and AND operators Declaration of transitions : fires(String event, Statechart from, Statechart to, boolean guard, Object target, String action, Object[] args); Generation of events : _statechart_monitor.run_to_completion("event"); Statechart Statechart_monitor

20 Example : Light /* UML statecharts */ Statechart _On = new Statechart("On"); _On.doActivity(this,"display"); Statechart _Off = new Statechart("Off"); _Off.inputState(); /* PauWare engine */ OnOff Light turnOff turnOn On Off do / 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 */

21 Demo : Home Automation System + PauWareView

22 PauWare Component Model A State Machine Execution Engine (diagrammes UML 2) Model verification at development time Support for implementation Models persist at runtime State Machine  Components ? Structure-Behavior Binding (i.e. component-statechart) Support for horizontal composition and vertical composition (hierarchical)

23 PauWare Component Model « interface » Light functional interface turnOn() turnOff() Light « class » Light implementation class « service » turnOn() « service » turnOff() « action » display() OnOff Light turnOff turnOn On Off do / display _Composytor::Statechart_monitor 1_Light « implement »

24 Horizontal Composition Components have the same granularity Client / Server or Peer to Peer Provided Interfaces / Required Interfaces Low coupling Distributed Application Statecharts Communication by signal JMS, Message-Driven Bean

25 Example : Traffic Light TrafficLight Start entry: goRed Red Yellow Green goRed/ ^RedLight.turnOn goGreen/ ^GreenLight.turnOn, ^RedLight.turnOff goYellow/^YellowLight.turnOn, ^GreenLight.turnOff goRed/^RedLight.turnOn, ^YellowLight.turnOff RedLight:LightGreenLight:LightYellowLight:LightTrafficLight OnOff Light turnOff turnOn On Off do / display

26 Vertical Composition (De)composition composite/compound Hierarchie (cf. Fractal) A higher coupling Life-cycle Dependances, encapsulation, … Theoretical Foundations Revised formalization of aggregation and composition in UML (IEEE TSE 29(5) et 29(11) ) State Machines of compound components integrated into the 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)));

27 Example : Traffic Light TrafficLight Start entry: 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:LightYellowLight:LightRedLight:Light TrafficLight RedLight:Light YellowLight:Light GreenLight:Light « delegate »

28 Demo : Traffic Light

29 Velcro PauWare (java.lang.reflect) PauWare (java.lang.reflect) Velcro java.lang.reflect PauWare Velcro

30 WMX Wireless Management eXtensions Manager Statechart Interface de Management Controle Monitor Replication ? Coherence ? What to transmit and how ? - Events ? - States ? Unreliable Communication: Asynchronous Mode ?

31 Coherence of statecharts (1) On Off Component turnOff [component.temperature < 40] turnOn On Off On Off Component turnOff [component.temperature < 40] turnOn On Off event turnOff component.temperature = 43 turnOff Unknown? Application Side Management Side And we don’t want to send low states (attributes) Forwarding events causes problems with guards

32 Coherence of statecharts (2) On Off Component turnOff [component.temperature < 40] turnOn On Off On Off Component On Off transition turnOff component.temperature = 43 Application Side Management Side as we still don’t want to send low states (attributes)… If we forward the transitions…

33 Coherence of statecharts (3) On Off Component turnOff [component.temperature < 40] turnOn On Off On Off Component On Off transition turnOff component.temperature = 39 Application Side Management Side  On  Off we didn’t have to send low states (attributes) … the statecharts are synchronized … because the internal manager did it for us…

34 UML Modeling Managed Component Business Component Internal Manager provided interface required interface external effector external pushed sensor external pulled sensor external application port external management port internal effector internal pulled sensor internal pushed sensor internal management port internal management port

35 Detailed Model «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

36 Composition Management Desynchronization of automates (example : Traffic Light) Undetectable Error by Model Checking It is supposed to work Shows the possibility to define management policies based on the replicated statechart

37 States – Sub-states (1) TrafficLight Start entry: goRed Red Yellow Green goRed/ ^RedLight.turnOn goGreen/ ^GreenLight.turnOn, ^RedLight.turnOff goYellow/^YellowLight.turnOn, ^GreenLight.turnOff goRed/^RedLight.turnOn, ^YellowLight.turnOff OnOff GreenLight turnOff turnOn On Off do / display OnOff RedLight turnOff turnOn On Off do / display OnOff YellowLight turnOff turnOn On Off do / display

38 States – Sub-states (2) TrafficLight Start entry: goRed Red Yellow Green goRed/ ^RedLight.turnOn goGreen/ ^GreenLight.turnOn, ^RedLight.turnOff goYellow/^YellowLight.turnOn, ^GreenLight.turnOff goRed/^RedLight.turnOn, ^YellowLight.turnOff OnOff GreenLight turnOff turnOn On Off do / display OnOff YellowLight turnOff turnOn On Off do / display OnOff RedLight turnOff turnOn On Off do / display

39 States – Sub-states (3) TrafficLight Start entry: goRed Red Yellow Green goRed/ ^RedLight.turnOn goGreen/ ^GreenLight.turnOn, ^RedLight.turnOff goYellow/^YellowLight.turnOn, ^GreenLight.turnOff goRed/^RedLight.turnOn, ^YellowLight.turnOff OnOff YellowLight turnOff turnOn On Off do / display OnOff GreenLight turnOff turnOn On Off do / display OnOff RedLight turnOff turnOn On Off do / display

40 Composite Manager Monitor Control state_changed(transition) to_state(state) / ^managed.to_state(state) execute(action) / ^managed.execute(action) part_state_changed [not valid_state_guard] Undefined State Composition Defined State 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) )]

41 Part Manager Monitor state_changed(transition) / ^CompositeManager.part_state_changed in(state) / ^managed.in(state) Control to_state(state) / ^managed.to_state(state) execute(action) / ^managed.execute(action)

42 Demo : Traffic Light Composition Management with WMX

43 Towards Autonomic Computing Cf. Cyril Ballagny’s on-going thesis…

44 Performances? Deployed on a HP iPAQ hx4700 JVM IBM J9 Complex Case Studies : Home automation system Railcar System (J2EE + JMS) …, your system

45 ImplementationBenchmarkOverhead per state change Pure Java2 ms0 μs Java + reflect API14 ms0,12 μs JMX (internal access)721ms7,19 μs PauWare (w/o cache)1491 ms14,89 μs PauWare (w cache)1027 ms10,25 μs Velcro (w/o cache)1529 ms15,27 μs Velcro (w cache)1038 ms10,36 μs Following implementations include I/O or networking Pure Java + System.out.print()2584 ms25,82 μs WMX (velcro + sockets)3893 ms38,91 μs JMX + RMI connector22077ms220,75 μs Performances – Quantitative Study Benchmark loops of state changes (adaptated from JAC Benchmark) Intel Centrino 1600MHz, 512 Mo RAM, WinXP, JVM 1.5 SUN

46 Conclusion PauWare Components driven by executable statecharts But also a framework for experimenting research results in MDA, CBSE, … Velcro + WMX Management of the software components’ behavior in the context of wireless systems SELF-* Liuppa Project Perspectives Integration into other component models (OSGi, Fracal, …) Persistance at runtime of other types of models, (other views for management) Autonomic Computing (Cyril)

47 Thank you for reading! Fabien Romeo, Franck Barbier, Jean-Michel Bruel, Autonomic Management of Component-Based Embedded Software, IFIP/IEEE Symposium on Integrated Management, Munich, Germany, may, (to appear) Fabien Romeo, Franck Barbier, Jean-Michel Bruel, Autonomic Management of Component-Based Embedded Software, IFIP/IEEE Symposium on Integrated Management, Munich, Germany, may, (to appear) Fabien Romeo, Cyril Ballagny, Franck Barbier, PauWare : un modèle de composant basé état, Actes des Journées Composants, Canet en Roussillon, France, 4-6 octobre, pp. 1-10, Fabien Romeo, Cyril Ballagny, Franck Barbier, PauWare : un modèle de composant basé état, Actes des Journées Composants, Canet en Roussillon, France, 4-6 octobre, pp. 1-10, Code available athttp://www.pauware.com Code available athttp://www.pauware.com « Power is not a means, it is an end. » — George Orwell, Nineteen Eighty-Four [PauWare]

48 Demo Wireless Components (J2ME) Management Communication (WMA) Management Console (JMX)

49 Librairie PauWare public void f_c() throws Statechart_exception { _Programmable_thermostat.fires(_Ambient_temperature_displaying,_Ambient_temp erature_displaying); _Programmable_thermostat.fires(_Target_temperature_displaying,_Target_temperat ure_displaying,true,this,"switch_mode"); _Programmable_thermostat.fires(_Program_target_temperature_refreshing,_Progra m_target_temperature_refreshing,true,this,"switch_mode"); _Programmable_thermostat.run_to_completion(); } UML-2 run-to-completion model execution mode Event State-based programming support

50 Exécution de modèles

51 Demo off/ ^programmable thermostat.season switch turned off Is cool Is heat Is on cool heat Is off cool heat Season switch Is on Is auto on/ ^programmable thermostat.fan switch turned on Fan switch auto

52 Conception des composants Exemple des UML 2.0 Components (source : UML2.0 Superstructure)

53 Un composant composite (source : UML2.0 Superstructure)


Download ppt "Wireless Software Components Design for Management with PauWare and WMX Fabien Romeo Liuppa, Université."

Similar presentations


Ads by Google