1 / 21

Supporting Parallel Updates with Bidirectional Model Transformations

Supporting Parallel Updates with Bidirectional Model Transformations. Yingfei Xiong and Masato Takeichi University of Tokyo, Japan Song Hui Peking University, China Zhenjiang Hu National Institute of Informatics, Japan. Class. Table. Class. Class. Table. name = Book persistent= true.

mimir
Download Presentation

Supporting Parallel Updates with Bidirectional Model Transformations

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. Supporting Parallel Updates with BidirectionalModel Transformations YingfeiXiongand Masato Takeichi University of Tokyo, Japan Song Hui Peking University, China Zhenjiang Hu National Institute of Informatics, Japan

  2. Class Table Class Class Table name = Book persistent= true name = Book owner= admin name = Person persistent= true name = Purchase persistent= false name = Person owner= xiong Background: Bidirectional Transformation • Bidirectional transformation maintains the consistency between two models

  3. Forward Transformation Table Table name = Publication owner= xiong name = Book owner= xiong Class name = Publication persistent= true forward A forward transformation updates the target model according to the updated source

  4. Backward Transformation Table name = Publication owner= xiong Class Class name = Book persistent= true name = Publication persistent= true backward A backward transformation updates the source model according to the updated target

  5. Bidirectional Languages relation ClassAndTable { String name; enforce domain uml c:Class{ name=name; persistent=true; } enforce domain dbms t:Table{ name=name; owner=“admin”; } A QVT Program Forward Transformation Backward Transformation

  6. Class Table Class Class Table name = Publication persistent= true name = Book owner= Song name = Person persistent= true name = Purchase persistent= false name = User owner= xiong Parallel Updates • Both models may be updated before any transformation can be applied • Can we handle this using bidirectional transformation?

  7. Class Table Class Class Table name = Publication persistent= true name = Volume owner= admin name = Person persistent= true name = Purchase persistent= false name = Person owner= xiong Parallel Updates • Parallel updates may conflict

  8. How to Synchronize Parallel Updates • In this talk, I will introduce • formal requirements of synchronizing parallel updates • an approach that synchronizes parallel updates using bidirectional transformation with the help of model update representation and model difference approaches

  9. Class Table Class Table Class Table name = Publication persistent= true name = Publication owner= xiong name = Book persistent= true name = Book owner= xiong name = Publication persistent= true name = Book owner= admin Synchronizing Parallel Updates Original Models Updated Models sync Synchronized Models

  10. Class Table Class Table Class Table name = Publication persistent= true name = Book owner= xiong name = Book persistent= true name = Book owner= admin name = Publication persistent= true name = Publication owner= xiong Properties of Synchronizing Parallel Updates: Consistency sync Consistent Output models should be consistent according to the consistency relation R.

  11. Class Table Class Table Class Table name = Book persistent= true name = Book owner= admin name = Book persistent= true name = Book owner= admin name = Book persistent= true name = Book owner= admin Properties of Synchronizing Parallel Updates: Stability sync Equal Equal If no model is changed by users, no model should be changed by the synchronization.

  12. Class Class Table Class Table Table Table name = Book owner= admin name = Book persistent= true name = Publication owner= admin name = Book persistent= true name = Publication owner= admin name = Book persistent= true name = Book owner= admin Properties of Synchronizing Parallel Updates: Preservation sync Preserve name = Publication persistent= true The output model should preserve the user update.

  13. Class Class Class Class name = Volume persistent= true name = Book persistent= true name = Volume persistent= true name = Book persistent= true How to Define Update Preservation • Different updates may lead to the same result • Need to specify what updates we consider • Need to specify how to relate models to the updates rename insert delete

  14. Update Representation and Difference • Model Update Representation [Cicchetti08] • A space of updates • An operation to test whether two updates conflict • An operation compose to compose two non-conflicting updates on the same model • Model Difference [Alanen03,Abi06] • An operation diff to find update by comparing two models

  15. Class Class Class name = Volume persistent= true name = Book persistent= true name = Volume persistent= false Defining Update Preservation • We say that m preserves the update from ma to mbiff exists an update δ where • δ and diff(ma, mb)do not conflict • compose(δ, diff(ma, mb))(ma)=m ma rename diff(ma, mb) mb δ change persistent m

  16. How to Synchronize Parallel Update m n m’ n’ backward temp_m merge forward n’’ m’’ merge(m, m’, m’’) = compose(diff(m, m’), diff(m, temp_m))(m) reports an error when diff(m, m’) and diff(m, temp_m) conflict

  17. Class Table Class Table Class Class name = Book persistent= true name = Book persistent= false name = Book persistent= false name = Book owner= admin name = Book persistent= true name = Book owner= xiong Violating Preservation backward merge forward no element!

  18. Synchronization Algorithm m n m’ n’ backward temp_m test preservation merge forward n’’ m’’

  19. Relation between Properties • Bidirectional transformation properties [Stevens07] lead to synchronization properties Synchronizer forward forward backward backward Correctness Consistency Hippocraticness Stability Preservation

  20. Case Study: Runtime Management Framework High-Level Interface Synchronizer QVT Program Beanbag-based Update Representation and Difference Running System Available at: http://sei.pku.edu.cn/~songhui06/tool-case/rsa/case.html

  21. Conclusion • The requirement of synchronizing parallel updates can be defined through three properties • Consistency • Stability • Preservation • Using existing bidirectional transformations and update representation / model difference approaches, we can construct a synchronizer satisfying the three properties • A case study shows the feasibility of the approach

More Related