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

Aspect Oriented Development
Aspect Oriented DevelopmentAspect Oriented Development
Aspect Oriented Development
tyrantbrian
 
Global analysis of student performance on act
Global analysis of student  performance on actGlobal analysis of student  performance on act
Global analysis of student performance on actDrEJanet
 
Recommendation Report
Recommendation ReportRecommendation Report
Recommendation Report
ARKTURO
 
STUDENT PERFORMANCE ANALYSIS USING DECISION TREE
STUDENT PERFORMANCE ANALYSIS USING DECISION TREESTUDENT PERFORMANCE ANALYSIS USING DECISION TREE
STUDENT PERFORMANCE ANALYSIS USING DECISION TREE
Akshay Jain
 
Performance based Assessment
Performance based AssessmentPerformance based Assessment
Performance based Assessment
Machine shop ni Don Bosco
 
Quantifying the Effects of an Active Learning Strategy on the Motivation of S...
Quantifying the Effects of an Active Learning Strategy on the Motivation of S...Quantifying the Effects of an Active Learning Strategy on the Motivation of S...
Quantifying the Effects of an Active Learning Strategy on the Motivation of S...
Zin Eddine Dadach
 
Performance based-assessment
Performance based-assessmentPerformance based-assessment
Performance based-assessmentluisagodoy444
 
Lesson 5 performance based assessment
Lesson 5 performance based assessmentLesson 5 performance based assessment
Lesson 5 performance based assessmentCarlo Magno
 
Performance Assessment
Performance AssessmentPerformance Assessment
Performance AssessmentMarsha Ratzel
 
Problem Solving Method
Problem Solving MethodProblem Solving Method
Problem Solving Method
Roxanne Deang
 
Assessment Of Student Learning
Assessment Of Student LearningAssessment Of Student Learning
Assessment Of Student Learning
Arlan Villanueva
 
Performance Management System
Performance Management SystemPerformance Management System
Performance Management System
Surabhi Mohan
 

Viewers also liked (13)

Aspect Oriented Development
Aspect Oriented DevelopmentAspect Oriented Development
Aspect Oriented Development
 
Global analysis of student performance on act
Global analysis of student  performance on actGlobal analysis of student  performance on act
Global analysis of student performance on act
 
Recommendation Report
Recommendation ReportRecommendation Report
Recommendation Report
 
STUDENT PERFORMANCE ANALYSIS USING DECISION TREE
STUDENT PERFORMANCE ANALYSIS USING DECISION TREESTUDENT PERFORMANCE ANALYSIS USING DECISION TREE
STUDENT PERFORMANCE ANALYSIS USING DECISION TREE
 
Performance based Assessment
Performance based AssessmentPerformance based Assessment
Performance based Assessment
 
Quantifying the Effects of an Active Learning Strategy on the Motivation of S...
Quantifying the Effects of an Active Learning Strategy on the Motivation of S...Quantifying the Effects of an Active Learning Strategy on the Motivation of S...
Quantifying the Effects of an Active Learning Strategy on the Motivation of S...
 
Project Report on Performance Management System
Project Report on Performance Management SystemProject Report on Performance Management System
Project Report on Performance Management System
 
Performance based-assessment
Performance based-assessmentPerformance based-assessment
Performance based-assessment
 
Lesson 5 performance based assessment
Lesson 5 performance based assessmentLesson 5 performance based assessment
Lesson 5 performance based assessment
 
Performance Assessment
Performance AssessmentPerformance Assessment
Performance Assessment
 
Problem Solving Method
Problem Solving MethodProblem Solving Method
Problem Solving Method
 
Assessment Of Student Learning
Assessment Of Student LearningAssessment Of Student Learning
Assessment Of Student Learning
 
Performance Management System
Performance Management SystemPerformance Management System
Performance Management System
 

Similar to Performance analysis of synchronisation problem

Aspect Oriented Software Development
Aspect Oriented Software DevelopmentAspect Oriented Software Development
Aspect Oriented Software DevelopmentJignesh Patel
 
