SlideShare a Scribd company logo
Confidential │ © 2020 VMware, Inc.
Should That Be a
Microservice ?
From Microservices to Monoliths
Rohit Kelapure @rkela
Solution Architect at VMware
#micro2mono
May 2020
rkelapure@vmware.com
Confidential │ © 2020 VMware, Inc.
Agenda
2
Motivation
Why? What? How?
Technical Heuristics
Cloud Native Apps
Business Heuristics
Wardley Maps, Core Domain Patterns
Modular Monoliths
App Continuum, Service Block & Moduliths
Implementation
Sociotechnical Architecture
Confidential │ © 2020 VMware, Inc.
Motivation
Why? What? How?
3
Confidential │ © 2020 VMware, Inc. 4
Microservices has now
become DEFAULT
Cloud Native and Serverless
have become buzz words
Towards A New Serverless
World
https://www.swiftbird.us/post/towards-a-new-ser
verless-world
Education & Enablement
Should That Be A
Microservices Workshop
Modular Monoliths / App
Continuum
https://www.infoq.com/news/2020/04/microservi
ces-back-again/
Microservices Sprawl -
Leads to POOR
Development & Testing
experience
Poor definition and
understanding of service &
Context Boundaries
Challenges with
Observability and
Heisenbugs
To Microservices and Back Again
Why Go Back to a Monolith ?
HOW? WHY ? WHAT?
5Confidential │ © 2020 VMware, Inc.
Technical Heuristics
Should that be a Microservice? Keep These
Factors in Mind
Please Microservice Responsibly
Confidential │ © 2020 VMware, Inc. 6
Technical Heuristics
Multiple Rates Of
Change
Value Streams
Independent Life
Cycles
Speed Matters
Independent
Scalability
Efficiently allocate
Confidential │ © 2020 VMware, Inc. 7
Technical Heuristics
Simplify
Interactions with
External
Dependencies
Facades, ACL
Isolated Failure
Failure Domains
Freedom to
Choose the Right
Tech
Polyglot
Confidential │ © 2020 VMware, Inc. 8
Microservices - Is the Price Right Workshop ?
Confidential │ © 2020 VMware, Inc. 9
Theory of Microservices
Domain Driven Design
Subdomains Represents a single, logical Domain Model
used to break up the business model logically to
understand the problem space.
Bounded Context : Language based semantic
contextual boundary where each component of the
software model has a specific meaning and does specific
things.
Ubiquitous language: The consistent language spoken
by all members of the team within the Bounded Context.
It is necessary to rigorous, stringent, exact and tight.
Entities: Something with continuity and identity.
Aggregates: Mark the scope within which invariants
have to be maintained stored. An Order Aggregate would
represent the Order, Order Items, Shipping Address, etc.
as a single transactional invariant.
Confidential │ © 2020 VMware, Inc. 10
Are Your Bourndaries (BOUNDED CONTEXTS) Correct ?
11Confidential │ © 2020 VMware, Inc.
Business Heuristics
Wardley Maps To The Rescue
Confidential │ © 2020 VMware, Inc. 12
Core Domain -An area of the domain with the
opportunity for high business differentiation. This
represents a compelling ROI. Implementation
must has at-least a reasonable level of model
complexity.
Supporting Domains are business necessities,
they contain business concepts related to the
domain, but there is limited ROI.
Generic Domains represent concepts not-unique
to our domain, such as user identity, sending
emails, taking payments — we should consider
buying SaaS or using open source instead of
building Generic Domains.
Business Heuristics
Context Distillation Invented by Nick Tune @ntcoding
Confidential │ © 2020 VMware, Inc. 13
Where is my Core Domain ?
Confidential │ © 2020 VMware, Inc. 14
Understand the Business Capability Value Chain Of Your Product
Identify Patterns of Genesis, Product, Utility and Commodity
Confidential │ © 2020 VMware, Inc. 15
What are Wardley Maps? Using Miro for Wardley Mapping
Wardley Maps
16Confidential │ © 2020 VMware, Inc.
Simon Brown
“If you can't build a monolith,
what makes you think
microservices are the
answer?”
http://www.codingthearchitecture.com
/2014/07/06/distributed_big_balls_of_m
ud.html Martin Fowler - Monoliths First
Confidential │ © 2020 VMware, Inc. 17
Sometimes The Right Answer is a Modular Monolith
Confidential │ © 2020 VMware, Inc. 18
Confidential │ © 2020 VMware, Inc. 19
Moduliths: A playground to build technology supporting
the development of modular monolithic (modulithic)
Java applications. Repo
Service blocks are cloud-native applications that share
many characteristics with microservices. The key
difference with microservices is that a service block is a
self-contained system that has multiple independently
deployable units—mixing together serverless functions
with containers.
App Continuum: Evolution of a distributed system
starting from a single application and evolving into
several applications and services. Link
Options - Idiomatic Approaches to Modular Monoliths
Moduliths , Service Blocks & App Continuum
20Confidential │ © 2020 VMware, Inc.
Implementation
Sociotechnical Architecture
Confidential │ © 2020 VMware, Inc. 21
Team Topologies - Flow Based Teams
Interaction Modes for the Four Fundamental Team Topologies - Skelton & Pais
Confidential │ © 2020 VMware, Inc. 22
Coupled - End To End Stream Teams
Drawbacks:
● Teams must understand how
to operate in multiple
domains
● Teams can’t confidently
make changes to shared
codebases without
committee approval
● Cross-functional apps don’t
have clear owners to
improve them
● Adding a new team requires
everyone to take on
additional context (the full
ecosystem of domains)
Teams Are Too Coupled During Development
Confidential │ © 2020 VMware, Inc. 23
Component Based Teams
Improving Team Independence
Impact:
● Teams can confidently make
changes to and release! code
they own at any time
● Cross-functional apps have
owners to drive improvements
● There’s a clear path to scaling
teams horizontally without
drastic scope change for
existing teams
● Communication between
teams happens between
well-defined public contracts
instead of in-the-weeds
implementation detail
24Confidential │ © 2020 VMware, Inc.
Conclusion
What Next ?
Confidential │ © 2020 VMware, Inc.
Technical + Business + Social Heuristics
Bringing It All Together
25
Confidential │ © 2020 VMware, Inc. 26
Reach out rkelapure@vmware.com
Free Discovery Workshop Consult
Solve Your
Toughest
Challenge
VMware Pivotal
Labs Consultation
| VMware Tanzu
https://tanzu.vmware.co
m/product-consultation
Thank You
Confidential │ © 2020 VMware, Inc.
Confidential │ © 2020 VMware, Inc. 28

