what can we learn about locating refactoring...
TRANSCRIPT
![Page 1: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/1.jpg)
WHAT CAN WE LEARN ABOUT LOCATING REFACTORING OPPORTUNITIES
FROM
DECOMPOSING SOFTWARE TO MICROSERVICES
SIU/CAPES bilateral project "Modern Refactoring"
Anna Maria Eilertsen, University of Bergen
![Page 2: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/2.jpg)
EXTRACT AND MOVE METHODLOCATING REFACTORING OPPORTUNITIES
MICROSERVICES
SOFTWARE DECOMPOSITION
![Page 3: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/3.jpg)
B.S. University of Bergen, computer science
M.S. joint University of Bergen & Western Norwegian University of Applied Sciences (Volker Stolz)
PhD University of Bergen, Language / Processor Co-Evolution (Anya Bagge)
currently on research stay at (the very empirical) Software Engineering group at University of British Columbia, Canada (Gail C. Murphy)
ME: PAST-CURRENT
![Page 4: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/4.jpg)
(EXTRACT AND) MOVE METHOD
![Page 5: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/5.jpg)
(EXTRACT AND) MOVE METHODExtract method
Move method
class A
class A class B
![Page 6: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/6.jpg)
(EXTRACT AND) MOVE METHOD
Extract method
Move method
![Page 7: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/7.jpg)
LOCATING REFACTORING OPPORTUNITIES
Extract method
Move method
![Page 8: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/8.jpg)
LOCATING REFACTORING OPPORTUNITIES
![Page 9: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/9.jpg)
WHEN TO REFACTOR
https://refactoring.guru/refactoring/catalog
![Page 10: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/10.jpg)
LOCATING REFACTORING OPPORTUNITIES
https://refactoring.guru/refactoring/catalog
all possible
smell-reducing
machine learning
metrics-aware
heuristics
![Page 11: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/11.jpg)
LOCATING REFACTORING OPPORTUNITIES
![Page 12: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/12.jpg)
USE, DISUSE, MISUSE
ICSE 2012, Zurich, Switzerland
![Page 13: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/13.jpg)
LARGE-SCALE REFACTORING
328 engineers participated in the survey.
FSE’12 November 10 - 18 2012, Raleigh, NC, USA
![Page 14: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/14.jpg)
SOFTWARE DECOMPOSITION
![Page 15: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/15.jpg)
SOFTWARE DECOMPOSITION
“Finding, or creating, ‘seams’ in your code base”
- Michael Feathers, Working Effectively with Legacy Code
![Page 16: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/16.jpg)
MICROSERVICES
• Clear areas of responsibility
• Strong encapsulation
• Individually deployable
![Page 17: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/17.jpg)
DECOMPOSING MONOLITHS TO MICROSERVICES
Bottom: Mazlami2017Top: Yarygina2018
![Page 18: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/18.jpg)
2016-2018
DECOMPOSITION TO MICROSERVICES
![Page 19: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/19.jpg)
DECOMPOSITION TO MICROSERVICES
MVC-based [Levcovitz2016]
resource based [Levcovitz2016, Mazlami2017, Gysel2016]
metrics-based, source code analysis (k-clustering) [Mazlami2017, Gysel2016, Selmadji2018]
team structure [Mazlami2017]
interface analysis (semantic) [Baresi2017]
![Page 20: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/20.jpg)
LOCATING REFACTORING OPPORTUNITIES?
MVC-based [Levcovitz2016]
resource based [Levcovitz2016, Mazlami2017, Gysel2016]
metrics-based, source code analysis (k-clustering) [Mazlami2017, Gysel2016, Selmadji2018]
team structure [Mazlami2017]
interface analysis (semantic) [Baresi2017]
![Page 21: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/21.jpg)
LOCATING REFACTORING OPPORTUNITIES
Mazlami2017
![Page 22: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/22.jpg)
Anna Maria Eilertsen
University of Bergen, Norway
https://annaei.github.io/
@sowhow
![Page 23: WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano](https://reader034.vdocuments.site/reader034/viewer/2022042303/5ece5809a59d69109e45e18a/html5/thumbnails/23.jpg)
REFERENCES
[Gysel2016]Service Cutter: A Systematic Approach to Service DecompositionMichael Gysel1, Lukas Kölbener1, Wolfgang Giersche2and Olaf Zimmermann1IFIP International Federation for Information Processing 2016
[Mazlami2017] Extraction of Microservices from Monolithic Software ArchitecturesGenc Mazlami, Ju ̈rgen Cito, Philipp Leitner2017 IEEE 24th International Conference on Web Services
[Selmadji2018[ Re-architecting OO Software into Microservices A Quality-Centred ApproachAnfel Selmadji(B), Abdelhak-Djamel Seriai, Hinde Lilia Bouziane, Christophe Dony, and Rahina Oumarou MahamaneIFIP International Federation for Information Processing 2018
[Baresi2017]Microservices Identification through Interface AnalysisLuciano Baresi1, Martin Garriga1, and Alan De Renzis2Conference Paper · September 2017
[Levcovitz2016]Levcovitz, A., Terra, R., Valente, M.T.: Towards a technique for extracting microservices from monolithic enterprise systems. arXiv preprint (2016)
[Yarygina2018]Yarygina, Tetiana. "Exploring Microservice Security." (2018).