23
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

WHAT CAN WE LEARN ABOUT LOCATING REFACTORING …home.hvl.no/ansatte/vsto/modernrefactoring/Anna... · 2018-11-22 · Microservices Identification through Interface Analysis Luciano

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

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

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

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

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

(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

(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

(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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Anna Maria Eilertsen

University of Bergen, Norway

https://annaei.github.io/

@sowhow

[email protected]

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

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).