More Related Content

Should That Be a Microservice ?

  • 1. Confidential │ © 2020 VMware, Inc. Should That Be a Microservice ? From Microservices to Monoliths Rohit Kelapure @rkela Solution Architect at VMware #micro2mono May 2020 rkelapure@vmware.com
  • 2. Confidential │ © 2020 VMware, Inc. Agenda 2 Motivation Why? What? How? Technical Heuristics Cloud Native Apps Business Heuristics Wardley Maps, Core Domain Patterns Modular Monoliths App Continuum, Service Block & Moduliths Implementation Sociotechnical Architecture
  • 3. Confidential │ © 2020 VMware, Inc. Motivation Why? What? How? 3
  • 4. Confidential │ © 2020 VMware, Inc. 4 Microservices has now become DEFAULT Cloud Native and Serverless have become buzz words Towards A New Serverless World https://www.swiftbird.us/post/towards-a-new-ser verless-world Education & Enablement Should That Be A Microservices Workshop Modular Monoliths / App Continuum https://www.infoq.com/news/2020/04/microservi ces-back-again/ Microservices Sprawl - Leads to POOR Development & Testing experience Poor definition and understanding of service & Context Boundaries Challenges with Observability and Heisenbugs To Microservices and Back Again Why Go Back to a Monolith ? HOW? WHY ? WHAT?
  • 5. 5Confidential │ © 2020 VMware, Inc. Technical Heuristics Should that be a Microservice? Keep These Factors in Mind Please Microservice Responsibly
  • 6. Confidential │ © 2020 VMware, Inc. 6 Technical Heuristics Multiple Rates Of Change Value Streams Independent Life Cycles Speed Matters Independent Scalability Efficiently allocate
  • 7. Confidential │ © 2020 VMware, Inc. 7 Technical Heuristics Simplify Interactions with External Dependencies Facades, ACL Isolated Failure Failure Domains Freedom to Choose the Right Tech Polyglot
  • 8. Confidential │ © 2020 VMware, Inc. 8 Microservices - Is the Price Right Workshop ?
  • 9. Confidential │ © 2020 VMware, Inc. 9 Theory of Microservices Domain Driven Design Subdomains Represents a single, logical Domain Model used to break up the business model logically to understand the problem space. Bounded Context : Language based semantic contextual boundary where each component of the software model has a specific meaning and does specific things. Ubiquitous language: The consistent language spoken by all members of the team within the Bounded Context. It is necessary to rigorous, stringent, exact and tight. Entities: Something with continuity and identity. Aggregates: Mark the scope within which invariants have to be maintained stored. An Order Aggregate would represent the Order, Order Items, Shipping Address, etc. as a single transactional invariant.
  • 10. Confidential │ © 2020 VMware, Inc. 10 Are Your Bourndaries (BOUNDED CONTEXTS) Correct ?
  • 11. 11Confidential │ © 2020 VMware, Inc. Business Heuristics Wardley Maps To The Rescue
  • 12. Confidential │ © 2020 VMware, Inc. 12 Core Domain -An area of the domain with the opportunity for high business differentiation. This represents a compelling ROI. Implementation must has at-least a reasonable level of model complexity. Supporting Domains are business necessities, they contain business concepts related to the domain, but there is limited ROI. Generic Domains represent concepts not-unique to our domain, such as user identity, sending emails, taking payments — we should consider buying SaaS or using open source instead of building Generic Domains. Business Heuristics Context Distillation Invented by Nick Tune @ntcoding
  • 13. Confidential │ © 2020 VMware, Inc. 13 Where is my Core Domain ?
  • 14. Confidential │ © 2020 VMware, Inc. 14 Understand the Business Capability Value Chain Of Your Product Identify Patterns of Genesis, Product, Utility and Commodity
  • 15. Confidential │ © 2020 VMware, Inc. 15 What are Wardley Maps? Using Miro for Wardley Mapping Wardley Maps
  • 16. 16Confidential │ © 2020 VMware, Inc. Simon Brown “If you can't build a monolith, what makes you think microservices are the answer?” http://www.codingthearchitecture.com /2014/07/06/distributed_big_balls_of_m ud.html Martin Fowler - Monoliths First
  • 17. Confidential │ © 2020 VMware, Inc. 17 Sometimes The Right Answer is a Modular Monolith
  • 18. Confidential │ © 2020 VMware, Inc. 18
  • 19. Confidential │ © 2020 VMware, Inc. 19 Moduliths: A playground to build technology supporting the development of modular monolithic (modulithic) Java applications. Repo Service blocks are cloud-native applications that share many characteristics with microservices. The key difference with microservices is that a service block is a self-contained system that has multiple independently deployable units—mixing together serverless functions with containers. App Continuum: Evolution of a distributed system starting from a single application and evolving into several applications and services. Link Options - Idiomatic Approaches to Modular Monoliths Moduliths , Service Blocks & App Continuum
  • 20. 20Confidential │ © 2020 VMware, Inc. Implementation Sociotechnical Architecture
  • 21. Confidential │ © 2020 VMware, Inc. 21 Team Topologies - Flow Based Teams Interaction Modes for the Four Fundamental Team Topologies - Skelton & Pais
  • 22. Confidential │ © 2020 VMware, Inc. 22 Coupled - End To End Stream Teams Drawbacks: ● Teams must understand how to operate in multiple domains ● Teams can’t confidently make changes to shared codebases without committee approval ● Cross-functional apps don’t have clear owners to improve them ● Adding a new team requires everyone to take on additional context (the full ecosystem of domains) Teams Are Too Coupled During Development
  • 23. Confidential │ © 2020 VMware, Inc. 23 Component Based Teams Improving Team Independence Impact: ● Teams can confidently make changes to and release! code they own at any time ● Cross-functional apps have owners to drive improvements ● There’s a clear path to scaling teams horizontally without drastic scope change for existing teams ● Communication between teams happens between well-defined public contracts instead of in-the-weeds implementation detail
  • 24. 24Confidential │ © 2020 VMware, Inc. Conclusion What Next ?
  • 25. Confidential │ © 2020 VMware, Inc. Technical + Business + Social Heuristics Bringing It All Together 25
  • 26. Confidential │ © 2020 VMware, Inc. 26 Reach out rkelapure@vmware.com Free Discovery Workshop Consult Solve Your Toughest Challenge VMware Pivotal Labs Consultation | VMware Tanzu https://tanzu.vmware.co m/product-consultation
  • 27. Thank You Confidential │ © 2020 VMware, Inc.
  • 28. Confidential │ © 2020 VMware, Inc. 28