SlideShare a Scribd company logo
PERFORMANCE ANALYSIS OF
SYNCHRONISATION PROBLEM USING ASPECT
ORIENTED PROGRAMMING
Submitted by:-
Harshit monish
9911103466
F-4
OVERVIEW
 Cross Cutting Concerns
 Logging
 Producer Consumer problem(synchronization)
 The cost of tangled code
 Aspect Oriented Programming
 Development stage
 Terminology
 Aop benefits and oop shortcomings
 Producer Consumer problem
CROSS CUTTING CONCERNS:-
 What is a crosscutting concern?
 Behavior that cuts across the typical divisions of
responsibility, such as logging or debugging
 A problem which a program tries to solve.
 Aspects of a program that do not relate to the core
concerns directly, but which proper program execution
nevertheless requires
Function
Requirements
Non-Functional
Requirements
Production
Code
=+
CROSS CUTTING CONCERNS:-
 Examples
 Synchronisation
 Logging
 Authorisation
 Exception handling
LOGGING WITHOUT AOP
LOGGING WITH AOP
PRODUCER CONSUMER PROBLEM
TWO PROBLEMS AOP TRIES TO SOLVE
TWO PROBLEMS AOP TRIES TO SOLVE
THE COST OF TANGLED CODE
 redundant code
 same fragment of code in many places
 difficult to reason about
 non-explicit structure
 the big picture of the tangling isn’t clear
 difficult to change
 have to find all the code involved
 and be sure to change it consistently
 Poor traceability
 Lower productivity
 Less code reuse
 Harder refactoring
ASPECT ORIENTED PROGRAMMING
 AOP is a programming paradigm which aims to
increase modularity by allowing the separation of
cross-cutting concerns
 In AOP crosscutting concerns are implemented in
aspects instead of fusing them into core modules.
 Aspects can be reused.
 By reducing code tangling it makes it easier to
understand what the core functionality of a module
is.
 An “aspect weaver” takes the aspects and the core
modules and composes the final system
Coding is
HARD
AOP
makes it
EASY
AOP DEVELOPMENT STAGES
Integrating all
concerns
Identify concerns
What’s in it for YOU?
BENEFITS
 Write less code
 Read less code
 More concise and easy to understand
 More maintainable
 Fewer code =
 Less boilerplate code
 More interesting work
 Increased attention
 More PRODUCTIVITY!
FEWER DEFECTS!
TERMINOLOGY
 Cross-cutting – Identify areas of code
where common functionality exists
 Advice – The code to be injected
 Joinpoint – Where one or more aspects
can be applied
 Pointcut – A collection of joinpoints
 Aspect – General term for where advice
and point-cuts are combined
TERMINOLOGY
 Weaving – Integrating applications and
aspects (e.g. AspectJ is an “aspect weaver”)
 Compile-time – Can produce integrated source-
code, but typically only produces woven byte-
code.
 Run-time – Aspects are applied “on the fly”
(typically when classes are loaded)
OOP SHORTCOMINGS
 OOP allows to decompose a system into units of
function or behavior
 Certain software properties cannot be isolated in single
functional unit, instead they crosscut multiple
components
 Such crosscutting concerns result in tangled code that is
hard to develop and maintain
AOP BENEFITS
 Separation of components and aspects
 Better understanding of software
because of high level of abstraction
 Easier development and maintenance
because tangling of code is prevented
 Increased potential for reuse for both components as well as
aspects
 AOP breaks encapsulation in a controlled
manner.
 Encapsulation is broken between classes and
aspects.
 Aspects marked as privileged have access to the
private members of a class.
 Encapsulation is preserved between classes.
 An aspect encapsulates a crosscutting concern.
WHAT ABOUT ENCAPSULATION?
PROBLEM DESCRIPTION
 Question: ''How to enforce synchronization policies with
AOP?''
 Suppose multiple objects are concurrently working on
some shared data and exclusive access is needed for
modification
 All objects that are working on the data must be
synchronized, for example by locking the shared data
temporarily
PROBLEM DESCRIPTION
 Question: ''How to enforce synchronization policies with
AOP?''
 Suppose multiple objects are concurrently working on
some shared data and exclusive access is needed for
modification
 All objects that are working on the data must be
synchronized, for example by locking the shared data
temporarily
OBSERVATION
 Without AOP
 Every component that works on the shared data must take
care of the locking itself, leading to tangled and complex code
 With AOP
 The locking aspect is separated from the components by
means of an aspect module, resulting in usual benefits of
modularization
THE PRODUCER CONSUMER ASPECT
Performance analysis of synchronisation problem

More Related Content

Viewers also liked (12)

