AGENDA
OVERVIEW
● HYPOTHESIS
● A BIT OF THEORY
● MICROSERVICE EXPLORING
● SUMMARY
@techiewatt
Slide 5
Slide 5 text
HYPOTHESIS
@techiewatt
Slide 6
Slide 6 text
HYPOTHESIS
@techiewatt
General Hypothesis:
Data Driven Architectural Improvement
You can extract metrics and KPIs from a
microservices architecture using network science
AND
use these to gain insight into the structure and
characteristics of your microservices architecture
Slide 7
Slide 7 text
HYPOTHESIS
@techiewatt
Specifically
Can we use these metrics to detect
bad microservice architectural
smells and anti-patterns like a
tightly coupled architecture
(distributed monolith)
Slide 8
Slide 8 text
A QUICK
BIT OF
THEORY
@techiewatt
Slide 9
Slide 9 text
GRAPH THEORY 101
Nodes /
Vertices
Relationships /
Edges @techiewatt
A graph is a way to
formally represent a
network, or collection of
related objects, in a
mathematical way
Slide 10
Slide 10 text
Show me some
network science
stuff ...
@techiewatt
Slide 11
Slide 11 text
DEGREE
How connected is
a specific node?
@techiewatt
1
Slide 12
Slide 12 text
DEGREE
How connected is
a specific node?
A is more highly
connected than
B and C
6
2
2
@techiewatt
1
Slide 13
Slide 13 text
CLUSTER COEFFICIENT
How tightly is a
group is clustered,
compared to how
tightly it could be
clustered?
@techiewatt
2
Slide 14
Slide 14 text
CLUSTER COEFFICIENT
@techiewatt
2
Slide 15
Slide 15 text
CLUSTER COEFFICIENT
@techiewatt
2
Slide 16
Slide 16 text
CLUSTER COEFFICIENT
@techiewatt
2
Slide 17
Slide 17 text
CLUSTER COEFFICIENT
@techiewatt
0.66
2
Slide 18
Slide 18 text
CLUSTER COEFFICIENT
@techiewatt
0.66
2
Slide 19
Slide 19 text
CLUSTER COEFFICIENT
@techiewatt
0.66
1.0
2
Slide 20
Slide 20 text
COMMUNITY DETECTION
Used to find related
communities and
quantify the quality
of groupings
@techiewatt
3
Slide 21
Slide 21 text
DIVE IN!
EXPLORING
MICROSERVICES (AS A NETWORK)
@techiewatt
Slide 22
Slide 22 text
#1
A “Microservice” Architecture
(v1.0)
@techiewatt
Slide 23
Slide 23 text
@techiewatt
V1.0
Slide 24
Slide 24 text
@techiewatt
V1.0 - NETWORK STATS
Density: 0.19
Number of nodes: 20
Number of edges: 36
Average degree: 3.6000
Average Clustering Co-eff: 0.30
Slide 25
Slide 25 text
@techiewatt
V1.0 - DEGREE
Slide 26
Slide 26 text
@techiewatt
V1.0 - CLUSTER COEFFICIENT
Slide 27
Slide 27 text
V1.0 - ARCHITECTURE DIAGRAM
@techiewatt
Front End
Service
Back End
Service
External
Integration
Adapter Service
Database API
API
API
API
API
API
Slide 28
Slide 28 text
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0
2
4
6
8
10
12
14
16
ShippingFacade
Order
PricingCalculator
User
Product
Paym
entFacade
W
eb
API
M
ob
API
B2B
API
UPS
DHL
Royal M
ail
Shipper X
Shipper Y
Shipper Z
M
asterCard
PayPal
Provider A
Provider B
Provider C
v1 - degree & cluster coefficient
degree cluster coefficient
V1.0 ANALYSIS
@techiewatt
Average degree: 3.6
Average Clustering
Coefficient: 0.3
Slide 29
Slide 29 text
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0
2
4
6
8
10
12
14
16
ShippingFacade
Order
PricingCalculator
User
Product
Paym
entFacade
W
eb
API
M
ob
API
B2B
API
UPS
DHL
Royal M
ail
Shipper X
Shipper Y
Shipper Z
M
asterCard
PayPal
Provider A
Provider B
Provider C
v1 - degree & cluster coefficient
degree cluster coefficient
V1.0 ANALYSIS
@techiewatt
Slide 30
Slide 30 text
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0
2
4
6
8
10
12
14
16
ShippingFacade
Order
PricingCalculator
User
Product
Paym
entFacade
W
eb
API
M
ob
API
B2B
API
UPS
DHL
Royal M
ail
Shipper X
Shipper Y
Shipper Z
M
asterCard
PayPal
Provider A
Provider B
Provider C
v1 - degree & cluster coefficient
degree cluster coefficient
V1.0 ANALYSIS
@techiewatt
V1.0 - OBSERVATIONS CONTINUED
@techiewatt
- Help detect tightly
coupled areas
- Not always DDD
aligned
(** see Erich Eichinger’s blog “Heuristics for Identifying Service Boundaries”
- https://opencredo.com/blogs/identify-service-boundary-heuristics/)
Slide 34
Slide 34 text
#2
The Revised Microservice Arch
User Domain Decoupling
(v2.0)
@techiewatt
Slide 35
Slide 35 text
Recap … V1.0
@techiewatt
Slide 36
Slide 36 text
V2.0
@techiewatt
Slide 37
Slide 37 text
V2.0 - NETWORK STATS
@techiewatt
Density: 0.11
Number of nodes: 29
Number of edges: 46
Average degree: 3.1724
Average Clustering Co-eff: 0.20
Slide 38
Slide 38 text
V2.0 - COMBINED STATS
@techiewatt
Slide 39
Slide 39 text
V2.0 - COMBINED STATS
@techiewatt
Slide 40
Slide 40 text
V2.0 - COMBINED STATS
@techiewatt
Slide 41
Slide 41 text
V2.0 - COMMUNITY DETECTION
@techiewatt
Slide 42
Slide 42 text
SUMMARY
@techiewatt
Slide 43
Slide 43 text
HYPOTHESIS
@techiewatt
General Hypothesis:
Data Driven Architectural Improvement
You can extract metrics and KPIs from a
microservices architecture using network science
AND
use these to gain insight into the structure and
characteristics of your microservices architecture
Slide 44
Slide 44 text
HYPOTHESIS
@techiewatt
General Hypothesis:
Data Driven Architectural Improvement
You can extract metrics and KPIs from a
microservices architecture using network science
AND
use these to gain insight into the structure and
characteristics of your microservices architecture
Slide 45
Slide 45 text
CONCLUSION
@techiewatt
Demonstrated using degree and cluster coefficient
measures to detect tightly coupled (distributed
monolith) architectures
Demonstrated using community detection algorithms to
uncover related groupings (boundaries) of
microservices
Slide 46
Slide 46 text
HYPOTHESIS
@techiewatt
Specifically
Can we use these metrics to detect
bad microservice architectural
smells and anti-patterns like a
tightly coupled architecture
(distributed monolith)?
Slide 47
Slide 47 text
RECOMMENDED LEARNING RESOURCES
@techiewatt
Slide 48
Slide 48 text
@techiewatt
Come chat
with me at
our booth!
Need a
Microservice
arch review?
We’re
hiring!
Want to
find out
more?