250 likes | 366 Views
UML based Modeling and Performance Evaluation of Mobile Systems. Vincenzo Grassi 1 ,Raffaela Mirandola 2 ,Antonino Sabetta 1 (1) Università di Roma “Tor Vergata”, Italy { vgrassi|sabetta } @info.uniroma2.it (2) Politecnico di Milano, Italy mirandola@elet.polimi.it. VIII Workshop PISATEL
E N D
UML based Modeling and Performance Evaluationof Mobile Systems Vincenzo Grassi1,Raffaela Mirandola2,Antonino Sabetta1 (1) Università di Roma “Tor Vergata”, Italy {vgrassi|sabetta}@info.uniroma2.it (2) Politecnico di Milano, Italy mirandola@elet.polimi.it VIII Workshop PISATEL 6 dicembre 2005, Pisa
Outline • Introduction: motivation, previous work, approach • Modeling mobility • Physical mobility: locations and moving locations • Logical mobility: mobile software components • Dynamics of mobility: <<MobilityManager>> • Modeling performance • Annotated UML models: SPT + Mobility profile • Representing mobile code paradigms in UML • Code On Demand (COD) • Remote Evaluation (REV) • Mobile Agent (MA) • Performance Analysis based on UML models: an example • Conclusion V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Modeling mobility: related work • previous work • UML-based modeling • Class and Activity Diagram extension [Baumeister, Koch, Kosiuczenko, Wirsing – 2002]; Sequence Diagram extension [Kosiuczenko – 2003]; Activity Diagrams based [Balsamo, Marzolla – 2003]; … • formal languages • p-calculus [Milner – 1999]; ambient calculus [Cardelli, Gordon – 1998]; Klaim [De Nicola, Ferrari, Pugliese, Venneri – 1998]; mobile Unity [Picco, Roman, McCann – 2001];… V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Motivation and approach • Why modeling mobility and performance in UML? • Wide user- and tool-base • Extensibility • “Model Driven” approach • On the other hand…. • The UML standard specification does not natively support modeling mobility • Guidelines for our approach • "separation of concerns” • models of mobility (both physical and logical) separated from models of the application logic and of the system structure • ease “plug-and-play” of different mobility policies at the application modeling level, to support “what if” experiments • usability • lightweight UML extension • compliant with the UML 2.0 specification • only requires UML 2.0 compliant tools V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Outline • Introduction: motivation, previous work, approach • Modeling mobility • Physical mobility: locations and moving locations • Logical mobility: mobile software components • Dynamics of mobility: <<MobilityManager>> • Modeling performance • Annotated UML models: SPT + Mobility profile • Representing mobile code paradigms in UML • Code On Demand (COD) • Remote Evaluation (REV) • Mobile Agent (MA) • Performance Analysis based on UML models: an example • Conclusion V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Representing locations A B • locations • basic model : a nesting relationship between an entity and some container • B “is located at” A • location change • a modification of a nesting ("located at") relationship • C “is located at” A C “is located at” B A B C • What arelocations? • Physical places (rooms, buldings, vehicles, persons,….) • Execution environments (PCs, PDAs,…..) • What do they contain? • Physical places contain other physical places or execution env. • Execution environments contain software entities (agents, mobile components, code fragments...) V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Representing Locations with theUML Profile for Mobility <<Place>> Room_A : Room <<Place>> Room_B : Room <<Place>> Room_C : Room <<NodeLocation>> <<NodeLocation>> <<Mobile>> <<Place>> Mary : Person <<NodeLocation>> <<Mobile>> <<ExecEnv>> MyPda : PDA <<NodeLocation>> Room_A:… Room_B:… Room_C:… Mary:… MyPda:… V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Adding Dynamics to the Model State atOffice State atHome sleep(uniform(3h)) sleep(uniform(4h)) <<place>> Home : <<place>> Office : • MobilityManagersencapsulate all the“mobility logic”, keeping it strictly separate from the application logic • different mobility managers can be modularly plugged into the same system model, to describe different mobility scenarios and strategies • mainly a modeling abstraction, not necessarily a “real” entity <<NodeLocation>> <<NodeLocation>> <<mobile>> <<place>> Mary : Person <<NodeLocation>> <<place>> MyPda : PDA <<MobilityManager>> Mary_MobMan /<<moveActivity>>go(Mary, Office) / <<moveActivity>>go(Mary, Home) V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Representing Code Mobility (I) <<deploy>> <<AllowedDeployment>> <<CurrentDeployment>> <<deploy>> <<deploy>> <<place>> Home : Room <<place>> Office : Room <<NodeLocation>> <<mobile>> <<place>> Mary : Person <<NodeLocation>> <<NodeLocation>> <<ExecEnv>> MyPda : PDA <<ExecEnv>> srv : Server C1 : Comp <<MobileCode>> C3 : Comp C4 : Comp C2 : Comp V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Representing Code Mobility (II) Structural model <<ExecEnv>> MyPda : PDA <<ExecEnv>> srv : Server <<CurrentDeployment>> <<AllowedDeployment>> C1 : Comp <<MobileCode>> C2 : Comp [MyPda.locatedAt (Home)] event_E1 / <<Move>> REV(C1, somewhere) Behavioral model State B State A [MyPda.locatedAt (Office)] Event 4 / <<Move>> SomeMigrationAct( ) [SomeCondition] Event 3 / [SomeCondition] Event 2 / State C State D [C1.CurrentDeployment.BatteryLevel < 25%] event_E2 / <<Move>> MA(C1, somewhere_else) V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Outline • Introduction: motivation, previous work, approach • Modeling mobility • Physical mobility: locations and moving locations • Logical mobility: mobile software components • Dynamics of mobility: <<MobilityManager>> • Modeling performance • Annotated UML models: SPT + Mobility profile • Representing mobile code paradigms in UML • Code On Demand (COD) • Remote Evaluation (REV) • Mobile Agent (MA) • Performance Analysis based on UML models: an example • Conclusion V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Annotating UML modelswith performance characteristics • Adding performance annotations from the UML Profile for Schedulability, Performance and Time (SPT) Move <<ExecEnv>> MyPda : PDA <<PAhost>> PArate =…….. <<PAstep>> PAdelay =…….. PAprob = …… <<PAstep>> PAdemand =…….. <<Place>> Destination <<ExecEnv>> DestinationNode <<PhysicalMove>> Move <<LogicalMove>> REV <<MobileElement>> EntityToMove <<MobileCode>> Component V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Outline • Introduction: motivation, previous work, approach • Modeling mobility • Physical mobility: locations and moving locations • Logical mobility: mobile software components • Dynamics of mobility: <<MobilityManager>> • Modeling performance • Annotated UML models: SPT + Mobility profile • Representing mobile code paradigms in UML • Code On Demand (COD) • Remote Evaluation (REV) • Mobile Agent (MA) • Performance Analysis based on UML models: an example • Conclusion V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Modeling mobile code paradigms • “standard” paradigms to architect mobile code based applications [Fuggetta, Picco, Vigna - IEEE Trans. on Sw. Eng., 1998] • ‘stateless’ code mobility • code on demand (COD) • remote evaluation (REV) • code+state mobility • mobile agent (MA) both can be seenas “location aware” extensions of the client-server (CS) paradigm V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
From “Client Server” to “Code On Demand” <<PAstep>> PAdemand = ….f($M) <<PAstep>> PAdemand = ….f($M) <<MobileCode>> CodeToMigrate <<BeforeMove>> Prepare To Migrate <<MobileCode>> SomeComponent <<AfterMove>> PrepareToExec <<LogicalMove>> Migrate Code <<MobileCode>> SomeComponent Do Service Do Service <<PAstep>> PAdemand = ….f($M) <<LogicalMove>> COD(CodeToMigrate) Invoke Use Results Local Execution Environment Remote Execution Environment V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Modeling the “Remote Evaluation” paradigm <<MobileCode>> CodeToMigrate <<Place>> Destination <<PAstep>> PAdemand = ….f($M) <<PAstep>> PAdemand = ….f($M) <<BeforeMove>> Prepare To Migrate <<MobileCode>> SomeComponent <<LogicalMove>> Migrate Code <<MobileCode>> SomeComponent <<AfterMove>> PrepareToExec Do Service Do Service <<PAstep>> PAdemand = ….f($M) <<LogicalMove>> REV(CodeToMigrate,Destination) Invoke Use Results Local Execution Environment Remote Execution Environment V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Mobile Agents <<Place>> Destination <<LogicalMove>> MA(Destination) <<PAstep>> PAdemand = ….f($M) Invoke Here the semantics of the <<MoveActivity>> is different from that in the COD and REV examples! In this case the state moves, not only the code! <<BeforeMove>> Prepare To Migrate <<MobileCode>> SomeComponent <<LogicalMove>> Migrate Code <<MobileCode>> SomeComponent <<AfterMove>> PrepareToExec Do Service <<PAstep>> PAdemand = ….f($M) <<PAstep>> PAdemand = ….f($M) Use Results Local Execution Environment Remote Execution Environment V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Outline • Introduction: motivation, previous work, approach • Modeling mobility • Physical mobility: locations and moving locations • Logical mobility: mobile software components • Dynamics of mobility: <<MobilityManager>> • Modeling performance • Annotated UML models: SPT + Mobility profile • Representing mobile code paradigms in UML • Code On Demand (COD) • Remote Evaluation (REV) • Mobile Agent (MA) • Performance Analysis based on UML models: an example • Conclusion V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Case study: picture retrieval system (I) <<PAcontext>> Retrieve Pictures <<PAstep>> {PArep =$N} <<PAstep>> {PArep =$N} Send picture request Send picture index Show picture index Send view list <<PAstep>> {PArep =$N} [doFilter] Select pictures <<PAstep>> {PArep =$N} [doFilter=false] Select pictures PictureAgent Filter Database User <<PAstep>> {PAdemand =(ass, mean, f($r))} Send request for pictures <<PAstep>> {PArep =$N} Retrieve pictures User PictureAgent V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Case study: picture retrieval system (II) <<PAcontext>> Select Pictures [doFilter == true] <<PAstep>> {PAdemand =(ass, mean,f($r))} Send view list Send view list Send pictures <<PAstep>> {PAdemand =(ass, mean,f($r))} Send filtered list Send pictures <<PAstep>> {PAdemand =(ass, mean,f($r))} Show pictures Send select and discard list Send selected list Send selected Pictures to PA <<PAstep>> {PAdemand =(ass, mean,f($r))} Receive and Store pictures PictureAgent Filter Database User V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Static System model System model with physicaland logical mobile entities {PArate =…….} {PArate =…….} {PArate =…….} <<PAhost>> <<PAhost>> <<PAhost>> <<NodeLocation>> <<NodeLocation>> <<Place>> <<Place>> <<Allowed>> <<MobileCode>> <<NodeLocation>> <<deploy>> <<Allowed>> <<Allowed>> <<Mobile>> <<Allowed>> <<Allowed>> <<deploy>> <<MobileCode>> <<Allowed>> WLan Access Point WWan Access Point Internet <<ExecEnv>> Server2 LocA LocB <<deploy>> PictureAgent DB(2) <<ExecEnv>> PDA <<ExecEnv>> Server1 <<deploy>> DB(1) Filter V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Mobility managers <<PAstep>> {PAdelay =(‘ass’, ‘dist’, exp($λ1)} <<PhysicalMove>> Move(Pda, LocB) atLocB atLocA <<PhysicalMove>> Move(Pda, LocA) <<PAstep>> {PAdelay =(‘ass’, ‘dist’, exp($λ2)} sendPictureReq(DB($i)) / <<moveActivity>>REV(Filter,DB($i).CurrentDeployment) Idle sendPictureReq(DB($i)) /<<moveActivity>>MA(PictureAgent, DB($i).CurrentDepl); <<moveActivity>> REV(Filter, DB($i).CurrentDepl) Interacting with DB($i) [no more archives] / sendSelect&DiscardList() / Idle Interacting with DB($i) [no more archives] /<<moveActivity>> MA(PictureAgent,UserInterface.CurrentDeployment) sendSelect&DiscardList() / V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Outline • Introduction: motivation, previous work, approach • Modeling mobility • Physical mobility: locations and moving locations • Logical mobility: mobile software components • Dynamics of mobility: <<MobilityManager>> • Modeling performance • Annotated UML models: SPT + Mobility profile • Representing mobile code paradigms in UML • Code On Demand (COD) • Remote Evaluation (REV) • Mobile Agent (MA) • Performance Analysis based on UML models: an example • Conclusion V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Conclusion (I) • Our contribution • Representation of mobility in computer systems from a high level perspective… • ….by means of an extension of a mainstream de factostandard language • Mobility is described in a uniform way for both physical and logical entities • Modularity and separation of concerns allow to easily experiment with different scenarios and adaptation strategies based on code mobility • Integration of our profile with other pre-existing, well established profile for performance modeling (SPT) • It is primarily adescriptive technique for performance analysis of mobile systems • models built according to the proposed framework are meant as the input to third party performance analysis tools • Recent extension: automatic code generation (Jade,muCode) V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems
Conclusion (II) • Open Issues • Model transformation rules need to be defined in order to derive new models in suitable forms from descriptions made with our framework • In our paper we have shown a trivial rule (which is basically an inspection of the diagrams) that allows to make some comparisons between different mobile code strategies (provided some strong conditions hold, such as no competition) • Other transformation rules are documented in the literature (to produce QN, LQN, Petri Nets, Markovian models from UML annotated models). The research on this topic is still going on. • Future work • Definition of formalized transformation rules (maybe using relational or graph-transformation techniques) • Assess consistency between models resulting from different transformations (difficult task!) • Maybe some UML-specific rework is to be done on the definition of the profile when the final UML 2 specification is out V. Grassi, R. Mirandola, A. Sabetta – UML based Modeling and Performance Evaluation of Mobile Systems