model synchronization with the role oriented single
play

Model Synchronization with the Role-oriented Single Underlying Model - PowerPoint PPT Presentation

Model Synchronization with the Role-oriented Single Underlying Model Model Synchronization Multiple models express different concerns of interrelated trans concepts S T Interrelated concepts lead to much related models Related


  1. Model Synchronization with the Role-oriented Single Underlying Model

  2. Model Synchronization Multiple models express different concerns of interrelated • trans concepts S T Interrelated concepts lead to much related models • Related models: • Contain redundant information • Independently editing leads to inconsistencies • Solution: Defining model synchronizations between • S T interrelated models Unidirectional synchronization • Bidirectional synchronization • S T Model Synchronization with the Role-oriented Single Underlying Model Folie 2 Software Technology Group / Werner, Christopher MRT 2018 // 14.10.2018

  3. Model Synchronization at Runtime S T Currently often used: Manually triggering of the synchronization process • Batch updates of the whole model • U Specification of Synchronization rules at design time • Synchronization of two models • Runtime model synchronization: S T Automatically triggering of the synchronization process • RSUM (immediate and continuous updates at runtime) Incremental updates of small changes • Specification of models/views from the single underlying • model (SUM) at runtime (add and remove models/views at U runtime) Multiple models are views of underlying model • Model Synchronization with the Role-oriented Single Underlying Model Folie 3 Software Technology Group / Werner, Christopher MRT 2018 // 14.10.2018

  4. Why Model Synchronization at Runtime? Multiple related models in a self- • Change Evaluation adaptive software system Models Models This models must be hold • Analyze Plan consistent over time Analysis Models Knowledge Needs an efficient runtime • synchronization mechanism Monitor Execute Monitoring Systems Execution Models Models Models Managed Systems Model Synchronization with the Role-oriented Single Underlying Model Folie 4 Software Technology Group / Werner, Christopher MRT 2018 // 14.10.2018

  5. Roles in a Nutshell Natural Type Compartment Type Fills-Relation Association Role Type RoleGroup (n..m) Library Example [Kühn2014] Library SLUB:Library Context- name: String name=SLUB Dependent 0..* Bob:Person Children (1..1) name=Bob salary=30000 Manager Employee 1..* 0..1 Behavioral emp:Employee Alice:Person Person name=Alice salary=50000 Relational name: String man:Manager salary: Double Model Synchronization with the Role-oriented Single Underlying Model Folie 5 Software Technology Group / Werner, Christopher MRT 2018 // 14.10.2018

  6. Research Questions Library Goals: name: String Simplify model synchronization between multiple runtime models with a • 0..* single underlying model Children (1..1) Flexible and extensible single underlying model approach with runtime view • creation mechanisms Manager Employee 1..* 0..1 Requirements: 1. Incremental model synchronization 2. Runtime model synchronization Person name: String 3. Runtime creation of views salary: Double 4. Synchronization of multiple models 5. Integration of runtime models as views and elements in the single underlying model Model Synchronization with the Role-oriented Single Underlying Model Folie 6 Software Technology Group / Werner, Christopher MRT 2018 // 14.10.2018

  7. Running Example ModelA ModelB Two related models in the library and employee • context Combination to one single underlying models • Related models are now only views and are • automatically synchronized with the underlying model Combination: ModelA.Person = ModelB.Person ModelA.Employee = ModelB.Employee Model Synchronization with the Role-oriented Single Underlying Model Folie 7 Software Technology Group / Werner, Christopher MRT 2018 // 14.10.2018

  8. Overall Concept RSUM contains naturals, relational • OtherViews LibraryAndEmployeeView EmployeeAndManagerView OtherViews OtherViews compartments and management 1 0..1 1 0..* 0..* 1 compartment View Library Has Employee Employee HasManager 1 0..* RSUMManagement manages the • instances in the RSUM and the LibraryHasEmployee ManagerOfEmployee RsumManagement extensions +createView(query) 1 RoleGroup (1..1) 1 1 1 Extensions RSUMManager coordinates the role • Source Target Extensions Source Target Extensions bindings Extension … Runtime integration of new naturals, • relational compartments and RsumManager manager … Library employees Employee Person extensions possible 0..1 +manage() name salary name 0..* RSUM Traceability information over the play • relations Compartment n..m Role cardinality RoleGroup (n..m) Role n..m n..m Role n..m . . . Plays Relation Role Role Natural Relation Model Synchronization with the Role-oriented Single Underlying Model Folie 8 Software Technology Group / Werner, Christopher MRT 2018 // 14.10.2018

  9. Concept of Relational Compartments Relational compartments represent relations in the underlying model LibraryAndEmployeeView Advantages: 1 0..* 0..* 1 Library Has Employee 1. Loading relations at runtime (using class loader functionality from programming languages like Scala and Java) 2. Extending naturals with new relations at runtime (playing of roles in LibraryHasEmployee relational compartments) 1 1 Source Target 3. Add behavior and states to relations (methods and attributes in relational compartments) 4. n-ary relations (more role types in the relational compartment) Library employees Employee Limitations: name salary 0..* 1. One relational compartment for each instance pair RSUM 2. Management of play relations of instances Model Synchronization with the Role-oriented Single Underlying Model Folie 9 Software Technology Group / Werner, Christopher MRT 2018 // 14.10.2018

  10. Extension Mechanism Extension mechanism allows adding of new functionalities to the RSUM RsumManagement Use cases: +createView(query) Extensions History mechanism • Extensions Extensions Save changes over a period of time on one element Extension • Allows logging on specific elements • … Versioning mechanism RsumManager • +manage() Allows UNDO and REDO operations on single model elements • Library name Model Synchronization with the Role-oriented Single Underlying Model Folie 10 Software Technology Group / Werner, Christopher MRT 2018 // 14.10.2018

  11. Deep Views LibraryAndEmployeeView EmployeeAndManagerView 1 0..1 1 0..* 0..* 1 Library Has Employee Employee HasManager 0..* Runtime models that depend on 1 • other runtime models CompleteLibraryView Create a structure of deep views • 1 0..1 1 0..* 0..* 1 Library Has Employee HasManager Destruction of CompleteLibrary view • 0..* 1 also destroys the two other views Create a structure for the views • LibraryHasEmployee ManagerOfEmployee Insert a new abstraction layer • 1 RoleGroup (1..1) 1 1 1 Source Target Source Target manager Library employees Employee Person 0..1 name salary name 0..* RSUM Model Synchronization with the Role-oriented Single Underlying Model Folie 11 Software Technology Group / Werner, Christopher MRT 2018 // 14.10.2018

  12. Creation Process Process of adding a manager relation between two employee View RsumM:RsumManagement EaM: EaMView 1. Get the naturals of the employees from the RSUM E1:Employee 2 1 EM1:ManOfEmp 3 2. Create a new ManagerOfEmployee compartment in Er1: Employee name=Bob salary=60000 the RSUM 4 T1: Target Rm1: RsumManager 4 Mr1: HasManager 3 3. Bind the source and target roles to the used E2:Employee S1: Source 4 employees name=Alice 5 salary=45000 Er2: Employee Rm3: RsumManager 3 4. Create a new HasManager role in the view and 1 Rm2: RsumManager bind it to the new relational compartment 5. Add a new RsumManager role for the relational compartment in the RSUMManagement Model Synchronization with the Role-oriented Single Underlying Model Folie 12 Software Technology Group / Werner, Christopher MRT 2018 // 14.10.2018

  13. Implementation with SCROLL class Library ( _name : String ) { private var name : String = _name def getName (): String = name def setName (n: String): Unit = { SCala ROLes Language (SCROLL) [Leuthäuser2015] : name = n Role-based programming language • } Open source Scala library • } Implements most role features [Kühn2014] • Flexible, lightweight, and easily extensible • class LibraryRole ( name : String ) extends IViewRole { Compartments contain role graphs • def getNameView (): String = { return + this getName () Important operators: } “Play” binds a role to a player • def setNameView ( name : String ): Unit = { “+” operator before a method call performs a dynamic • dispatch to a suitable role played by the receiver + this setName (name) + this changeTrigger () Scala allows class loading for runtime integration of new } relational compartments, views, and extensions } Model Synchronization with the Role-oriented Single Underlying Model Folie 13 Software Technology Group / Werner, Christopher MRT 2018 // 14.10.2018

Recommend


More recommend