using graph theory network science to explore your ...€¦ · microservices architectures data ......
TRANSCRIPT
![Page 1: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/1.jpg)
Nicki Watt - CTO @techiewatt
USING GRAPH THEORY &
NETWORK SCIENCE TO EXPLORE YOUR
MICROSERVICES ARCHITECTURE
![Page 2: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/2.jpg)
![Page 3: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/3.jpg)
@techiewatt
Hands-on software delivery
Consulting
provides services
is CTO at
Cloud Native /
Microservices Architectures
DataEngineering
Platforms
Co-author of
with expertise
in
lead projects on
includes experience
gained building
![Page 4: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/4.jpg)
AGENDA OVERVIEW
● INTRO & HYPOTHESIS
● A BIT OF THEORY
● MICROSERVICE EXPLORING
● SUMMARY
@techiewatt
![Page 5: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/5.jpg)
INTRODUCTION
@techiewatt
![Page 6: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/6.jpg)
Graph theory is already being used to drive efficiencies in, and produce more reliable software
systems
INTRODUCTION
@techiewatt
![Page 7: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/7.jpg)
INTRODUCTION
@techiewatt
Code: Analysing software package & license dependencies
![Page 8: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/8.jpg)
INTRODUCTION
@techiewatt
Infrastructure: Reliably managing and updating cloud and other
infrastructure-as-code resources
Credit: Paul Hinze (HashiConf 2016) Applying Graph Theory to Infrastructure-as-code
![Page 9: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/9.jpg)
INTRODUCTION
@techiewatt
Ops & Monitoring: Troubleshooting, Distributed Tracing & Latency analysis
![Page 10: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/10.jpg)
Can we also use it to help inspect and drive us towards
improvements in our microservices architecture?
INTRODUCTION
@techiewatt
![Page 11: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/11.jpg)
In microservice architectures, the most important aspects are not properties of the code but properties of the system - Adam Tornhill
#GOTOcph SHOUT OUT!
@techiewatt
![Page 12: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/12.jpg)
HYPOTHESIS
@techiewatt
![Page 13: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/13.jpg)
HYPOTHESIS
@techiewatt
General Hypothesis: Data Driven Architectural Improvement
You can extract metrics and KPIs from a
microservices architecture using graph theory AND
use these to gain insight into the structure and characteristics of your microservices
architecture
![Page 14: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/14.jpg)
HYPOTHESIS
@techiewatt
For this talk …
Can we use these metrics to detect bad microservice architectural smells and anti-patterns like a
tightly coupled architecture (distributed monolith)
![Page 15: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/15.jpg)
A QUICK BIT OF THEORY
@techiewatt
![Page 16: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/16.jpg)
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
![Page 17: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/17.jpg)
● Graph Analytics
○ An Action Performed: The act of analysing connected
data - using any appropriate graph-based approach or
tools (visualisations, queries, statistics, algorithms)
● Graph Algorithms
○ Programmable process or set of rules: Leverages the
mathematical properties of graphs to explore, classify and
interpret connected data. A subset of tooling used to do
graph analytics. @techiewatt
GRAPH INSIGHTS 101
![Page 18: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/18.jpg)
GRAPH INSIGHTS 101
@techiewatt
New academic field, circa 21st
century includes study of:
● Real-world representations
in order to understand the
universal properties of
networks (Biological, social,
transport)
● Large, complex networks
Roots date back to 1786,
includes study of:
● Abstract theoretical graph
forms (e.g. random
graphs, trees, directed
graphs)
● Graphs of any size
NETWORK SCIENCEGRAPH THEORY
![Page 19: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/19.jpg)
“Based on the mathematics of graph theory, graph algorithms use the relationships between nodes to infer the organization and dynamics of complex systems. Network scientists use these algorithms to uncover hidden information, test hypotheses, and make predictions about behavior”.- Graph Algorithms by M Needham, A Hodler
@techiewatt
GRAPH INSIGHTS 101
![Page 20: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/20.jpg)
Show me some of this graph theory / network science stuff ...
@techiewatt
![Page 21: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/21.jpg)
@techiewatt
Path Finding Centrality Community
Detection
HIGH LEVEL ALGORITHM TYPES
![Page 22: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/22.jpg)
@techiewatt
Path Finding Centrality Community
Detection
HIGH LEVEL ALGORITHM TYPES
![Page 23: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/23.jpg)
DEGREE
How connected is a specific node?
@techiewatt
1
![Page 24: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/24.jpg)
DEGREE
How connected is a specific node?
A is more highly connected than B and C
6
2
2
@techiewatt
1
![Page 25: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/25.jpg)
CLUSTER COEFFICIENT
How tightly is a group clustered, compared to how tightly it could be
clustered?
@techiewatt
2
![Page 26: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/26.jpg)
CLUSTER COEFFICIENT
@techiewatt
2
![Page 27: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/27.jpg)
CLUSTER COEFFICIENT
@techiewatt
2
![Page 28: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/28.jpg)
CLUSTER COEFFICIENT
@techiewatt
2
![Page 29: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/29.jpg)
CLUSTER COEFFICIENT
@techiewatt
0.66
2
![Page 30: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/30.jpg)
CLUSTER COEFFICIENT
@techiewatt
0.66
2
![Page 31: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/31.jpg)
CLUSTER COEFFICIENT
@techiewatt
0.661.0
2
![Page 32: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/32.jpg)
COMMUNITY DETECTION
Used to find related communities,
uncover groupings, and quantify the
quality of groupings
@techiewatt
3
![Page 33: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/33.jpg)
DIVE IN! EXPLORING MICROSERVICES (AS A NETWORK)
@techiewatt
![Page 34: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/34.jpg)
#1 A “Microservice” Architecture
(v1.0)
@techiewatt
![Page 35: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/35.jpg)
@techiewatt
V1.0
![Page 36: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/36.jpg)
@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
![Page 37: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/37.jpg)
@techiewatt
V1.0 - DEGREE
![Page 38: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/38.jpg)
@techiewatt
V1.0 - CLUSTER COEFFICIENT
![Page 39: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/39.jpg)
@techiewatt
We’ve been directed to look a bit closer at a few potential problem
services …
Where do they fit in architecturally?
![Page 40: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/40.jpg)
V1.0 - ARCHITECTURE DIAGRAM
@techiewatt
Front End Service
Back End Service
External Integration
Adapter Service
Database
API
API API
API
API API
![Page 41: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/41.jpg)
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
PricingCalcu
lator
User
Product
PaymentFacade
Web API
Mob API
B2B APIUPS
DHL
Royal Mail
Shipper X
Shipper Y
Shipper Z
MasterC
ardPayPal
Provider A
Provider B
Provider C
v1 - degree & cluster coefficient
degree cluster coefficient
V1.0 ANALYSIS (DEGREE)
@techiewatt
Front End
Back End
External Integration
![Page 42: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/42.jpg)
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
PricingCalcu
lator
User
Product
PaymentFacade
Web API
Mob API
B2B APIUPS
DHL
Royal Mail
Shipper X
Shipper Y
Shipper Z
MasterC
ardPayPal
Provider A
Provider B
Provider C
v1 - degree & cluster coefficient
degree cluster coefficient
V1.0 ANALYSIS (CLUSTER COEFF)
@techiewatt
Front End
Back End
External Integration
![Page 43: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/43.jpg)
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
PricingCalcu
lator
User
Product
PaymentFacade
Web API
Mob API
B2B APIUPS
DHL
Royal Mail
Shipper X
Shipper Y
Shipper Z
MasterC
ardPayPal
Provider A
Provider B
Provider C
v1 - degree & cluster coefficient
degree cluster coefficient
V1.0 ANALYSIS (AVERAGES)
@techiewatt
Average degree: 3.6 Average Clustering Coefficient: 0.3
Front End
Back End
External Integration
![Page 44: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/44.jpg)
V1.0 INVESTIGATION
@techiewatt
- Entity Services Anti-Pattern
- Distributed Monolith
Front End
Back End
External Integration
![Page 45: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/45.jpg)
V1.0 INVESTIGATION
@techiewatt
- Entity Services Anti-Pattern
- Distributed Monolith
Front End
Back End
External Integration
OrderUser
Product
![Page 46: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/46.jpg)
V1.0 INVESTIGATION
@techiewatt
- Entity Services Anti-Pattern
- Distributed Monolith
Front End
Back End
External Integration
![Page 47: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/47.jpg)
V1.0 - COMMUNITY DETECTION
@techiewatt
![Page 48: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/48.jpg)
V1.0 - OBSERVATIONS CONTINUED
@techiewatt
- Help detect tightly coupled areas
- Not always DDD aligned
![Page 49: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/49.jpg)
COMMUNITIES NOT ALWAYS DDD ALIGNED
@techiewatt
Organisational
Credit: http://bonkersworld.net/organizational-charts
Conway’s Law ?
![Page 50: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/50.jpg)
COMMUNITIES NOT ALWAYS DDD ALIGNED
@techiewatt
Process & Data
CriteriaOrganisation Operations
Erich Eichinger Blog: “Heuristics for Identifying Service Boundaries” https://opencredo.com/blogs/identify-service-boundary-heuristics/
![Page 51: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/51.jpg)
#2The Revised Microservice Arch
User Domain Decoupling (v2.0)
@techiewatt
![Page 52: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/52.jpg)
Recap … V1.0
@techiewatt
UserFront End
Back End
External Integration
Database
![Page 53: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/53.jpg)
V1.0 —> V2.0
@techiewatt
U1 U2 U3
U4 U5 U6UserFront End
Back End
External Integration
Database
![Page 54: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/54.jpg)
V1.0 —> V2.0
@techiewatt
User U1 U2 U3 U4 U5 U6
User Mob API
User Web API
Front End
Back End
External Integration
Database
![Page 55: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/55.jpg)
V2.0
@techiewatt
User
V1.0 —> V2.0
Front End
Back End
External Integration
Database
![Page 56: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/56.jpg)
V2.0
@techiewatt
Front End
Back End
External Integration
Database
![Page 57: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/57.jpg)
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
![Page 58: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/58.jpg)
V2.0 - COMBINED STATS
@techiewatt
![Page 59: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/59.jpg)
V2.0 - COMBINED STATS (DEGREE)
@techiewatt
![Page 60: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/60.jpg)
V2.0 - COMBINED STATS (CLUSTER COEFF)
@techiewatt
![Page 61: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/61.jpg)
V2.0 - COMMUNITY DETECTION
@techiewatt
![Page 62: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/62.jpg)
COMPARING V1 and V2
@techiewatt
![Page 63: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/63.jpg)
@techiewatt
COMPARINGD
egre
e
Clu
ster
Coe
ffici
ent
0
0.2
0.4
0.6
0.8
1
1.2
0
2
4
6
8
10
12
14
16
Shippin
gFaca
deOrder
Pricing
Calcu
latorUser
Product
PaymentF
acade
Web API
Mob API
B2B API UPS DHL
Royal M
ail
Shippe
r X
Shippe
r Y
Shippe
r Z
MasterC
ardPayP
al
Provider A
Provider B
Provider C
MonoUserSe
rvice
Web User
API
Mob User
API
EventPu
blisher
Registe
rNew
User
UpdateC
oreDeta
ils
UpdateM
arketin
gPrefs
ReportU
serAbuse
GetUserProfile
Searc
hUser
EventCo
nsumer
UserEventM
onoConsumer
Combined Measurements (V1 & V2)
v1 degree v2 degree v1 cluster coefficient v2 cluster coefficient
![Page 64: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/64.jpg)
0
0.2
0.4
0.6
0.8
1
1.2
0
2
4
6
8
10
12
14
16
Shippin
gFaca
deOrder
Pricing
Calcu
latorUser
Product
PaymentF
acade
Web API
Mob API
B2B API UPS DHL
Royal M
ail
Shippe
r X
Shippe
r Y
Shippe
r Z
MasterC
ardPayP
al
Provider A
Provider B
Provider C
MonoUserSe
rvice
Web User
API
Mob User
API
EventPu
blisher
Registe
rNew
User
UpdateC
oreDeta
ils
UpdateM
arketin
gPrefs
ReportU
serAbuse
GetUserProfile
Searc
hUser
EventCo
nsumer
UserEventM
onoConsumer
Combined Measurements (V1 & V2)
v1 degree v2 degree v1 cluster coefficient v2 cluster coefficient
Deg
ree
Clu
ster
Coe
ffici
ent
@techiewatt
COMPARING
V1 User Service
![Page 65: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/65.jpg)
0
0.2
0.4
0.6
0.8
1
1.2
0
2
4
6
8
10
12
14
16
Shippin
gFaca
deOrder
Pricing
Calcu
latorUser
Product
PaymentF
acade
Web API
Mob API
B2B API UPS DHL
Royal M
ail
Shippe
r X
Shippe
r Y
Shippe
r Z
MasterC
ardPayP
al
Provider A
Provider B
Provider C
MonoUserSe
rvice
Web User
API
Mob User
API
EventPu
blisher
Registe
rNew
User
UpdateC
oreDeta
ils
UpdateM
arketin
gPrefs
ReportU
serAbuse
GetUserProfile
Searc
hUser
EventCo
nsumer
UserEventM
onoConsumer
Combined Measurements (V1 & V2)
v1 degree v2 degree v1 cluster coefficient v2 cluster coefficient
Deg
ree
Clu
ster
Coe
ffici
ent
@techiewatt
COMPARING
V1 User Service
New V2 RefactoredUser Services
![Page 66: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/66.jpg)
Deg
ree
Clu
ster
Coe
ffici
ent
0
0.2
0.4
0.6
0.8
1
1.2
0
2
4
6
8
10
12
14
16
Shippin
gFaca
deOrder
Pricing
Calcu
latorUser
Product
PaymentF
acade
Web API
Mob API
B2B API UPS DHL
Royal M
ail
Shippe
r X
Shippe
r Y
Shippe
r Z
MasterC
ardPayP
al
Provider A
Provider B
Provider C
MonoUserSe
rvice
Web User
API
Mob User
API
EventPu
blisher
Registe
rNew
User
UpdateC
oreDeta
ils
UpdateM
arketin
gPrefs
ReportU
serAbuse
GetUserProfile
Searc
hUser
EventCo
nsumer
UserEventM
onoConsumer
Combined Measurements (V1 & V2)
v1 degree v2 degree v1 cluster coefficient v2 cluster coefficient
@techiewatt
COMPARING
New V2 RefactoredUser Services
V1 User Service
V2 Mono User Service
(allow distmon to continue functioning)
![Page 67: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/67.jpg)
@techiewatt
COMPARINGD
egre
e
Clu
ster
Coe
ffici
ent
0
0.2
0.4
0.6
0.8
1
1.2
0
2
4
6
8
10
12
14
16
Shippin
gFaca
deOrder
Pricing
Calcu
latorUser
Product
PaymentF
acade
Web API
Mob API
B2B API UPS DHL
Royal M
ail
Shippe
r X
Shippe
r Y
Shippe
r Z
MasterC
ardPayP
al
Provider A
Provider B
Provider C
MonoUserSe
rvice
Web User
API
Mob User
API
EventPu
blisher
Registe
rNew
User
UpdateC
oreDeta
ils
UpdateM
arketin
gPrefs
ReportU
serAbuse
GetUserProfile
Searc
hUser
EventCo
nsumer
UserEventM
onoConsumer
Combined Measurements (V1 & V2)
v1 degree v2 degree v1 cluster coefficient v2 cluster coefficient
![Page 68: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/68.jpg)
0
0.2
0.4
0.6
0.8
1
1.2
0
2
4
6
8
10
12
14
16
Shippin
gFaca
deOrder
Pricing
Calcu
latorUser
Product
PaymentF
acade
Web API
Mob API
B2B API UPS DHL
Royal M
ail
Shippe
r X
Shippe
r Y
Shippe
r Z
MasterC
ardPayP
al
Provider A
Provider B
Provider C
MonoUserSe
rvice
Web User
API
Mob User
API
EventPu
blisher
Registe
rNew
User
UpdateC
oreDeta
ils
UpdateM
arketin
gPrefs
ReportU
serAbuse
GetUserProfile
Searc
hUser
EventCo
nsumer
UserEventM
onoConsumer
Combined Measurements (V1 & V2)
v1 degree v2 degree v1 cluster coefficient v2 cluster coefficient
Deg
ree
Clu
ster
Coe
ffici
ent
@techiewatt
COMPARING
V1 (5) V2 (4)
![Page 69: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/69.jpg)
0
0.2
0.4
0.6
0.8
1
1.2
0
2
4
6
8
10
12
14
16
Shippin
gFaca
deOrder
Pricing
Calcu
latorUser
Product
PaymentF
acade
Web API
Mob API
B2B API UPS DHL
Royal M
ail
Shippe
r X
Shippe
r Y
Shippe
r Z
MasterC
ardPayP
al
Provider A
Provider B
Provider C
MonoUserSe
rvice
Web User
API
Mob User
API
EventPu
blisher
Registe
rNew
User
UpdateC
oreDeta
ils
UpdateM
arketin
gPrefs
ReportU
serAbuse
GetUserProfile
Searc
hUser
EventCo
nsumer
UserEventM
onoConsumer
Combined Measurements (V1 & V2)
v1 degree v2 degree v1 cluster coefficient v2 cluster coefficient
Deg
ree
Clu
ster
Coe
ffici
ent
@techiewatt
COMPARING
V2 (1.0) V1 (0.9)
![Page 70: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/70.jpg)
FURTHER OPTIONS
@techiewatt
![Page 71: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/71.jpg)
OTHER MEASURES & ALGORITHMS
@techiewatt
- Strongly Connected Components (SCC)
- Help detect circular dependencies
![Page 72: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/72.jpg)
OTHER MEASURES & ALGORITHMS
@techiewatt
- Path Finding Algorithms Detect who is calling deprecated services
![Page 73: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/73.jpg)
CONCLUSION
@techiewatt
![Page 74: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/74.jpg)
Early days … Can’t be applied blindly …
Common sense and understanding of architectural approaches and patterns still
required!!
CONCLUSION
@techiewatt
![Page 75: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/75.jpg)
HYPOTHESIS
@techiewatt
General Hypothesis: Data Driven Architectural Improvement
You can extract metrics and KPIs from a
microservices architecture using graph theory AND
use these to gain insight into the structure and characteristics of your microservices
architecture
![Page 76: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/76.jpg)
HYPOTHESIS
@techiewatt
General Hypothesis: Data Driven Architectural Improvement
You can extract metrics and KPIs from a
microservices architecture using graph theory AND
use these to gain insight into the structure and characteristics of your microservices
architecture
![Page 77: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/77.jpg)
HYPOTHESIS
@techiewatt
Specifically
Can we use these metrics to detect bad microservice architectural smells and anti-patterns like a
tightly coupled architecture (distributed monolith)?
![Page 78: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/78.jpg)
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
![Page 79: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/79.jpg)
RECOMMENDED LEARNING RESOURCES
@techiewatt
![Page 80: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/80.jpg)
@techiewatt
Come chat with
me!
Want Some Help?
Questions?
Want to find out
more?
![Page 81: USING GRAPH THEORY NETWORK SCIENCE TO EXPLORE YOUR ...€¦ · Microservices Architectures Data ... smells and anti-patterns like a tightly coupled architecture (distributed monolith)](https://reader030.vdocument.in/reader030/viewer/2022041015/5ec6c76e2e26f1010c6d9177/html5/thumbnails/81.jpg)