2. 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
5. Ivano Malavolta
Microservices
• Products not projects
• Cross-functional teams
• Infrastructure automation
• Intelligence in the endpoints
• Decentralized governance of
• technologies
• data Delivery Pipelines
Teams Capabilities
10. 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
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.
14. 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
15. 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
17. 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
19. 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
20. 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
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
23. 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
24. 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)
25. 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
26. 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?
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