VRIJE
UNIVERSITEIT
AMSTERDAM
Ivano Malavolta
Assistant professor
Vrije Universiteit Amsterdam
Reconstructing
microservice-based
architectures
Ivano Malavolta
The Green Lab
Our platform for researching
on software
– energy efficiency
– performance
– software quality in general
Students measure
real software solutions
OpenSTF
+ ADB
Serve
web pages
VMWare
manager
SSH
MEASURES
Wifi
network
Router
Experiment
orchestrator
OpenSTF
Web
interface
Power
meters
A PLATFORM
A COURSE
Ivano Malavolta
Roadmap
Questions
Problem
Microservices 1-o-1
Solution
Data-driven architecting
Ivano Malavolta
Microservices 1-o-1
Ivano Malavolta
Microservices
• Products not projects
• Cross-functional teams
• Infrastructure automation
• Intelligence in the endpoints
• Decentralized governance of
• technologies
• data Delivery Pipelines
Teams Capabilities
Ivano Malavolta
Technologies
https://www.weave.works/blog/what-are-microservices
Ivano Malavolta
Containers
Virtual machines Containers
https://www.slideshare.net/ChrisCiborowski/docker-birthday-3-slides-overview
Ivano Malavolta
The problem
Ivano Malavolta
The problem
Ivano Malavolta
?
Difficult to get the “big picture”
• interdependent microservices
• technologically polyglot
• many different teams
• different speeds (dev. and deploy)
... what if we add a new feature?
• how to estimate the impact of that change?
... what if we restructure those 5
microservices?
• is this change “breaking” other parts of the
system?
New services?
System-level
refactoring?
A miracle*
happens!
* Miracle = experience of senior developers, devOps , architects
Ivano Malavolta
Solution
Giona Granchelli, Mario Cardarelli, Paolo Di Francesco, Ivano Malavolta, Ludovico Iovino, Amleto Di Salle. Towards
Recovering the Software Architecture of Microservice-based Systems. In 2017 IEEE International Conference on
Software Architecture Workshops, ICSA Workshops 2017, Gothenburg, Sweden, April 5-7, 2017.
Giona Granchelli, Mario Cardarelli, Paolo Di Francesco, Ivano Malavolta, Ludovico Iovino, Amleto Di Salle.
MicroART: A Software Architecture Recovery Tool for Maintaining Microservice-based Systems. In Proceedings of
the 14th International Conference on Software Architecture (ICSA), April 4, 2017.
Ivano Malavolta
MicroART
Running system
MicroART domain-specific language (DSL)
Ivano Malavolta
Architecture recovery
Reconstruct the architecture
of complex systems in an
automated manner
INPUT
-- GitHub repo
-- running system
OUTPUT
-- extracted architecture
Goal
Ivano Malavolta
MicroART domain-specific language
• Abstract and minimalistic
• Formally defined
à can be managed by
other software!
• Relies on Fowler’s and
Newman’s principles
Ivano Malavolta
Recovered architecture
Fully automatic
à applicable to existing systems!
All the services are connected to
the service discovery
This topology is not so informative if
we want to focus on system
evolution and maintainability
à REFINEMENT
Ivano Malavolta
Architecture refinement
Development-oriented
dependencies among services
Semi-automatic
Ivano Malavolta
Monitoring tools are just a “photo” of the run-time of your system
actual photo
of the system
“after effect” photo
of the system
the future photos
of the system+ +
Metric name Description
Commits per service Number of commits on each microservice
Commits within system Total number of commit on the system
Developers per service Number of developers working on the microservice
Is stateful Tracks the statefulness of a microservice
NoS Number of microservices in the system
NoD Number of developers working on the system
NoC Number of clusters in the system
Cyclomatic Complexity Quantitative measure of the number of linearly
independent paths through a program’s source code
Relative complexity of a service Coupling of microservice / number of microservices
Metric name Description
Commits per service Number of commits on each microservice
Commits within system Total number of commit on the system
Developers per service Number of developers working on the microservice
Is stateful Tracks the statefulness of a microservice
NoS Number of microservices in the system
NoD Number of developers working on the system
NoC Number of clusters in the system
Cyclomatic Complexity Quantitative measure of the number of linearly
independent paths through a program’s source code
Relative complexity of a service Coupling of microservice / number of microservices
Metric name Description
Commits per service Number of commits on each microservice
Commits within system Total number of commit on the system
Developers per service Number of developers working on the microservice
Is stateful Tracks the statefulness of a microservice
NoS Number of microservices in the system
NoD Number of developers working on the system
NoC Number of clusters in the system
Cyclomatic Complexity Quantitative measure of the number of linearly
independent paths through a program’s source code
Relative complexity of a service Coupling of microservice / number of microservices
Metric name Description
Commits per service Number of commits on each microservice
Commits within system Total number of commit on the system
Developers per service Number of developers working on the microservice
Is stateful Tracks the statefulness of a microservice
NoS Number of microservices in the system
NoD Number of developers working on the system
NoC Number of clusters in the system
Cyclomatic Complexity Quantitative measure of the number of linearly
independent paths through a program’s source code
Relative complexity of a service Coupling of microservice / number of microservices
Metric name Description
Commits per service Number of commits on each microservice
Commits within system Total number of commit on the system
Developers per service Number of developers working on the microservice
Is stateful Tracks the statefulness of a microservice
NoS Number of microservices in the system
NoD Number of developers working on the system
NoC Number of clusters in the system
Cyclomatic Complexity Quantitative measure of the number of linearly
independent paths through a program’s source code
Relative complexity of a service Coupling of microservice / number of microservices
Metric name Description
Commits per service Number of commits on each microservice
Commits within system Total number of commit on the system
Developers per service Number of developers working on the microservice
Is stateful Tracks the statefulness of a microservice
NoS Number of microservices in the system
NoD Number of developers working on the system
NoC Number of clusters in the system
Cyclomatic Complexity Quantitative measure of the number of linearly
independent paths through a program’s source code
Relative complexity of a service Coupling of microservice / number of microservices
My monitoring tool is much
better than this...
MicroART is:
MicroART is used for planning development activities
Ivano Malavolta
Data-driven architecting
Mario Cardarelli. Agility of Microservice Architectures: a Metrics-based Approach. Master thesis, University of
L’Aquila, Italy, March, 2017,
Ivano Malavolta
• The market is full of metric-based tools for performance
• The market LACKS metric-based tools for development-time
structural analysis
– calculate coupling and cohesion
– calculate change impact
– <ADD_YOUR_OWN_METRIC_HERE>
• Example of query on the metrics:
Metrics
Ivano Malavolta
• Additional layer on top of MicroART
• Architects can specify their own metrics
– your notion of complexity may be different than mine
Metrics
Calculator
Metrics calculator
Ivano Malavolta
COUPLING - How much the microservices are interrelated each other
COHESION – How much the operations of a microservice belong together
COMPLEXITY - The total amount of work performed by a microservice
Default metrics in MicroART
Ivano Malavolta
High quality software à low coupling
à low complexity
à high cohesion
Quality Attributes
Ivano Malavolta
Repository
Metrics
Statistical
Metrics
Structural
Metrics
Other supported metrics (so far)
Metric name Description
Commits per service Number of commits on each microservice
Commits within system Total number of commit on the system
Developers per service Number of developers working on the microservice
Is stateful Tracks the statefulness of a microservice
NoS Number of microservices in the system
NoD Number of developers working on the system
NoC Number of clusters in the system
Cyclomatic Complexity Quantitative measure of the number of linearly
independent paths through a program’s source code
Relative complexity of a service Coupling of microservice / number of microservices
Ivano Malavolta
• Prediction of costs on Cloud Computing Services
• AWS
• Bluemix
• ...
• Custom metrics
• Resolution of additional infrastructural services
• Dashboarding
• developers can define their own visualizations of the architecture
• Support for other container managers and Cloud solutions
• Integration with Prometheus ... and with other monitoring tools
MicroART plug-ins (work in progress)
Ivano Malavolta
Wrap up
Ivano Malavolta
?
Difficult to get the “big picture”
• interdependent microservices
• technologically polyglot
• many different teams
• different speeds (dev. and deploy)
... what if we add a new feature?
• how to estimate the impact of that change?
... what if we restructure those 5
microservices?
• is this change “breaking” other parts of the
system?
New services?
System-level
refactoring?
A miracle*
happens!
* Miracle = experience of senior developers, devOps , architects Ivano Malavolta
Architecture recovery
Reconstruct the architecture
of complex systems in an
automated manner
INPUT
-- GitHub repo
-- running system
OUTPUT
-- extracted architecture
Goal
Ivano Malavolta
Architecture refinement
Development-oriented
dependencies among services
Semi-automatic
Ivano Malavolta
• The market is full of metric-based tools for performance
• The market LACKS metric-based tools for structural analysis
– calculate coupling and cohesion
– calculate change impact
• Example of query on the metrics:
Metrics
Ivano Malavolta
Why we are here @ LAC congres
• How do you approach a change in the architecture of your system?
• Do you want to try MicroART on your system?
– fully automatic
– not intrusive
– no leak of any data
• Did you migrate towards microservices? If yes, how?
Ivano Malavolta
Contact
Ivano Malavolta |
Vrije Universiteit Amsterdam
iivanoo
i.malavolta@vu.nl
www.ivanomalavolta.com
A few of the contents of this presentation are from co-authors’ slides

