analyze data contention for modernizing transactional
play

Analyze Data Contention for Modernizing Transactional Software - PowerPoint PPT Presentation

Extending the Palladio Component Model to Analyze Data Contention for Modernizing Transactional Software Towards Service-Orientation | November 5 th 2015 @ SSP 2015 Philipp Merkle (KIT, Karlsruhe), Holger Knoche (CAU, Kiel) SOFTWARE DESIGN AND


  1. Extending the Palladio Component Model to Analyze Data Contention for Modernizing Transactional Software Towards Service-Orientation | November 5 th 2015 @ SSP 2015 Philipp Merkle (KIT, Karlsruhe), Holger Knoche (CAU, Kiel) SOFTWARE DESIGN AND QUALITY GROUP INSTITUTE FOR PROGRAM STRUCTURES AND DATA ORGANIZATION, FACULTY OF INFORMATICS KIT – University of the State of Baden-Wuerttemberg and www.kit.edu National Research Center of the Helmholtz Association

  2. Modernizing towards Service-Orientation Travel Travel Booking Booking Modernization Hotel Flight Booking Booking Travel Database Hotels Flights Database Database Monolithic application Component-based, service-oriented application 1/14 2015-11-05 Merkle, Knoche: Modernizing Transactional Software Towards Service- Software Design and Quality Group Orientation Institute for Program Structures and Data Organization

  3. Different Ways to Isolate Concurrent Transactions Isolation prevents concurrent transactions from mutually overriding their data Classical „ pessimistic “ way Lock data before reading/writing write A commit TX 1 Waiting time impacts performance wait for A write A TX 2 Service-oriented „ optimistic “ way Pretend there is no concurrent data access … … until access conflict actually happens  abort + retry Abort often uses compensation Try-Cancel-Confirm compensation TX 1 book flight commit operation book hotel book flight cancel hotel TX 2 Sorry, no free seats left 2/14 2015-11-05 Merkle, Knoche: Modernizing Transactional Software Towards Service- Software Design and Quality Group Orientation Institute for Program Structures and Data Organization

  4. Modernization Revisited Network overhead Travel Travel Booking Booking Modernization Hotel Flight Booking Booking Travel Additional Database Database Call(s) Hotels Flights Database Database Transaction duration increased by network + database overheads Locks held longer (Pessimistic) Increased Data contention Impact on system performance?  PCM Higher abort risk (Optimistic) 3/14 2015-11-05 Merkle, Knoche: Modernizing Transactional Software Towards Service- Software Design and Quality Group Orientation Institute for Program Structures and Data Organization

  5. Transactions with the PCM – Status Quo RDSEFF reserveSeat : 4/14 2015-11-05 Merkle, Knoche: Modernizing Transactional Software Towards Service- Software Design and Quality Group Orientation Institute for Program Structures and Data Organization

  6. Transactions with the PCM – Status Quo RDSEFF reserveSeat : Why not to use Passive Resources for Transaction Modeling: Modeler needs to be expert with locking schemes Chosen locking scheme scattered over multiple RDSEFFs Locking granularity: row or page level impractical Locking mode: shared mode impractical … 5/14 2015-11-05 Merkle, Knoche: Modernizing Transactional Software Towards Service- Software Design and Quality Group Orientation Institute for Program Structures and Data Organization

  7. PCM.TX Overview Cross-Cutting: Transaction Boundaries Explicit Context (Database) Dependencies Separate Schema Specification from Compensation Behaviour Application „Try -Cancel-Confirm “ Behaviour Component Specification Queries (Transaction Boundaries) Data Access (Compensation Behaviour) Schema Definition Database Table Deployment 6/14 2015-11-05 Merkle, Knoche: Modernizing Transactional Software Towards Service- Software Design and Quality Group Orientation Institute for Program Structures and Data Organization

  8. Separate Schema Specification from Component Specification Problem: If components refer to tables directly, they need modification whenever the schema changes! Solution: Decouple schema and component specification Entity Type Repository Application Person Address … Entity Type Entity Type Data Access Schema Definition components Person+Address Table require entity types (rather than tables) Person Address Database Entity Type Entity Type Component Repository Hotel Flight Booking Booking 7/14 2015-11-05 Merkle, Knoche: Modernizing Transactional Software Towards Service- Software Design and Quality Group Orientation Institute for Program Structures and Data Organization

  9. Explicit Context (Database) Dependencies “ A software component is a unit of composition with contractually specified interfaces and explicit context dependencies only ” [Szyperski 2002 Facilitates Reuse of Component Specifications Component’s dependence upon entity types is a context dependency Approach: Reuse PCM Resource Interfaces [Hauck et al. 2009] Application Data Access Database 8/14 2015-11-05 Merkle, Knoche: Modernizing Transactional Software Towards Service- Software Design and Quality Group Orientation Institute for Program Structures and Data Organization

  10. Schema Definition & Table Deployment Table Deployment Application Data Access Database Schema Definition 9/14 2015-11-05 Merkle, Knoche: Modernizing Transactional Software Towards Service- Software Design and Quality Group Orientation Institute for Program Structures and Data Organization

  11. Queries So far: InternalActions require processing resources (CPU, HDD) PCM.TX: InternalActions may additionally require entities Application Data Access Database Number of entities described as PCMRandomVariable, hence a… Constant Probability distribution function Function of (call/component) parameters 10/14 2015-11-05 Merkle, Knoche: Modernizing Transactional Software Towards Service- Software Design and Quality Group Orientation Institute for Program Structures and Data Organization

  12. Queries – Dependency Groups dependency group myQuery Schema Definition Person+Address Table <Person> <Address> Application Person Address Entity Type Entity Type Data Access How many rows from the Person+Address Table are accessed? Database Case 1: 50 rows, if each address belongs to one of the 50 persons  assign entity accesses to same dependency group Case 2: 100 rows, if there is no correspondence between the addresses and persons  no dependency (default case) 11/14 2015-11-05 Merkle, Knoche: Modernizing Transactional Software Towards Service- Software Design and Quality Group Orientation Institute for Program Structures and Data Organization

  13. Transaction Boundaries Annotate transactional SEFFs („ declarative “ approach) Scope determines what happens when SEFF S1 calls S2 Case 1: Two separate transactions, one for S1, one for S2 (NEW) Case 2: A joint transaction (JOIN) Application Data Access Database Scope MANUAL for fine-grained transaction demarcation, together with Commit/Abort 12/14 2015-11-05 Merkle, Knoche: Modernizing Transactional Software Towards Service- Software Design and Quality Group Orientation Institute for Program Structures and Data Organization

  14. Compensation,Try-Cancel-Confirm Compensation behaviour executes when its corresponding transaction aborts Application Data Access Database Confirmation behaviour executes when its corresponding transaction succeeds 13/14 2015-11-05 Merkle, Knoche: Modernizing Transactional Software Towards Service- Software Design and Quality Group Orientation Institute for Program Structures and Data Organization

  15. Conclusion and Future Work PCM.TX adds transaction and database modeling to the PCM Allows to evaluate design decisions specific to transactional information systems  evaluate impact of migration towards service-orientation Future Work Simulation of PCM.TX models in EventSim Non-uniformely distributed data accesses Sharding (horizontal partitioning of tables) 14/14 2015-11-05 Merkle, Knoche: Modernizing Transactional Software Towards Service- Software Design and Quality Group Orientation Institute for Program Structures and Data Organization

  16. References [Szyperski 2002] C. Szyperski, D. Gruntz, and S. Murer. Component Software: Beyond Object-Oriented Programming . ACM Press and Addison-Wesley, New York, 2 edition, 2002. [Hauck et al. 2009] M. Hauck, M. Kuperberg, K. Krogmann, and R. Reussner. Modelling Layered Component Execution Environments for Performance Prediction. In Proceedings of the 12th International Symposium on Component Based Software Engineering (CBSE 2009), number 5582 in LNCS, pages 191{208. Springer, 2009. 15/14 2015-11-05 Merkle, Knoche: Modernizing Transactional Software Towards Service- Software Design and Quality Group Orientation Institute for Program Structures and Data Organization

  17. Backup Slides 16/14 2015-11-05 Merkle, Knoche: Modernizing Transactional Software Towards Service- Software Design and Quality Group Orientation Institute for Program Structures and Data Organization

  18. PCM Resource Interfaces 17/14 2015-11-05 Merkle, Knoche: Modernizing Transactional Software Towards Service- Software Design and Quality Group Orientation Institute for Program Structures and Data Organization

Recommend


More recommend