specification and detection of soa antipatternssofa.uqam.ca/media/icsoc2012phdsymp.pdfdetection of...
TRANSCRIPT
Detection of SOA Antipatterns
Francis Palma1,2
Supervised by Dr. Yann-Gaël Guéhéneuc1 and Dr. Naouel Moha2
1 Ptidej Team, DGIGL, École Polytechnique de Montréal, Canada
2 LATECE , Département d'informatique, Université du Québec à Montréal, Canada
PhD Symposium, ICSOC 2012, Shanghai, China
Problem Context (1/3)
HTTP, SOAP, WSDL, UDDI, WS-Technologies
Service Based Systems (SBSs) evolve to fit new user requirements, execution
contexts:
- may degrade design and quality of service (QoS)
- may cause the appearance of common poor solutions: Antipatterns
Antipattern is a pattern commonly used in software engineering but is ineffective and
negative consequences (Andrew Koenig, 1995)
Francis Palma Detection of SOA Antipatterns
Service Requester
Service Provider
Service-based System
2
Problem Context (2/3)
Examples of SOA Antipatterns:
Tiny Service: Small service with few methods which requires several coupled services
to complete an abstraction [Dudney03]
Multiservice: Implements a multitude of methods, is not easily reusable because of low
cohesion of its methods, is often unavailable due to overload [Dudney03]
Tiny Service Multiservice
Francis Palma Detection of SOA Antipatterns 3
Problem Context (3/3)
results
► SOA
→ next evolutionary step for IT organizations to meet up their business needs [IBM04]
→ current and future programming model, an architectural choice
→ ever demanding and increasing
Thus, SOA applications and SOA developments are being matured
Detection of SOA Antipatterns in SBSs requires special attention
Francis Palma Detection of SOA Antipatterns
Poor performance
Hard for comprehension
Low maintainability
Hard for evolution
Expensive maintenance life
Not reusable
4
+
Outline
- Introduction
- Related Work
- Approach
- Experiments/Results
- Conclusion
Francis Palma Detection of SOA Antipatterns
Introduction: My PhD Subject (1/2)
Current Progress:
« Detecting Object-oriented Code smells, Design smells and
Antipatterns are matured enough »
1. Detection of SOA Antipatterns
- Specification of SOA Antipatterns
- Devise an Approach and a Framework supporting detection
- Diverse technologies supporting SBSs
- Develop a complete tool for detection
2. Validation of the Detection Results
- User studies (validation of the tool, detected results) Francis Palma Detection of SOA Antipatterns 6
Introduction: My PhD Subject (1/2)
Problem(s) to Tackle:
« Propose an Approach for the Detection of SOA Antipatterns »
1. Detection of SOA Antipatterns
- Specification of SOA Antipatterns
- Devise an Approach and a Framework supporting detection
- Diverse technologies supporting SBSs
- Develop a complete tool for detection
2. Validation of the Detection Results
- User studies (validation of the tool, detected results)
Francis Palma Detection of SOA Antipatterns 7
Introduction: My PhD Subject (1/2)
Problem(s) to Tackle:
« Propose an Approach for the Detection of SOA Antipatterns »
1. Detection of SOA Antipatterns
- Specification of SOA Antipatterns
- Devise an Approach and a Framework supporting detection
- Supporting diverse technologies used in SBSs
- Develop a complete tool for detection
2. Validation of the Detection Results
- User studies (validation of the tool, detected results)
Francis Palma Detection of SOA Antipatterns 8
Introduction: My PhD Subject (1/2)
Problem(s) to Tackle:
« Propose an Approach for the Detection of SOA Antipatterns »
1. Detection of SOA Antipatterns
- Specification of SOA Antipatterns
- Devise an Approach and a Framework supporting detection
- Supporting diverse technologies used in SBSs
- Develop a complete tool for detection
2. Validation of the Detection Results
- User studies (validation of the tool, detected results)
Francis Palma Detection of SOA Antipatterns 9
Introduction: My PhD Subject (2/2)
Proposed Solution:
- SODA (Service Oriented Detection for Antipatterns), generic approach for
detecting SOA antipatterns [Moha et al. ICSOC 2012]
- SOFA (Service Oriented Framework for Antipatterns), a framework,
- to specify SOA antipatterns and detect them
- to perform static and dynamic analysis
- A complete Detection Tool on top of SODA and SOFA
Francis Palma Detection of SOA Antipatterns 10
Research Challenges
(a) Specifying SOA Antipatterns
- Current literature of SOA antipatterns is not matured enough
- Mostly depend on online resources, i.e., open forums, blogs, shared resources
(b) Repository of SBSs
- The research on the detection of SOA antipatterns still did not gain much attention
- No repository of SBSs to perform experiments. Researchers are still in the
lack of freely available SBSs as testbed
(c) Handling Dynamic Environment of SOA
- SBSs are developed adopting SOA design principles, and the execution
environment of SBSs is dynamic and unpredictable (many operating factors, e.g.,
implementation technologies, inter-operability, QoS, critical design criteria)
Francis Palma Detection of SOA Antipatterns 11
Outline
- Introduction
- Related Work
- Approach
- Experiments/Results
- Conclusion
Francis Palma Detection of SOA Antipatterns
Related Work (1/2)
SOA OO
• Only 2 books:
Dudney 2003,
Rotem-Gal-Oz 2012
• Several books:
Brown 1998,
Fowler 1999 etc.
Books
• Still in their infancy:
Kral 2008 …
• Numerous mature methods:
Munro 2005, Lanza 2006,
Moha 2010, Kessentini
2010, Settas 2011
Detection
Methods
• Many Web sites of SOA
practitioners
• Web sites, courses,
magazines, journals etc. Other references
Francis Palma Detection of SOA Antipatterns 13
Related Work (2/2)
SOA OO
• OO style design in SOA
system
• Procedural design style
in OO system Root cause
• Services • Classes First class
entities
• Highly dynamic • Mainly static Analysis
Francis Palma Detection of SOA Antipatterns 14
Related Work (2/2)
OO detection methods, tools cannot be directly applied to SOA
However, they form a sound basis of expertise and knowledge for building
methods for the detection of SOA antipatterns
SOA OO
• OO style design in SOA
system
• Procedural design style
in OO system Root cause
• Services • Classes First class
entities
• Highly dynamic • Mainly static Analysis
Francis Palma Detection of SOA Antipatterns 15
Other Related Work
Francis Palma Detection of SOA Antipatterns 16
Parsons and Murphy proposed a framework for detecting performance
antipatterns in component-based systems [Parsons08]
Cortellessa et al. proposed an approach to identify "guilty" performance
antipatterns by classifying the level of guiltiness in OO systems [Cortellessa10]
Trubiani et al. proposed detection and solution of software performance
antipatterns in domain specific modeling language to describe component-based
software architectures [Trubiani11]
Wong et al. used a genetic algorithm for detecting software faults and anomalous
behavior related to the resource usage of a system [Wong10]
Other works investigating impacts of antipatterns: Abbes et al. [Abbes11],
Khomh et al. [Khomh12]
Outline
- Introduction
- Related Work
- Proposed Approach
- Experiments/Results
- Conclusion
Francis Palma Detection of SOA Antipatterns
Approach (1/6): SODA
SODA: Service Oriented Detection for Antipatterns
Textual
Description of
Antipatterns
1. S
pecif
icati
on
s
Rule
Card
2. G
en
era
tio
n
Detection
algorithm
3. D
ete
cti
on
Suspicious
Services
Francis Palma Detection of SOA Antipatterns
SBS Template
18
Approach (2/6): Specification
Textual Description of Antipatterns
1. S
pe
cifi
cati
on
s
Rule Card
2. G
en
era
tio
n
Detection algorithm
3. D
ete
ctio
n
Suspicious Services
1. Specify SOA Antipatterns
Domain Analysis
Domain Specific Language
Rule Cards of Antipatterns
Tiny Service is a small service with few methods,
which only implements part of an abstraction. Such
service often requires several coupled services to
be used together, resulting in higher development
complexity and reduced usability. In the extreme
case, a Tiny Service will be limited to one method,
resulting in many services that implement an overall
set of requirements [Dudney (2003)]
BNF Grammar
Francis Palma Detection of SOA Antipatterns
SBS
19
Approach (3/6): Example Rule Cards
Tiny Service
Textual Description of Antipatterns
1. S
pe
cifi
cati
on
s
Rule Card
2. G
en
era
tio
n
Detection algorithm
3. D
ete
ctio
n
Suspicious Services
1 RULE CARD: TinyService {
2 RULE: TinyService { INTER FewMethod HighCoupling };
3 RULE: FewMethod { NMD VERY_LOW };
4 RULE: HighCoupling { CPL HIGH };
5 };
Francis Palma Detection of SOA Antipatterns
SBS
20
Multi Service :
1 RULE CARD: MultiService {
2 RULE: MultiService { INTER MultiMethod HighResponse LowAvailability LowCohesion };
3 RULE: MultiMethod { NMD VERY_HIGH };
4 RULE: HighResponse { RT VERY_HIGH };
5 RULE: LowAvailability { A LOW };
6 RULE: LowCohesion { COH LOW };
7 };
Approach (4/6): Generation
Textual Description of Antipatterns
1. S
pe
cifi
cati
on
s
Rule Card
2. G
en
era
tio
n
Detection algorithm
3. D
ete
ctio
n
Suspicious Services
Francis Palma Detection of SOA Antipatterns
SBS
21
Approach (5/6): Detection
SOFA Framework
Textual Description of Antipatterns
1. S
pe
cifi
cati
on
s
Rule Card
2. G
en
era
tio
n
Detection algorithm
3. D
ete
ctio
n
Suspicious Services
Francis Palma Detection of SOA Antipatterns
SBS
22
Approach (6/6): Underlying Framework
Main Components:
(1) Automated generation of detection algorithms
(2) Computation of static and dynamic metrics
(3) Specification of rules
Francis Palma Detection of SOA Antipatterns 23
1 2
3
Outline
- Introduction
- Related Work
- Approach
- Experiments/Assumptions
- Conclusion
Francis Palma Detection of SOA Antipatterns
Assumptions (1/2)
Assumption 1: The DSL allows specification from simple to complex SOA
antipatterns, i.e., DSL is generic (A1)
Assumption 2: The DSL is extensible for new SOA antipatterns (H12).
Assumption 3: Detection algorithms for SOA antipatterns have high precision
and recall. Target precision is above 75% and recall is 100% (H23).
Assumption 4: The complexity of the generated detection algorithms are
reasonable, i.e., execution times are in the order of seconds (H24).
Francis Palma Detection of SOA Antipatterns 25
Assumptions (1/2)
Assumption 1: The DSL allows specification from simple to complex SOA
antipatterns, i.e., DSL is generic (A1)
Assumption 2: The DSL is extensible for new SOA antipatterns (A2)
Assumption 3: Detection algorithms for SOA antipatterns have high precision
and recall. Target precision is above 75% and recall is 100% (H23).
Assumption 4: The complexity of the generated detection algorithms are
reasonable, i.e., execution times are in the order of seconds (H24).
Francis Palma Detection of SOA Antipatterns 26
Assumptions (1/2)
Assumption 1: The DSL allows specification from simple to complex SOA
antipatterns, i.e., DSL is generic (A1)
Assumption 2: The DSL is extensible for new SOA antipatterns (A2)
Assumption 3: Detection algorithms for SOA antipatterns have high precision
and recall. Target precision is above 75% and recall is 100% (A3)
Assumption 4: The complexity of the generated detection algorithms are
reasonable, i.e., execution times are in the order of seconds (H24).
Francis Palma Detection of SOA Antipatterns 27
Assumptions (1/2)
Assumption 1: The DSL allows specification from simple to complex SOA
antipatterns, i.e., DSL is generic (A1)
Assumption 2: The DSL is extensible for new SOA antipatterns (A2)
Assumption 3: Detection algorithms for SOA antipatterns have high precision
and recall. Target precision is above 75% and recall is 100% (A3)
Assumption 4: The complexity of the generated detection algorithms are
reasonable, i.e., execution times are in the order of seconds (A4)
Francis Palma Detection of SOA Antipatterns 28
Assumptions (2/2)
Assumption 5: The proposed framework, SOFA is extensible for new SOA
metrics, and generic for any SBSs (A5)
Assumption 6: The proposed approach, SODA supports any technologies, i.e.,
SBSs developed using different technologies, e.g., SOAP/RPC, REST, Web
Services etc. (H46).
Assumption 7: The proposed approach is validated with different experimental
and control groups, to show its effectiveness, and to achieve precision and
recall closed to the experimental results (H47).
Francis Palma Detection of SOA Antipatterns 29
Assumptions (2/2)
Assumption 5: The proposed framework, SOFA is extensible for new SOA
metrics, and generic for any SBSs (A5)
Assumption 6: The proposed approach, SODA supports any technologies, i.e.,
SBSs developed using different technologies, e.g., SOAP/RPC, REST, Web
Services, etc (A6)
Assumption 7: The proposed approach is validated with different experimental
and control groups, to show its effectiveness, and to achieve precision and
recall closed to the experimental results (H47).
Francis Palma Detection of SOA Antipatterns 30
Assumptions (2/2)
Assumption 5: The proposed framework, SOFA is extensible for new SOA
metrics, and generic for any SBSs (A5)
Assumption 6: The proposed approach, SODA supports any technologies, i.e.,
SBSs developed using different technologies, e.g., SOAP/RPC, REST, Web
Services, etc (A6)
Assumption 7: The proposed approach is validated by means of a tool, to
show its effectiveness, and to achieve precision and recall closed to the
experimental results (A7)
Francis Palma Detection of SOA Antipatterns 31
Analyzed SOA Antipatterns
Francis Palma Detection of SOA Antipatterns 32
As a preliminary step, we analyzed 10 SOA antipatterns to specify
Rule Cards:
Multi Service
Tiny Service
Sand Pile
Chatty Service
The Knot
Nobody Home
Duplicated Service
Bottleneck Service
Service Chain
Data Service
Detection Result (Partial)
Detection for Tiny Service, Multi Service and Duplicated Service on Home
Automation.
Francis Palma Detection of SOA Antipatterns 33
Outline
- Introduction
- Related Work
- Approach
- Experiments/Results
- Conclusion
Francis Palma Detection of SOA Antipatterns 34
Conclusion and Future Work
Conclusion
- Present the problem in detail
- The proposed possible solution
- The research assumptions to validate
- Detection result for 3 SOA antipatterns
Francis Palma Detection of SOA Antipatterns 35
Conclusion and Future Work
Future Work
- Add more SOA antipatterns to SOFA
- Replicate SODA approach on other large SBSs
- Focus on precision and recall for complex and large SBSs
- Focus on the performance of the detection algorithms
- Validate all the Assumptions (A1 to A7) for large scale SBS
- Introduce refactoring module within SOFA
Francis Palma Detection of SOA Antipatterns 36
References [Parsons08] Trevor Parsons and John Murphy, Detecting Performance Antipatterns in Component Based
Enterprise Systems, Journal of Object Technology, April 2008.
[Cortellessa10] Cortellessa, Vittorio and Martens, Anne and Reussner, Ralf and Trubiani, Catia, A Process to
Effectively Identify “Guilty” Performance Antipatterns, Fundamental Approaches to Software Engineering, 2010.
[Trubiani11] Trubiani, Catia and Koziolek, Anne, Detection and solution of software performance antipatterns in
palladio architectural models, Proceedings of the second joint WOSP/SIPEW international conference on
Performance engineering, 2011.
[Wong10] Wong, Sunny and Aaron, Melissa and Segall, Jeffrey and Lynch, Kevin and Mancoridis, Spiros, Reverse
Engineering Utility Functions Using Genetic Programming to Detect Anomalous Behavior in Software, WCRE '10.
[Abbes11] Abbes, Marwen and Khomh, Foutse and Gueheneuc, Yann-Gael and Antoniol, Giuliano, An Empirical
Study of the Impact of Two Antipatterns, Blob and Spaghetti Code, on Program Comprehension, Proceedings of
the 2011 15th European Conference on Software Maintenance and Reengineering, CSMR '11.
[Khomh12] Khomh, Foutse and Penta, Massimiliano Di and Gueheneuc, Yann-Gael and Antoniol, Giuliano, An
exploratory study of the impact of antipatterns on class change- and fault-proneness, June 2012.
[Dudney03] Dudney, B., Asbury, S., Krozak, J., Wittkopf, K.: J2EE AntiPatterns. John Wiley & Sons Inc (2003)