Introduction to Aspect Oriented Programming by Donald Belcham
Introduction to Aspect Oriented Programming by Donald BelchamIntroduction to Aspect Oriented Programming by Donald Belcham
Introduction to Aspect Oriented Programming by Donald Belcham
.NET Conf UY
 
J2EE Performance And Scalability Bp
J2EE Performance And Scalability BpJ2EE Performance And Scalability Bp
J2EE Performance And Scalability Bp
Chris Adkin
 
AOP-IOC made by Vi Quoc Hanh and Vu Cong Thanh in SC Team
AOP-IOC made by Vi Quoc Hanh and Vu Cong Thanh in SC TeamAOP-IOC made by Vi Quoc Hanh and Vu Cong Thanh in SC Team
AOP-IOC made by Vi Quoc Hanh and Vu Cong Thanh in SC Team
Thuy_Dang
 
Aspect Oriented Programming
Aspect Oriented ProgrammingAspect Oriented Programming
Aspect Oriented Programming
Shreya Chatterjee
 
Survive the Chaos - S4H151 - SAP TechED Barcelona 2017 - Lecture
Survive the Chaos - S4H151 - SAP TechED Barcelona 2017 - LectureSurvive the Chaos - S4H151 - SAP TechED Barcelona 2017 - Lecture
Survive the Chaos - S4H151 - SAP TechED Barcelona 2017 - Lecture
Rainer Winkler
 
Comparing the code quality of ECMs
Comparing the code quality of ECMsComparing the code quality of ECMs
Comparing the code quality of ECMs
Nuxeo
 
Object Oriented Concepts and Principles
Object Oriented Concepts and PrinciplesObject Oriented Concepts and Principles
Object Oriented Concepts and Principles
deonpmeyer
 
.net Based Component Technologies
.net Based Component Technologies.net Based Component Technologies
.net Based Component Technologies
prakashk453625
 
Best practices for creating modular Web applications
Best practices for creating modular Web applicationsBest practices for creating modular Web applications
Best practices for creating modular Web applications
peychevi
 
Spring AOP in Nutshell
Spring AOP in Nutshell Spring AOP in Nutshell
Spring AOP in Nutshell
Onkar Deshpande
 
Software Development Standard Operating Procedure
Software Development Standard Operating Procedure Software Development Standard Operating Procedure
Software Development Standard Operating Procedure
rupeshchanchal
 
Common design principles and design patterns in automation testing
Common design principles and design patterns in automation testingCommon design principles and design patterns in automation testing
Common design principles and design patterns in automation testing
KMS Technology
 
Elements of DDD with ASP.NET MVC & Entity Framework Code First
Elements of DDD with ASP.NET MVC & Entity Framework Code FirstElements of DDD with ASP.NET MVC & Entity Framework Code First
Elements of DDD with ASP.NET MVC & Entity Framework Code First
Enea Gabriel
 
Aspect Oriented Programming
Aspect Oriented ProgrammingAspect Oriented Programming
Aspect Oriented Programming
Anumod Kumar
 
WoMakersCode 2016 - Shit Happens
WoMakersCode 2016 -  Shit HappensWoMakersCode 2016 -  Shit Happens
WoMakersCode 2016 - Shit Happens
Jackson F. de A. Mafra
 
Architecting a Large Software Project - Lessons Learned
Architecting a Large Software Project - Lessons LearnedArchitecting a Large Software Project - Lessons Learned
Architecting a Large Software Project - Lessons Learned
João Pedro Martins
 
Secret Twists to Efficiently Develop Reactive Software Systems
Secret Twists to Efficiently Develop Reactive Software SystemsSecret Twists to Efficiently Develop Reactive Software Systems
Secret Twists to Efficiently Develop Reactive Software Systems
Bart Jonkers
 
The pragmatic programmer
The pragmatic programmerThe pragmatic programmer
The pragmatic programmer
LeylimYaln
 

Similar to Performance analysis of synchronisation problem (20)

