1 / 53

Wireless Software Components Design for Management with PauWare and WMX

Wireless Software Components Design for Management with PauWare and WMX. Fabien Romeo. Liuppa, Université de Pau. Agenda. Domain: CBSE applied to Wireless Systems Key Problem: Software Components Management PauWare: Executable Models Velcro: PauWare on Wireless Systems

cleave
Download Presentation

Wireless Software Components Design for Management with PauWare and WMX

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Wireless Software Components Design for Managementwith 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 • How to develop high-quality software in a fast and cost-effective way? • Software Components : • Reuse vs. Invent • Build vs. Create • Architecture • Infrastructure

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

  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 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 everyware software

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

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

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

  13. Research Agenda • Toward Open-World Software: Issues and Challenges (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 • Sensors • Controlling • Activators • What to monitor? • What to control? • Where is the line between the application and the management system? Management System sensors activators Application

  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 models • CBSE • Structural Models :architecture, composition, interfaces… • Technological Component Model (model = format) PIM PSM PSM PSM

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

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

  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. Light turnOff Off On On Off do / display turnOn Example : Light /* UML statecharts */ Statechart _On = new Statechart("On"); _On.doActivity(this,"display"); Statechart _Off = new Statechart("Off"); _Off.inputState(); /* PauWare engine */ 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. Light turnOff Off On On Off do / display turnOn PauWare Component Model « interface » Light functional interface turnOn() turnOff() Light « implement » « class » Light implementation class « service » turnOn() « service » turnOff() « action » display() _Light 1 _Composytor::Statechart_monitor

  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. TrafficLight Light Start goRed/ ^RedLight.turnOn Red turnOff entry: goRed RedLight:Light GreenLight:Light TrafficLight Off YellowLight:Light On On Off goRed/^RedLight.turnOn, ^YellowLight.turnOff do / display goGreen/ ^GreenLight.turnOn, ^RedLight.turnOff Yellow turnOn goYellow/^YellowLight.turnOn, ^GreenLight.turnOff Green Example : Traffic Light

  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) - 2003) • 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. TrafficLight TrafficLight Start goRed/ ^self.RedLight::turnOn Red entry: goRed « delegate » goRed/^self.RedLight::turnOn, ^self.YellowLight::turnOff goGreen/ ^self.GreenLight::turnOn, ^self.RedLight::turnOff Yellow RedLight:Light GreenLight:Light YellowLight:Light « delegate » goYellow/^self.YellowLight::turnOn, ^self.GreenLight::turnOff Green GreenLight:Light YellowLight:Light RedLight:Light « delegate » Example : Traffic Light

  28. Demo : Traffic Light

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

  30. Statechart WMX • Wireless Management eXtensions • http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/jmxperience.jsp • http://www.univ-pau.fr/~fromeo/wmx Unreliable Communication: Asynchronous Mode ? Interface de Management Controle Manager Monitor Replication ? Coherence ? What to transmit and how ? - Events ? - States ?

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

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

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

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

  35. Detailed Model «interface» Business Component functional interface service1() service2() «interface» Internal Pushed Sensor control_service1() control_service2() control_serviceX() «interface» External Pushed Sensor state_changed(transition) «interface» Internal Pulled Sensor guard1() guard2() «interface» External Pulled Sensor in(state) «require» «require» «require» «interface» Internal Effector service1() service2() serviceX() action0() action1() action2() action3() action4() «interface» External Effector execute(action) to_state(state) Business Component Internal Manager «require» «implement» «implement» «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() «class» Internal Manager implementation class control_service1() control_service2() control_serviceX() execute(action) to_state(state) in(state) 1 _Composytor::Statechart_monitor serviceX is not part of the functional interface since it is only sent internally

  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. GreenLight turnOff Off On On Off do / display turnOn YellowLight turnOff Off On On Off do / display turnOn States – Sub-states (1) RedLight turnOff Off On On Off do / display turnOn TrafficLight Start goRed/ ^RedLight.turnOn Red entry: goRed goRed/^RedLight.turnOn, ^YellowLight.turnOff goGreen/ ^GreenLight.turnOn, ^RedLight.turnOff Yellow goYellow/^YellowLight.turnOn, ^GreenLight.turnOff Green

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

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

  40. Composite Manager CompositeManager in(state) / ^managed.in(state) Control to_state(state) / ^managed.to_state(state) Monitor state_changed(transition) execute(action) / ^managed.execute(action) Undefined State Composition Defined State Composition part_state_changed / ^self.check [valid_state_guard] part_state_changed [not valid_state_guard] check / ^self.to_state(state) [consistency_guard] consistency_guard = [( !(state = compositeState1) && !(self.managedIn(compositeState1)) && part1Manager.managedIn(part1ComposedState1) && … && partNManager.managedIn(partNComposedState1) ) || … || ( !(state = compositeStateN) && !(self.managedIn(compositeStateN)) && part1Manager.managedIn(part1ComposedStateN) && … && partNManager.managedIn(partNComposedStateN) )] valid_state_guard = [( part1Manager.managedIn(part1ComposedState1) && … && partNManager.managedIn(partNComposedState1) ) || … || ( part1Manager.managedIn(part1ComposedStateN) && … && partNManager.managedIn(partNComposedStateN) )]

  41. Part Manager PartManager in(state) / ^managed.in(state) state_changed(transition) / ^CompositeManager.part_state_changed Monitor 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. Performances – Quantitative Study • Benchmark • 100.000 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. [PauWare] « Power is not a means, it is an end. » — George Orwell, Nineteen Eighty-Four 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, 21-25 may, 2007. (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, 2006. Code available athttp://www.pauware.com http://www.univ-pau.fr/~fromeo/wmx

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

  49. Librairie PauWare Event State-based programming support 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 run-to-completion model execution mode

  50. Exécution de modèles

More Related