Presentation is loading. Please wait.

Presentation is loading. Please wait.

AOP: Does It Make Sense? The Case of Concurrency and Failures by Jörg Kienzle and Rachid Guerraoui Sibylle Aregger & Antonia Schmidig Presentation based.

Similar presentations


Presentation on theme: "AOP: Does It Make Sense? The Case of Concurrency and Failures by Jörg Kienzle and Rachid Guerraoui Sibylle Aregger & Antonia Schmidig Presentation based."— Presentation transcript:

1 AOP: Does It Make Sense? The Case of Concurrency and Failures by Jörg Kienzle and Rachid Guerraoui Sibylle Aregger & Antonia Schmidig Presentation based on

2 Concurrency SeminarSS 20042 NO!

3 Concurrency SeminarSS 20043 The Problem aspectizing Concurrency and Failures AspectJ & Transactions aspectize transaction semantics aspectize transaction interfaces aspectize transaction mechanisms

4 Concurrency SeminarSS 20044 Overview 1.Transactions 2.AOP (Aspect Oriented Programming) 3.aspectize transaction semantics 4.aspectize transaction interfaces 5.aspectize transaction mechanisms 6.Conclusion

5 Concurrency SeminarSS 20045 Transactions ACID Serializability Concurrency Failure Recovery => fundamental paradigm to handle Concurrency and Failures

6 Concurrency SeminarSS 20046 AOP separation of concerns -> separate code (aspect) Weaving Code + Aspect(s) = Program

7 Concurrency SeminarSS 20047 AOP: Example [Picture: Figure/Point/Line Example]

8 Concurrency SeminarSS 20048 AOP: JoinPoint JoinPoint: –point in flow of program –„hook“ to insert aspect-code Method JoinPoint Program Flow

9 Concurrency SeminarSS 20049 AOP: PointCut PointCut: –set of JoinPoints pointcut moves(): receptions(void Line.setP1(Point)) || receptions(void Line.setP2(Point)) || receptions(void Point.setX(int)) || receptions(void Point.setY(int));

10 Concurrency SeminarSS 200410 AOP: Advice Before After Around Method JoinPoint Program Flow

11 Concurrency SeminarSS 200411 AOP: Example aspect MoveTracking { static boolean flag = false; static boolean testAndClear() { boolean result = flag; flag = false; return result; } pointcut moves() :... after() : moves() { flag = true; } }

12 Concurrency SeminarSS 200412 Aspectize Transaction Semantics combine non-transactional code with transaction aspects problems: –irreversible actions –deadlock

13 Concurrency SeminarSS 200413 ATS: Unsolvable Deadlock T1: A.deposit(Amount) while (B.getBalance() <= Amount) {} B.withdraw(Amount) T2: B.deposit(Amount) while (A.getBalance() <= Amount) {} A.withdraw(Amount) Problem: linearizability  serializability Solution: multithreaded transactions New Problem: automatic detection of cooperating threads

14 Concurrency SeminarSS 200414 Aspectize Transaction Interfaces

15 Concurrency SeminarSS 200415 Aspectize Transaction Mechanisms

16 Concurrency SeminarSS 200416 Conclusion aspectize transaction semantics: not possible aspectize transaction interfaces: possible, but artificial aspectize transaction mechanisms: only syntactical separation


Download ppt "AOP: Does It Make Sense? The Case of Concurrency and Failures by Jörg Kienzle and Rachid Guerraoui Sibylle Aregger & Antonia Schmidig Presentation based."

Similar presentations


Ads by Google