1. Specification and Detection of SOA Antipatterns
Francis Palma1,2
In collaboration with
Naouel Moha1, Mathieu Nayrolles 1, Benjamin Joyen Conseil 1,
Yann-Gaël Guéhéneuc 2.
1 LATECE , Département d'informatique, Université du Québec à Montréal, Canada
2 Ptidej Team, DGIGL, École Polytechnique de Montréal, Canada
2. Problem Context (1/3)
Service-based System
Service Requester
HTTP, SOAP, WSDL, UDDI,
WS-Technologies Service Provider
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
- Antipatterns hinder the future maintenance and evolution of SBSs
2
Francis Palma, Specification and Detection of SOA Antipatterns
3. Problem Context (2/3)
Tiny Service
Multiservice
Examples of SOA Antipatterns:
Tiny Service: Small service with few methods which requires several
coupled services to complete an abstraction
Multiservice: Implements a multitude of methods, is not easily reusable
because of low cohesion of its methods, is often unavailable due to overload
3
Francis Palma, Specification and Detection of SOA Antipatterns
4. Problem Context (3/3)
results
Service-based (or any)
Systems with Antipatterns
Thus, automatic detection of SOA Antipatterns in SBSs requires special attention
4
Francis Palma, Specification and Detection of SOA Antipatterns
5. Outline
- Introduction
- Related Work
- Approach
- Experiments/Results
- Conclusion
5
Francis Palma, Specification and Detection of SOA Antipatterns
6. Introduction: Contribution
With the goal to assess the design and QoS of SBSs:
- SODA (Service Oriented Detection for Antipatterns), a novel and
innovative approach
- SOFA (Service Oriented Framework for Antipatterns), a framework,
- to specify SOA antipatterns and detect them automatically
- to perform static and dynamic analysis
6
Francis Palma, Specification and Detection of SOA Antipatterns
7. Outline
- Introduction
- Related Work
- Approach
- Experiments/Results
- Conclusion
7
Francis Palma, Specification and Detection of SOA Antipatterns
8. Related Work (1/2)
OO SOA
• Several books: • Only 2 books:
Books Brown 1998, Fowler 1999 Dudney 2003, Rotem-Gal-
Oz 2012
• Numerous mature methods: • Still in their infancy:
Detection Munro 2005, Lanza 2006, Kral 2008
Methods Moha 2010, Kessentini 2010,
Settas 2011
Other • Web sites, courses, • Many Web sites of SOA
references magazines, journals etc. practitioners
8
Francis Palma, Specification and Detection of SOA Antipatterns
9. Related Work (2/2)
OO SOA
• Procedural design style • OO style design in SOA
Root cause
in OO system system
First class
• Classes • Services
entities
Analysis • Mainly static • Highly dynamic
9
Francis Palma, Specification and Detection of SOA Antipatterns
10. Related Work (2/2)
OO SOA
• Procedural design style • OO style design in SOA
Root cause
in OO system system
First class
• Classes • Services
entities
Analysis • Mainly static • Highly dynamic
è 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
10
Francis Palma, Specification and Detection of SOA Antipatterns
11. Outline
- Introduction
- Related Work
- Approach
- Experiments/Results
- Conclusion
11
Francis Palma, Specification and Detection of SOA Antipatterns
12. Approach (1/9): SODA
SODA: Service Oriented Detection for Antipatterns
SBS
1. Specifications
2. Generation
3. Detection
Rule Detection
Textual
Card algorithm Suspicious
Description of
Antipatterns Services
12
Francis Palma, Specification and Detection of SOA Antipatterns
13. Approach (2/9): Specification
SBS
1. Specifications
2. Generation
3. Detection
Textual Rule Card Detection Suspicious
1. Specify SOA Description of algorithm Services
Antipatterns
Antipatterns
Domain Analysis
BNF “Multi Service also known as God Object
corresponds to a service that implements a multitude
Domain Specific
Language of methods related to different business and technical
abstractions . This aggregates too much into a single
Rule Cards of service, such a service is not easily reusable because
Antipatterns
of the low cohesion of its methods and is often
unavailable to end -users because of its overload ,
which may induce a high response time”
13
Francis Palma, Specification and Detection of SOA Antipatterns
14. Approach (3/9): Domain Specific Language
SBS
1. Specifications
2. Generation
3. Detection
Textual Rule Card Detection Suspicious
Description of algorithm Services
Antipatterns
14
Francis Palma, Specification and Detection of SOA Antipatterns
15. Approach (4/9): Example Rule Cards
SBS
1. Specifications
2. Generation
3. Detection
Textual Rule Card Detection Suspicious
Description of algorithm Services
Antipatterns
Tiny Service
1 RULE CARD: TinyService {
2 RULE: TinyService { INTER FewMethod HighCoupling };
3 RULE: FewMethod { NMD VERY LOW };
4 RULE: HighCoupling { CPL HIGH };
5 };
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 };
15
Francis Palma, Specification and Detection of SOA Antipatterns
16. Approach (5/9): Generation
SBS
1. Specifications
2. Generation
3. Detection
Textual Rule Card Detection Suspicious
Description of algorithm Services
Antipatterns
16
Francis Palma, Specification and Detection of SOA Antipatterns
17. Approach (6/9): Detection
SBS
1. Specifications
2. Generation
3. Detection
Textual Rule Card Detection Suspicious
Description of algorithm Services
Antipatterns
SOFA
Framework
17
Francis Palma, Specification and Detection of SOA Antipatterns
18. Approach (7/9): Underlying Framework
Main Components:
(1) Automated generation of detection algorithms
(2) Computation of static and dynamic metrics
(3) Specification of rules
18
Francis Palma, Specification and Detection of SOA Antipatterns
19. Approach (8/9): Underlying Framework
Main Components:
(1) Automated generation of detection algorithms
(2) Computation of static and dynamic metrics
(3) Specification of rules
19
Francis Palma, Specification and Detection of SOA Antipatterns
20. Approach (9/9): Underlying Framework
Main Components:
(1) Automated generation of detection algorithms
(2) Computation of static and dynamic metrics
(3) Specification of rules
20
Francis Palma, Specification and Detection of SOA Antipatterns
21. Outline
- Introduction
- Related Work
- Approach
- Experiments/Results
- Conclusion
21
Francis Palma, Specification and Detection of SOA Antipatterns
22. Experiments (1/5): Setup
Purpose:
To validate the effectiveness of generated detection algorithms and the
usefulness of SODA
Expected Results:
§ DSL allows us to specify SOA antipatterns
§ Detection algorithms have a recall of 100% and an accuracy more than 75%
§ The detection times are the order of few seconds
Subjects: 10 SOA antipatterns
Objects: 2 versions of Home-Automation
Process: Precision and recall on Home-Automation (v1.0 and v1.1)
22
Francis Palma, Specification and Detection of SOA Antipatterns
23. Experiments (2/5): Assumptions
A1. Completeness: The DSL allows the specification of many different SOA
antipatterns, from simple to more complex ones
A2. Accuracy: The generated detection algorithms have a recall of 100%,
and a precision greater than 75%
A3. Extensibility: The DSL and the SOFA framework are extensible for
adding new SOA antipatterns
A4. Performance: The computation time required for the detection of
antipatterns using the generated algorithms is reasonably very low (few
seconds)
23
Francis Palma, Specification and Detection of SOA Antipatterns
24. Experiments (2/5): Assumptions
A1. Completeness: The DSL allows the specification of many different SOA
antipatterns, from simple to more complex ones
A2. Accuracy: The generated detection algorithms have a recall of 100%,
and a precision greater than 75%
A3. Extensibility: The DSL and the SOFA framework are extensible for
adding new SOA antipatterns
A4. Performance: The computation time required for the detection of
antipatterns using the generated algorithms is reasonably very low (few
seconds)
24
Francis Palma, Specification and Detection of SOA Antipatterns
25. Experiments (2/5): Assumptions
A1. Completeness: The DSL allows the specification of many different SOA
antipatterns, from simple to more complex ones
A2. Accuracy: The generated detection algorithms have a recall of 100%,
and a precision greater than 75%
A3. Extensibility: The DSL and the SOFA framework are extensible for
adding new SOA antipatterns
A4. Performance: The computation time required for the detection of
antipatterns using the generated algorithms is reasonably very low (few
seconds)
25
Francis Palma, Specification and Detection of SOA Antipatterns
26. Experiments (2/5): Assumptions
A1. Completeness: The DSL allows the specification of many different SOA
antipatterns, from simple to more complex ones
A2. Accuracy: The generated detection algorithms have a recall of 100%,
and a precision greater than 75%
A3. Extensibility: The DSL and the SOFA framework are extensible for
adding new SOA antipatterns
A4. Performance: The computation time required for the detection of
antipatterns using the generated algorithms is reasonably very low (few
seconds)
26
Francis Palma, Specification and Detection of SOA Antipatterns
27. Experiments (3/5): Subjects
- Apply SODA using SOFA framework to specify 10 SOA antipatterns
- 7 SOA antipatterns from literature, 3 newly defined
Service Chain
Bottleneck Service
The Knot
27
Francis Palma, Specification and Detection of SOA Antipatterns
28. Experiments (4/5): Objects
Two different versions of Home-Automation:
- Original version with 13 services
- A version modified by adding & modifying services to inject Antipatterns
28
Francis Palma, Specification and Detection of SOA Antipatterns
29. Experiments (5/5):Process
1. Use SOFA to generate detection algorithms for corresponding rule cards
2. Apply these algorithms on Home-Automation
3. Validate detection results by analyzing the suspicious services manually:
- Validate Suspicious Services as True Positives (TP)
- Identify False Negatives (FN)
q Use Precision (P) and Recall (R) for accuracy measurement
29
Francis Palma, Specification and Detection of SOA Antipatterns
30. Outline
- Introduction
- Related Work
- Approach
- Experiments/Results
- Conclusion
30
Francis Palma, Specification and Detection of SOA Antipatterns
31. Results (1/8): Detection
Detection of Bottleneck Service: Mediator and Patient DAO
31
Francis Palma, Specification and Detection of SOA Antipatterns
32. Results (2/8): Detection
Detection of Duplicated Service: Mediator and Communication
32
Francis Palma, Specification and Detection of SOA Antipatterns
33. Results (3/8): Detection
Detection of Multiservice: Mediator
33
Francis Palma, Specification and Detection of SOA Antipatterns
34. Results (4/8): Assumption A1
A1. Completeness: The DSL allows the specification of many different SOA
antipatterns, from simple to more complex ones.
Bottleneck Service
The Knot Sand Pile
34
35. Results (4/8): Assumption A1
A1. Completeness: The DSL allows the specification of many different SOA antipatterns, from simple to more complex
ones.
Therefore, any SOA antipattern from
simpler to more complex ones can be
defined using our DSL
35
Francis Palma, Specification and Detection of SOA Antipatterns
36. Results (5/8): Assumption A2
A2. Accuracy: The generated detection algorithms have a recall of 100%, i.e., all existing antipatterns are detected, and
a precision greater than 75%.
36
Francis Palma, Specification and Detection of SOA Antipatterns
37. Results (5/8): Assumption A2
A2. Accuracy: The generated detection algorithms have a recall of 100%, i.e., all existing antipatterns are detected, and
a precision greater than 75%.
Our detection algorithms have high
Precision and Recall…
37
Francis Palma, Specification and Detection of SOA Antipatterns
38. Results (6/8): Assumption A3
A3. Extensibility: The DSL and the SOFA framework are extensible for adding new SOA antipatterns.
38
Francis Palma, Specification and Detection of SOA Antipatterns
39. Results (6/8): Assumption A3
A3. Extensibility: The DSL and the SOFA framework are extensible for adding new SOA antipatterns.
Our DSL and SOFA framework are
extensible for new SOA antipatterns…
39
Francis Palma, Specification and Detection of SOA Antipatterns
40. Results (7/8): Assumption A4
A4. Performance: The computation time required for the detection of antipatterns using the generated algorithms is
reasonably very low.
40
Francis Palma, Specification and Detection of SOA Antipatterns
41. Results (7/8): Assumption A4
A4. Performance: The computation time required for the detection of antipatterns using the generated algorithms is
reasonably very low.
Computation time required for detection using
our generated algorithms is reasonably low…
41
Francis Palma, Specification and Detection of SOA Antipatterns
42. Results (8/8): Summary
q Specify and generate detection algorithms for 10 SOA antipatterns
q Detect 10 SOA antipatterns in Home-Automation
q Including 2 SOA antipatterns in modified version
q Precision of our detection algorithms is 92.5%, and Recall is 100%
q Detail results and more materials on sofa.uqam.ca
42
Francis Palma, Specification and Detection of SOA Antipatterns
43. Threats to Validity
Ø External Validity
Ø Internal Validity: Detection depends on services provided by SOFA ,
experiment on a representative set of antipatterns
Ø Construct Validity: Subjective nature, define rule cards based on
literature review & domain analysis
Ø Reliability Validity: Automate the generation of detection algorithm;
subsequent detection produce consistent sets of results
43
Francis Palma, Specification and Detection of SOA Antipatterns
44. Outline
- Introduction
- Related Work
- Approach
- Experiments/Results
- Conclusion
44
Francis Palma, Specification and Detection of SOA Antipatterns
45. Conclusion
45
Francis Palma, Specification and Detection of SOA Antipatterns
46. Conclusion
46
Francis Palma, Specification and Detection of SOA Antipatterns
47. Conclusion
47
Francis Palma, Specification and Detection of SOA Antipatterns
48. Conclusion
48
Francis Palma, Specification and Detection of SOA Antipatterns
49. Future Works: Part 1
- Add more SOA antipatterns to SOFA
- Replicate SODA approach on other SBSs
- Using industrial setup
- Increase the precision
- Introduce refactoring module within SOFA
49
Francis Palma, Specification and Detection of SOA Antipatterns
50. Future Works: Part 2
- Association rules on execution traces
- Machine learning technique…
- Semantic analysis
50
Francis Palma, Specification and Detection of SOA Antipatterns
51. Thank You
Questions ?
51
Francis Palma, Specification and Detection of SOA Antipatterns