Aspect Oriented Software Development
Aspect Oriented Software DevelopmentAspect Oriented Software Development
Aspect Oriented Software Development
 
Introduction to Aspect Oriented Programming by Donald Belcham
Introduction to Aspect Oriented Programming by Donald BelchamIntroduction to Aspect Oriented Programming by Donald Belcham
Introduction to Aspect Oriented Programming by Donald Belcham
 
J2EE Performance And Scalability Bp
J2EE Performance And Scalability BpJ2EE Performance And Scalability Bp
J2EE Performance And Scalability Bp
 
AOP-IOC made by Vi Quoc Hanh and Vu Cong Thanh in SC Team
AOP-IOC made by Vi Quoc Hanh and Vu Cong Thanh in SC TeamAOP-IOC made by Vi Quoc Hanh and Vu Cong Thanh in SC Team
AOP-IOC made by Vi Quoc Hanh and Vu Cong Thanh in SC Team
 
Aspect Oriented Programming
Aspect Oriented ProgrammingAspect Oriented Programming
Aspect Oriented Programming
 
Survive the Chaos - S4H151 - SAP TechED Barcelona 2017 - Lecture
Survive the Chaos - S4H151 - SAP TechED Barcelona 2017 - LectureSurvive the Chaos - S4H151 - SAP TechED Barcelona 2017 - Lecture
Survive the Chaos - S4H151 - SAP TechED Barcelona 2017 - Lecture
 
Comparing the code quality of ECMs
Comparing the code quality of ECMsComparing the code quality of ECMs
Comparing the code quality of ECMs
 
Object Oriented Concepts and Principles
Object Oriented Concepts and PrinciplesObject Oriented Concepts and Principles
Object Oriented Concepts and Principles
 
.net Based Component Technologies
.net Based Component Technologies.net Based Component Technologies
.net Based Component Technologies
 
Intro To AOP
Intro To AOPIntro To AOP
Intro To AOP
 
Best practices for creating modular Web applications
Best practices for creating modular Web applicationsBest practices for creating modular Web applications
Best practices for creating modular Web applications
 
Spring AOP in Nutshell
Spring AOP in Nutshell Spring AOP in Nutshell
Spring AOP in Nutshell
 
Software Development Standard Operating Procedure
Software Development Standard Operating Procedure Software Development Standard Operating Procedure
Software Development Standard Operating Procedure
 
Common design principles and design patterns in automation testing
Common design principles and design patterns in automation testingCommon design principles and design patterns in automation testing
Common design principles and design patterns in automation testing
 
Elements of DDD with ASP.NET MVC & Entity Framework Code First
Elements of DDD with ASP.NET MVC & Entity Framework Code FirstElements of DDD with ASP.NET MVC & Entity Framework Code First
Elements of DDD with ASP.NET MVC & Entity Framework Code First
 
Aspect Oriented Programming
Aspect Oriented ProgrammingAspect Oriented Programming
Aspect Oriented Programming
 
WoMakersCode 2016 - Shit Happens
WoMakersCode 2016 -  Shit HappensWoMakersCode 2016 -  Shit Happens
WoMakersCode 2016 - Shit Happens
 
Architecting a Large Software Project - Lessons Learned
Architecting a Large Software Project - Lessons LearnedArchitecting a Large Software Project - Lessons Learned
Architecting a Large Software Project - Lessons Learned
 
Secret Twists to Efficiently Develop Reactive Software Systems
Secret Twists to Efficiently Develop Reactive Software SystemsSecret Twists to Efficiently Develop Reactive Software Systems
Secret Twists to Efficiently Develop Reactive Software Systems
 
The pragmatic programmer
The pragmatic programmerThe pragmatic programmer
The pragmatic programmer
 

Recently uploaded

DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
SupreethSP4
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 

Recently uploaded (20)

DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 

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

  1. 6/3/2015
  2. 14
  3. That’s all very nice, but why should you care about writing reusable and clean code? What do you get out of it?
  4. 6/3/2015
  5. 6/3/2015