Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Devoxx UK 2019 - Exploring Microservice Boundaries Through Network Science

Devoxx UK 2019 - Exploring Microservice Boundaries Through Network Science

Nicki Watt

May 09, 2019
Tweet

More Decks by Nicki Watt

Other Decks in Technology

Transcript

  1. AGENDA OVERVIEW • HYPOTHESIS
 • A BIT OF THEORY
 •

    MICROSERVICE EXPLORING
 • SUMMARY @techiewatt
  2. 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
  3. HYPOTHESIS @techiewatt Specifically 
 Can we use these metrics to

    detect bad microservice architectural smells and anti-patterns like a tightly coupled architecture (distributed monolith)
  4. 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
  5. DEGREE How connected is a specific node? A is more

    highly connected than 
 B and C 6 2 2 @techiewatt 1
  6. CLUSTER COEFFICIENT How tightly is a group is clustered, compared

    to how tightly it could be clustered? @techiewatt 2
  7. @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
  8. V1.0 - ARCHITECTURE DIAGRAM @techiewatt Front End Service Back End

    Service External Integration Adapter Service Database API API API API API API
  9. 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
  10. 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
  11. 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
  12. 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/)
  13. 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
  14. 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
  15. 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
  16. 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
  17. HYPOTHESIS @techiewatt Specifically 
 Can we use these metrics to

    detect bad microservice architectural smells and anti-patterns like a tightly coupled architecture (distributed monolith)?
  18. @techiewatt Come chat with me at our booth! Need a

    Microservice arch review? We’re hiring! Want to find out more?