Analyze Data Contention for Modernizing Transactional Software - - PowerPoint PPT Presentation

analyze data contention for modernizing transactional
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

KIT – University of the State of Baden-Wuerttemberg and National Research Center of the Helmholtz Association SOFTWARE DESIGN AND QUALITY GROUP INSTITUTE FOR PROGRAM STRUCTURES AND DATA ORGANIZATION, FACULTY OF INFORMATICS

www.kit.edu

Extending the Palladio Component Model to

Analyze Data Contention for Modernizing Transactional Software Towards Service-Orientation

Philipp Merkle (KIT, Karlsruhe),

| November 5th 2015 @ SSP 2015

Holger Knoche (CAU, Kiel)

slide-2
SLIDE 2

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

Modernizing towards Service-Orientation

Travel Database Travel Booking

Modernization

Hotels Database Hotel Booking Travel Booking Flight Booking Flights Database

Monolithic application Component-based, service-oriented application

slide-3
SLIDE 3

Software Design and Quality Group Institute for Program Structures and Data Organization 2/14 2015-11-05

Isolation prevents concurrent transactions from mutually overriding their data Classical „pessimistic“ way

Lock data before reading/writing Waiting time impacts performance

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

Different Ways to Isolate Concurrent Transactions

Merkle, Knoche: Modernizing Transactional Software Towards Service- Orientation

write A wait for A write A commit TX1 TX2 book hotel book flight TX1 TX2 commit book flight Sorry, no free seats left cancel hotel compensation

  • peration
slide-4
SLIDE 4

Software Design and Quality Group Institute for Program Structures and Data Organization 3/14 2015-11-05

Modernization Revisited

Transaction duration increased by network + database overheads

Locks held longer (Pessimistic) Higher abort risk (Optimistic)

Merkle, Knoche: Modernizing Transactional Software Towards Service- Orientation

Travel Database Travel Booking

Modernization

Hotels Database Hotel Booking Travel Booking Flight Booking Flights Database

Network overhead Additional Database Call(s)

Increased Data contention Impact on system performance?  PCM

slide-5
SLIDE 5

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

Transactions with the PCM – Status Quo

RDSEFF reserveSeat:

slide-6
SLIDE 6

Software Design and Quality Group Institute for Program Structures and Data Organization 5/14 2015-11-05

Transactions with the PCM – Status Quo

Merkle, Knoche: Modernizing Transactional Software Towards Service- Orientation

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 …

slide-7
SLIDE 7

Software Design and Quality Group Institute for Program Structures and Data Organization 6/14 2015-11-05

PCM.TX Overview

Transaction Boundaries Compensation Behaviour „Try-Cancel-Confirm“ Behaviour Queries (Transaction Boundaries) (Compensation Behaviour) Schema Definition Table Deployment

Merkle, Knoche: Modernizing Transactional Software Towards Service- Orientation

Application Data Access Database

Explicit Context (Database) Dependencies

Separate Schema Specification from Component Specification

Cross-Cutting:

slide-8
SLIDE 8

Software Design and Quality Group Institute for Program Structures and Data Organization 7/14 2015-11-05

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

Merkle, Knoche: Modernizing Transactional Software Towards Service- Orientation

Application Data Access Database

Entity Type Repository Person Entity Type Address Entity Type

Component Repository

Hotel Booking Flight Booking

components require entity types (rather than tables) Schema Definition Person+Address Table

Person Entity Type Address Entity Type

slide-9
SLIDE 9

Software Design and Quality Group Institute for Program Structures and Data Organization 8/14 2015-11-05

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]

Merkle, Knoche: Modernizing Transactional Software Towards Service- Orientation

Application Data Access Database

slide-10
SLIDE 10

Software Design and Quality Group Institute for Program Structures and Data Organization 9/14 2015-11-05

Schema Definition & Table Deployment

Merkle, Knoche: Modernizing Transactional Software Towards Service- Orientation

Application Data Access Database

Table Deployment Schema Definition

slide-11
SLIDE 11

Software Design and Quality Group Institute for Program Structures and Data Organization 10/14 2015-11-05

Queries

So far: InternalActions require processing resources (CPU, HDD) PCM.TX: InternalActions may additionally require entities

Number of entities described as PCMRandomVariable, hence a…

Constant Probability distribution function Function of (call/component) parameters

Merkle, Knoche: Modernizing Transactional Software Towards Service- Orientation

Application Data Access Database

slide-12
SLIDE 12

Software Design and Quality Group Institute for Program Structures and Data Organization 11/14 2015-11-05

Queries – Dependency Groups

How many rows from the Person+Address Table are accessed?

Case 1: 50 rows, if each address belongs to one of the 50 persons Case 2: 100 rows, if there is no correspondence between the addresses and persons

Merkle, Knoche: Modernizing Transactional Software Towards Service- Orientation

Schema Definition Person+Address Table

Person Entity Type Address Entity Type Application Data Access Database <Person> <Address>

 no dependency (default case)  assign entity accesses to same dependency group dependency group myQuery

slide-13
SLIDE 13

Software Design and Quality Group Institute for Program Structures and Data Organization 12/14 2015-11-05

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)

Scope MANUAL for fine-grained transaction demarcation, together with Commit/Abort

Merkle, Knoche: Modernizing Transactional Software Towards Service- Orientation

Application Data Access Database

slide-14
SLIDE 14

Software Design and Quality Group Institute for Program Structures and Data Organization 13/14 2015-11-05

Compensation,Try-Cancel-Confirm

Compensation behaviour executes when its corresponding transaction aborts Confirmation behaviour executes when its corresponding transaction succeeds

Merkle, Knoche: Modernizing Transactional Software Towards Service- Orientation

Application Data Access Database

slide-15
SLIDE 15

Software Design and Quality Group Institute for Program Structures and Data Organization 14/14 2015-11-05

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)

Merkle, Knoche: Modernizing Transactional Software Towards Service- Orientation

slide-16
SLIDE 16

Software Design and Quality Group Institute for Program Structures and Data Organization 15/14 2015-11-05

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.

Merkle, Knoche: Modernizing Transactional Software Towards Service- Orientation

slide-17
SLIDE 17

Software Design and Quality Group Institute for Program Structures and Data Organization 16/14 2015-11-05

Backup Slides

Merkle, Knoche: Modernizing Transactional Software Towards Service- Orientation

slide-18
SLIDE 18

Software Design and Quality Group Institute for Program Structures and Data Organization 17/14 2015-11-05

PCM Resource Interfaces

Merkle, Knoche: Modernizing Transactional Software Towards Service- Orientation