PDF
Aspect Oriented Development
tyrantbrian
 
PPTX
Global analysis of student performance on act
DrEJanet
 
PDF
Recommendation Report
ARKTURO
 
PPTX
STUDENT PERFORMANCE ANALYSIS USING DECISION TREE
Akshay Jain
 
PPT
Performance based Assessment
Machine shop ni Don Bosco
 
PPTX
Quantifying the Effects of an Active Learning Strategy on the Motivation of S...
Zin Eddine Dadach
 
PDF
Project Report on Performance Management System
HR at VASHI ELECTRICALS PVT. LTD.
 
PPTX
Performance based-assessment
luisagodoy444
 
PPTX
Lesson 5 performance based assessment
Carlo Magno
 
PPT
Performance Assessment
Marsha Ratzel
 
PPT
Assessment Of Student Learning
Arlan Villanueva
 
PPT
Performance Management System
Surabhi Mohan
 
Aspect Oriented Development
tyrantbrian
 
Global analysis of student performance on act
DrEJanet
 
Recommendation Report
ARKTURO
 
STUDENT PERFORMANCE ANALYSIS USING DECISION TREE
Akshay Jain
 
Performance based Assessment
Machine shop ni Don Bosco
 
Quantifying the Effects of an Active Learning Strategy on the Motivation of S...
Zin Eddine Dadach
 
Project Report on Performance Management System
HR at VASHI ELECTRICALS PVT. LTD.
 
Performance based-assessment
luisagodoy444
 
Lesson 5 performance based assessment
Carlo Magno
 
Performance Assessment
Marsha Ratzel
 
Assessment Of Student Learning
Arlan Villanueva
 
Performance Management System
Surabhi Mohan
 

Similar to Performance analysis of synchronisation problem (20)

PPTX
Introduction to Aspect Oriented Programming
Yan Cui
 
PPTX
Aspect Oriented Programming
Rodger Oates
 
PPT
AOP-IOC made by Vi Quoc Hanh and Vu Cong Thanh in SC Team
Thuy_Dang
 
PPTX
Aspect-oriented programming
MohamadHayeri1
 
PPTX
Aspect Oriented Programming
Shreya Chatterjee
 
PPTX
Spring AOP in Nutshell
Onkar Deshpande
 
PPT
Aspect Oriented Programming
Anumod Kumar
 
PPTX
Spring AOP
Radhakrishna Mutthoju
 
PDF
Solving Cross-Cutting Concerns in PHP - DutchPHP Conference 2016
Alexander Lisachenko
 
PDF
Solving cross cutting concerns in PHP - PHPSerbia-2017
Alexander Lisachenko
 
PPTX
Introduction to Aspect Oriented Programming by Donald Belcham
.NET Conf UY
 
PPTX
Introduction to Aspect Oriented Programming (DDD South West 4.0)
Yan Cui
 
PDF
IRJET- A Design Approach for Basic Telecom Operation
IRJET Journal
 
PPTX
Aspect Oriented Programing - Introduction
Venkaiah Chowdary Koneru
 
PPT
Aspect Oriented Software Development
Jignesh Patel
 
PPT
Intro To AOP
elliando dias
 
PPT
ASPECT ORIENTED PROGRAMING(aop)
kvsrteja
 
ODP
Weaving aspects in PHP with the help of Go! AOP library
Alexander Lisachenko
 
ODP
End of Year Presentation
Chanwit Kaewkasi
 
PDF
Crosscutting Specification Interference Detection at Aspect Oriented UML-Base...
IJERA Editor
 
Introduction to Aspect Oriented Programming
Yan Cui
 
Aspect Oriented Programming
Rodger Oates
 
AOP-IOC made by Vi Quoc Hanh and Vu Cong Thanh in SC Team
Thuy_Dang
 
Aspect-oriented programming
MohamadHayeri1
 
Aspect Oriented Programming
Shreya Chatterjee
 
Spring AOP in Nutshell
Onkar Deshpande
 
Aspect Oriented Programming
Anumod Kumar
 
Solving Cross-Cutting Concerns in PHP - DutchPHP Conference 2016
Alexander Lisachenko
 
Solving cross cutting concerns in PHP - PHPSerbia-2017
Alexander Lisachenko
 
Introduction to Aspect Oriented Programming by Donald Belcham
.NET Conf UY
 
Introduction to Aspect Oriented Programming (DDD South West 4.0)
Yan Cui
 
IRJET- A Design Approach for Basic Telecom Operation
IRJET Journal
 
Aspect Oriented Programing - Introduction
Venkaiah Chowdary Koneru
 
Aspect Oriented Software Development
Jignesh Patel
 