Reconstructing microservice-based architectures

  • 1.
    VRIJE UNIVERSITEIT AMSTERDAM Ivano Malavolta Assistant professor VrijeUniversiteit Amsterdam Reconstructing microservice-based architectures
  • 2.
    Ivano Malavolta The GreenLab Our platform for researching on software – energy efficiency – performance – software quality in general Students measure real software solutions OpenSTF + ADB Serve web pages VMWare manager SSH MEASURES Wifi network Router Experiment orchestrator OpenSTF Web interface Power meters A PLATFORM A COURSE
  • 3.
  • 4.
  • 5.
    Ivano Malavolta Microservices • Productsnot projects • Cross-functional teams • Infrastructure automation • Intelligence in the endpoints • Decentralized governance of • technologies • data Delivery Pipelines Teams Capabilities
  • 6.
  • 7.
    Ivano Malavolta Containers Virtual machinesContainers https://www.slideshare.net/ChrisCiborowski/docker-birthday-3-slides-overview
  • 8.
  • 9.
  • 10.
    Ivano Malavolta ? Difficult toget the “big picture” • interdependent microservices • technologically polyglot • many different teams • different speeds (dev. and deploy) ... what if we add a new feature? • how to estimate the impact of that change? ... what if we restructure those 5 microservices? • is this change “breaking” other parts of the system? New services? System-level refactoring? A miracle* happens! * Miracle = experience of senior developers, devOps , architects
  • 11.
    Ivano Malavolta Solution Giona Granchelli,Mario Cardarelli, Paolo Di Francesco, Ivano Malavolta, Ludovico Iovino, Amleto Di Salle. Towards Recovering the Software Architecture of Microservice-based Systems. In 2017 IEEE International Conference on Software Architecture Workshops, ICSA Workshops 2017, Gothenburg, Sweden, April 5-7, 2017. Giona Granchelli, Mario Cardarelli, Paolo Di Francesco, Ivano Malavolta, Ludovico Iovino, Amleto Di Salle. MicroART: A Software Architecture Recovery Tool for Maintaining Microservice-based Systems. In Proceedings of the 14th International Conference on Software Architecture (ICSA), April 4, 2017.
  • 12.
  • 13.
    Ivano Malavolta Architecture recovery Reconstructthe architecture of complex systems in an automated manner INPUT -- GitHub repo -- running system OUTPUT -- extracted architecture Goal
  • 14.
    Ivano Malavolta MicroART domain-specificlanguage • Abstract and minimalistic • Formally defined à can be managed by other software! • Relies on Fowler’s and Newman’s principles
  • 15.
    Ivano Malavolta Recovered architecture Fullyautomatic à applicable to existing systems! All the services are connected to the service discovery This topology is not so informative if we want to focus on system evolution and maintainability à REFINEMENT
  • 16.
  • 17.
    Ivano Malavolta Monitoring toolsare just a “photo” of the run-time of your system actual photo of the system “after effect” photo of the system the future photos of the system+ + Metric name Description Commits per service Number of commits on each microservice Commits within system Total number of commit on the system Developers per service Number of developers working on the microservice Is stateful Tracks the statefulness of a microservice NoS Number of microservices in the system NoD Number of developers working on the system NoC Number of clusters in the system Cyclomatic Complexity Quantitative measure of the number of linearly independent paths through a program’s source code Relative complexity of a service Coupling of microservice / number of microservices Metric name Description Commits per service Number of commits on each microservice Commits within system Total number of commit on the system Developers per service Number of developers working on the microservice Is stateful Tracks the statefulness of a microservice NoS Number of microservices in the system NoD Number of developers working on the system NoC Number of clusters in the system Cyclomatic Complexity Quantitative measure of the number of linearly independent paths through a program’s source code Relative complexity of a service Coupling of microservice / number of microservices Metric name Description Commits per service Number of commits on each microservice Commits within system Total number of commit on the system Developers per service Number of developers working on the microservice Is stateful Tracks the statefulness of a microservice NoS Number of microservices in the system NoD Number of developers working on the system NoC Number of clusters in the system Cyclomatic Complexity Quantitative measure of the number of linearly independent paths through a program’s source code Relative complexity of a service Coupling of microservice / number of microservices Metric name Description Commits per service Number of commits on each microservice Commits within system Total number of commit on the system Developers per service Number of developers working on the microservice Is stateful Tracks the statefulness of a microservice NoS Number of microservices in the system NoD Number of developers working on the system NoC Number of clusters in the system Cyclomatic Complexity Quantitative measure of the number of linearly independent paths through a program’s source code Relative complexity of a service Coupling of microservice / number of microservices Metric name Description Commits per service Number of commits on each microservice Commits within system Total number of commit on the system Developers per service Number of developers working on the microservice Is stateful Tracks the statefulness of a microservice NoS Number of microservices in the system NoD Number of developers working on the system NoC Number of clusters in the system Cyclomatic Complexity Quantitative measure of the number of linearly independent paths through a program’s source code Relative complexity of a service Coupling of microservice / number of microservices Metric name Description Commits per service Number of commits on each microservice Commits within system Total number of commit on the system Developers per service Number of developers working on the microservice Is stateful Tracks the statefulness of a microservice NoS Number of microservices in the system NoD Number of developers working on the system NoC Number of clusters in the system Cyclomatic Complexity Quantitative measure of the number of linearly independent paths through a program’s source code Relative complexity of a service Coupling of microservice / number of microservices My monitoring tool is much better than this... MicroART is: MicroART is used for planning development activities
  • 18.
    Ivano Malavolta Data-driven architecting MarioCardarelli. Agility of Microservice Architectures: a Metrics-based Approach. Master thesis, University of L’Aquila, Italy, March, 2017,
  • 19.
    Ivano Malavolta • Themarket is full of metric-based tools for performance • The market LACKS metric-based tools for development-time structural analysis – calculate coupling and cohesion – calculate change impact – <ADD_YOUR_OWN_METRIC_HERE> • Example of query on the metrics: Metrics
  • 20.
    Ivano Malavolta • Additionallayer on top of MicroART • Architects can specify their own metrics – your notion of complexity may be different than mine Metrics Calculator Metrics calculator
  • 21.
    Ivano Malavolta COUPLING -How much the microservices are interrelated each other COHESION – How much the operations of a microservice belong together COMPLEXITY - The total amount of work performed by a microservice Default metrics in MicroART
  • 22.
    Ivano Malavolta High qualitysoftware à low coupling à low complexity à high cohesion Quality Attributes
  • 23.
    Ivano Malavolta Repository Metrics Statistical Metrics Structural Metrics Other supportedmetrics (so far) Metric name Description Commits per service Number of commits on each microservice Commits within system Total number of commit on the system Developers per service Number of developers working on the microservice Is stateful Tracks the statefulness of a microservice NoS Number of microservices in the system NoD Number of developers working on the system NoC Number of clusters in the system Cyclomatic Complexity Quantitative measure of the number of linearly independent paths through a program’s source code Relative complexity of a service Coupling of microservice / number of microservices
  • 24.
    Ivano Malavolta • Predictionof costs on Cloud Computing Services • AWS • Bluemix • ... • Custom metrics • Resolution of additional infrastructural services • Dashboarding • developers can define their own visualizations of the architecture • Support for other container managers and Cloud solutions • Integration with Prometheus ... and with other monitoring tools MicroART plug-ins (work in progress)
  • 25.
    Ivano Malavolta Wrap up IvanoMalavolta ? Difficult to get the “big picture” • interdependent microservices • technologically polyglot • many different teams • different speeds (dev. and deploy) ... what if we add a new feature? • how to estimate the impact of that change? ... what if we restructure those 5 microservices? • is this change “breaking” other parts of the system? New services? System-level refactoring? A miracle* happens! * Miracle = experience of senior developers, devOps , architects Ivano Malavolta Architecture recovery Reconstruct the architecture of complex systems in an automated manner INPUT -- GitHub repo -- running system OUTPUT -- extracted architecture Goal Ivano Malavolta Architecture refinement Development-oriented dependencies among services Semi-automatic Ivano Malavolta • The market is full of metric-based tools for performance • The market LACKS metric-based tools for structural analysis – calculate coupling and cohesion – calculate change impact • Example of query on the metrics: Metrics
  • 26.
    Ivano Malavolta Why weare here @ LAC congres • How do you approach a change in the architecture of your system? • Do you want to try MicroART on your system? – fully automatic – not intrusive – no leak of any data • Did you migrate towards microservices? If yes, how?
  • 27.
    Ivano Malavolta Contact Ivano Malavolta| Vrije Universiteit Amsterdam iivanoo i.malavolta@vu.nl www.ivanomalavolta.com A few of the contents of this presentation are from co-authors’ slides