This document discusses investigating the change-proneness of service patterns and antipatterns in service-based systems. It aims to determine the relationship between various service patterns/antipatterns and change-proneness, defined as the frequency and size of changes to service source files. The study analyzes the FraSCAti OW2 system, detecting patterns/antipatterns using SODOP and SODA tools. It examines commit histories to measure changes and aims to understand how patterns/antipatterns impact maintenance effort and costs.
Introduction to Decentralized Applications (dApps)
Soca14.ppt
1. Investigating the Change-proneness of
Service Patterns and Antipatterns
Francis Palma, Le An, Foutse Khomh, Naouel Moha, and Yann-Gaël Guéhéneuc
École Polytechnique de Montréal, Canada
SOCA 2014, Matsue, Japan
2. Problem Context (1/3)
Service-based Systems
2 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
SOAP
Web Services
SCA Systems
3. Problem Context (1/3)
SOAP
Web Services
SCA Systems
Service-based Systems
Design Patterns
2 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
4. Problem Context (1/3)
SOAP
Web Services
SCA Systems
Service-based Systems
Maintenance
Evolution
SOAP Web Services
SCA Systems
Design Patterns
2 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
5. Problem Context (1/3)
SOAP
Web Services
SCA Systems
Service-based Systems
Maintenance
Evolution
SOAP Web Services
SCA Systems
- may degrade the design
- may degrade the QoS = Antipatterns
Design Patterns
2 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
6. Problem Context (1/3)
2 of 21
1. Highly change-prone?
2. Require more maintenance
efforts or cause expensive
maintenance?
SOAP Web Services
SCA Systems
Existing
Antipatterns
?
Investigating the Change-proneness of Service Patterns and Antipatterns
7. Problem Context (2/3):
Service Antipatterns and Patterns
3 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
Multi Service Antipattern
8. Problem Context (2/3):
Service Antipatterns and Patterns
Multi Service Antipattern
Proxy Service Pattern
Proxy
Service
Actual
Service
Calls Calls
Client
3 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
9. Problem Context (3/3): Detection vs. Impact
4 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
• Detection of service patterns? (SODOP, Demange et al. 2013)
• Detection of service antipatterns? (SODA, Moha et al. 2012)
• Improve/degrade the design and the QoS?
• Facilitate/hinder the maintenance and evolution of an SBS?
- impact on the change-proneness, i.e., maintenance cost?
10. Problem Context (3/3): Detection vs. Impact
Change-proneness of a service*
- number of changes
the frequency of changes on a service source files
- code churns
the size of changes on a service source files
4 of 21
• Detection of service patterns? (SODOP, Demange et al. 2013)
• Detection of service antipatterns? (SODA, Moha et al. 2012)
• Improve/degrade the design and the QoS?
• Facilitate/hinder the maintenance and evolution of an SBS?
- impact on the change-proneness, i.e., maintenance cost?
*Code Churn: A Measure for Estimating the Impact of Code Change: Sebastian G. Elbaum and John C.
Munson (1998)
11. Research Questions
• RQ1: What is the relation between service patterns and
change-proneness?
• RQ2: What is the relation between service antipatterns and
change-proneness?
• RQ3: What is the relation between particular kinds of service
antipatterns and change-proneness?
• Confounding impact of OO code-level smells
5 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
12. Outline
- Analysed System: FraSCAti OW2
- Study Design
- Case Study Results
- Conclusion and Future Work
13. Outline
- Analysed System: FraSCAti OW2
- Study Design
- Case Study Results
- Conclusion and Future Work
14. FraSCAti OW2
frascati.ow2.org
Investigating the Change-proneness of Service Patterns and Antipatterns
Total Services 130 (62 analysed)
Total Size 170 KLOC
Total Changed Files 15,863*
Total Java Source Files 9,020*
Total Changes 71,151*
Total Code Churns 62,676,363*
6 of 21
*Entire commit history
15. Outline
- Analysed System: FraSCAti OW2
- Study Design
- Case Study Results
- Conclusion and Future Work
16. Study Design
7 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
17. Study Design
7 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
20. Study Design
7 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
21. Study Design
7 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
22. Study Design
Detection of Service Patterns:
SODOP – Service Oriented Detection Of Patterns (Demange et al. 2013)
Detection of Service Antipatterns:
SODA – Service Oriented Detection for Antipatterns (Moha et al. 2012)
8 of 21
Names Detected
Instances
Involved Java
Source Files
Patterns
Adapter 1 14
Basic Service 5 54
Facade 3 62
Proxy 3 61
Antipatterns
Bloated Service 3 25
Bottleneck Service 2 24
God Component 2 4
Multi Service 1 5
Nobody Home 4 12
Service Chain 3 10
The Knot 1 24
Tiny Service 1 24
OO Code Smells - 26,381 3,717
23. Study Design
9 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
24. Study Design: Variables
Independent Variables
Eight service antipatterns and four service patterns
i. f1
i a file i was involved in the implementation of at least one pattern (RQ1)
ii. f2
i a file i was involved in the implementation of at least one antipattern (RQ2)
iii. f3
i,j a file i was involved in the implementation of antipattern j (RQ3)
Dependent Variables
Change-proneness of services' source files
i. total number of changes as ci
ii. total number of code churns as di
10 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
25. Study Design: Interpretation of Values
Interpreting the effect sizes
Interpreting the p-values
11 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
26. Outline
- Analysed System: FraSCAti OW2
- Study Design
- Case Study Results
- Conclusion and Future Work
27. RQ1: What is the relation between service patterns
and change-proneness?
12 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
28. RQ1: What is the relation between service patterns
and change-proneness?
12 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
H1
01 : there is no difference between the total number of changes experienced
by files involved in the implementation of a service pattern and other files
H2
01 : there is no difference between the total number of code churns
experienced by files involved in the implementation of a service pattern and
other files
29. H1
01 : there is no difference between the total number of changes experienced
by files involved in the implementation of a service pattern and other files
H2
01 : there is no difference between the total number of code churns
experienced by files involved in the implementation of a service pattern and
other files
12 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
RQ1: What is the relation between service patterns
and change-proneness?
SODOP
Measure
change-proneness
Test H1
01 &H2
01
(Wilcoxon rank sum test)
30. Findings RQ1: Patterns are less change-prone but
not at (statistically) significant level
13 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
31. 13 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
Findings RQ1: Patterns are less change-prone but
not at (statistically) significant level
32. 13 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
Findings RQ1: Patterns are less change-prone but
not at (statistically) significant level
33. RQ2: What is the relation between service
antipatterns and change-proneness?
14 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
34. RQ2: What is the relation between service
antipatterns and change-proneness?
14 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
H1
02: there is no difference between the total number of changes experienced
by files involved in the implementation of a service antipattern and other files
H2
02 : there is no difference between the total number of code churns
experienced by files involved in the implementation of a service antipattern and
other files
35. 14 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
RQ2: What is the relation between service
antipatterns and change-proneness?
H1
02: there is no difference between the total number of changes experienced
by files involved in the implementation of a service antipattern and other files
H2
02 : there is no difference between the total number of code churns
experienced by files involved in the implementation of a service antipattern and
other files
SODA
Measure
change-proneness
Test H1
02 & H2
02
(Wilcoxon rank sum test)
37. 15 of 21
Findings RQ2: Antipatterns are more change-prone
at the statistically significant level
38. RQ3: What is the relation between particular kinds
of service antipatterns and change-proneness?
16 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
39. RQ3: What is the relation between particular kinds
of service antipatterns and change-proneness?
16 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
H1
03: there is no difference between the total number of changes experienced
by files from groups (GAi)iє{1,….8} and GNoAP
H1
03: there is no difference between the total number of code churns
experienced by files from groups (GAi)iє{1,….8} and GNoAP
40. H1
03: there is no difference between the total number of changes experienced
by files from groups (GAi)iє{1,….8} and GNoAP
H1
03: there is no difference between the total number of code churns
experienced by files from groups (GAi)iє{1,….8} and GNoAP
16 of 21
RQ3: What is the relation between particular kinds
of service antipatterns and change-proneness?
SODA
Measure
change-proneness
Test H1
03 & H2
03
(Kruskal-Wallis test)
Classify source files
(antipatterns vs non-antipatterns)
42. 17 of 21
Findings RQ3: Antipatterns (investigated in this
study) are not equally change-prone
43. Confounding Impact:
Are service antipatterns more vulnerable to OO
code-level smells (and vice-versa for service pattern)?
18 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
44. Confounding Impact:
Are service antipatterns more vulnerable to OO
code-level smells (and vice-versa for service pattern)?
18 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
SODA
SODOP
Compare the groups
(Wilcoxon rank sum test)
Classify source files
(patterns vs. non-patterns)
(antipatterns vs. non-antipatterns)
45. Findings on Confounding Impact
19 of 21
Service antipatterns contain more (but not statistically significant) code smells
Service patterns contain less code smells at the statistically significant level
46. Findings on Confounding Impact
19 of 21
Service antipatterns contain more (but not statistically significant) code smells
Service patterns contain less code smells at the statistically significant level
47. Take Home Message…
• Developers should avoid implementing Service
Antipatterns to
- reduce maintenance efforts and costs, and
- improve maintainability and ease evolution
• Implemented service patterns have less code-level
OO smells
20 of 21Investigating the Change-proneness of Service Patterns and Antipatterns
48. Outline
- Analysed System: FraSCAti OW2
- Study Design
- Case Study Results
- Conclusion and Future Work
53. Future Work
• Future works include
- replicate the study on other SBSs and service antipatterns
- investigate the changes types and their impact on antipatterns
- investigate the relation between service antipatterns
and fault-proneness
21 of 21Investigating the Change-proneness of Service Patterns and Antipatterns