Intro To AOP
elliando dias
 
ASPECT ORIENTED PROGRAMING(aop)
kvsrteja
 
Weaving aspects in PHP with the help of Go! AOP library
Alexander Lisachenko
 
End of Year Presentation
Chanwit Kaewkasi
 
Crosscutting Specification Interference Detection at Aspect Oriented UML-Base...
IJERA Editor
 
Ad

Recently uploaded (20)

PDF
An Evaluative Study on Performance Growth Plan of ICICI Mutual Fund and SBI M...
PoonamKilaniya
 
PDF
SE_Syllabus_NEP_Computer Science and Engineering ( IOT and Cyber Security Inc...
krshewale
 
PPTX
Unit-1&2,mdngmnd,mngmdnmgnmdnfmngdf.pptx
jayarao21
 
PDF
A NEW FAMILY OF OPTICALLY CONTROLLED LOGIC GATES USING NAPHTHOPYRAN MOLECULE
ijoejnl
 
PPTX
sunil mishra pptmmmmmmmmmmmmmmmmmmmmmmmmm
singhamit111
 
PPTX
ENG8 Q1, WEEK 4.pptxoooiioooooooooooooooooooooooooo
chubbychubz1
 
PDF
1_ISO Certifications by Indian Industrial Standards Organisation.pdf
muhammad2010960
 
PPTX
GitHub_Copilot_Basics...........................pptx
ssusera13041
 
PPTX
Basics of Auto Computer Aided Drafting .pptx
Krunal Thanki
 
PPTX
00-ClimateChangeImpactCIAProcess_PPTon23.12.2024-ByDr.VijayanGurumurthyIyer1....
praz3
 
PDF
Natural Language processing and web deigning notes
AnithaSakthivel3
 
PDF
MOBILE AND WEB BASED REMOTE BUSINESS MONITORING SYSTEM
ijait
 
PDF
SMART HOME AUTOMATION PPT BY - SHRESTH SUDHIR KOKNE
SHRESTHKOKNE
 
PPTX
Water resources Engineering GIS KRT.pptx
Krunal Thanki
 
PDF
Geothermal Heat Pump ppt-SHRESTH S KOKNE
SHRESTHKOKNE
 
PDF
Introduction to Robotics Mechanics and Control 4th Edition by John J. Craig S...
solutionsmanual3
 
PPT
IISM Presentation.ppt Construction safety
lovingrkn
 
PDF
A presentation on the Urban Heat Island Effect
studyfor7hrs
 
PDF
LEARNING CROSS-LINGUAL WORD EMBEDDINGS WITH UNIVERSAL CONCEPTS
kjim477n
 
PPTX
Precedence and Associativity in C prog. language
Mahendra Dheer
 
An Evaluative Study on Performance Growth Plan of ICICI Mutual Fund and SBI M...
PoonamKilaniya
 
SE_Syllabus_NEP_Computer Science and Engineering ( IOT and Cyber Security Inc...
krshewale
 
Unit-1&2,mdngmnd,mngmdnmgnmdnfmngdf.pptx
jayarao21
 
A NEW FAMILY OF OPTICALLY CONTROLLED LOGIC GATES USING NAPHTHOPYRAN MOLECULE
ijoejnl
 
sunil mishra pptmmmmmmmmmmmmmmmmmmmmmmmmm
singhamit111
 
ENG8 Q1, WEEK 4.pptxoooiioooooooooooooooooooooooooo
chubbychubz1
 
1_ISO Certifications by Indian Industrial Standards Organisation.pdf
muhammad2010960
 
GitHub_Copilot_Basics...........................pptx
ssusera13041
 
Basics of Auto Computer Aided Drafting .pptx
Krunal Thanki
 
00-ClimateChangeImpactCIAProcess_PPTon23.12.2024-ByDr.VijayanGurumurthyIyer1....
praz3
 
Natural Language processing and web deigning notes
AnithaSakthivel3
 
MOBILE AND WEB BASED REMOTE BUSINESS MONITORING SYSTEM
ijait
 
SMART HOME AUTOMATION PPT BY - SHRESTH SUDHIR KOKNE
SHRESTHKOKNE
 
Water resources Engineering GIS KRT.pptx
Krunal Thanki
 
Geothermal Heat Pump ppt-SHRESTH S KOKNE
SHRESTHKOKNE
 
Introduction to Robotics Mechanics and Control 4th Edition by John J. Craig S...
solutionsmanual3
 
IISM Presentation.ppt Construction safety
lovingrkn
 
A presentation on the Urban Heat Island Effect
studyfor7hrs
 
LEARNING CROSS-LINGUAL WORD EMBEDDINGS WITH UNIVERSAL CONCEPTS
kjim477n
 
Precedence and Associativity in C prog. language
Mahendra Dheer
 
Ad

Performance analysis of synchronisation problem

  • 1. PERFORMANCE ANALYSIS OF SYNCHRONISATION PROBLEM USING ASPECT ORIENTED PROGRAMMING Submitted by:- Harshit monish 9911103466 F-4
  • 2. OVERVIEW  Cross Cutting Concerns  Logging  Producer Consumer problem(synchronization)  The cost of tangled code  Aspect Oriented Programming  Development stage  Terminology  Aop benefits and oop shortcomings  Producer Consumer problem
  • 3. CROSS CUTTING CONCERNS:-  What is a crosscutting concern?  Behavior that cuts across the typical divisions of responsibility, such as logging or debugging  A problem which a program tries to solve.  Aspects of a program that do not relate to the core concerns directly, but which proper program execution nevertheless requires
  • 5. CROSS CUTTING CONCERNS:-  Examples  Synchronisation  Logging  Authorisation  Exception handling
  • 9. TWO PROBLEMS AOP TRIES TO SOLVE
  • 10. TWO PROBLEMS AOP TRIES TO SOLVE
  • 11. THE COST OF TANGLED CODE  redundant code  same fragment of code in many places  difficult to reason about  non-explicit structure  the big picture of the tangling isn’t clear  difficult to change  have to find all the code involved  and be sure to change it consistently  Poor traceability  Lower productivity  Less code reuse  Harder refactoring
  • 12. ASPECT ORIENTED PROGRAMMING  AOP is a programming paradigm which aims to increase modularity by allowing the separation of cross-cutting concerns  In AOP crosscutting concerns are implemented in aspects instead of fusing them into core modules.  Aspects can be reused.  By reducing code tangling it makes it easier to understand what the core functionality of a module is.  An “aspect weaver” takes the aspects and the core modules and composes the final system
  • 14. AOP DEVELOPMENT STAGES Integrating all concerns Identify concerns
  • 15. What’s in it for YOU?
  • 16. BENEFITS  Write less code  Read less code  More concise and easy to understand  More maintainable  Fewer code =  Less boilerplate code  More interesting work  Increased attention  More PRODUCTIVITY! FEWER DEFECTS!
  • 17. TERMINOLOGY  Cross-cutting – Identify areas of code where common functionality exists  Advice – The code to be injected  Joinpoint – Where one or more aspects can be applied  Pointcut – A collection of joinpoints  Aspect – General term for where advice and point-cuts are combined
  • 18. TERMINOLOGY  Weaving – Integrating applications and aspects (e.g. AspectJ is an “aspect weaver”)  Compile-time – Can produce integrated source- code, but typically only produces woven byte- code.  Run-time – Aspects are applied “on the fly” (typically when classes are loaded)
  • 19. OOP SHORTCOMINGS  OOP allows to decompose a system into units of function or behavior  Certain software properties cannot be isolated in single functional unit, instead they crosscut multiple components  Such crosscutting concerns result in tangled code that is hard to develop and maintain
  • 20. AOP BENEFITS  Separation of components and aspects  Better understanding of software because of high level of abstraction  Easier development and maintenance because tangling of code is prevented  Increased potential for reuse for both components as well as aspects
  • 21.  AOP breaks encapsulation in a controlled manner.  Encapsulation is broken between classes and aspects.  Aspects marked as privileged have access to the private members of a class.  Encapsulation is preserved between classes.  An aspect encapsulates a crosscutting concern. WHAT ABOUT ENCAPSULATION?
  • 22. PROBLEM DESCRIPTION  Question: ''How to enforce synchronization policies with AOP?''  Suppose multiple objects are concurrently working on some shared data and exclusive access is needed for modification  All objects that are working on the data must be synchronized, for example by locking the shared data temporarily
  • 23. PROBLEM DESCRIPTION  Question: ''How to enforce synchronization policies with AOP?''  Suppose multiple objects are concurrently working on some shared data and exclusive access is needed for modification  All objects that are working on the data must be synchronized, for example by locking the shared data temporarily
  • 24. OBSERVATION  Without AOP  Every component that works on the shared data must take care of the locking itself, leading to tangled and complex code  With AOP  The locking aspect is separated from the components by means of an aspect module, resulting in usual benefits of modularization

Editor's Notes

  • #12: 6/3/2015
  • #15: 14
  • #16: That’s all very nice, but why should you care about writing reusable and clean code? What do you get out of it?
  • #18: 6/3/2015
  • #19: 6/3/2015