The document discusses strategies for transitioning from a monolithic architecture to microservices, including splitting a monolith based on business domains and functional areas. It explains tactical patterns from Domain-Driven Design like bounded contexts, ubiquitous language, and context mapping that can help structure microservices and define integration points. The document also provides additional resources on Domain-Driven Design patterns and strategies for applying them when developing microservice architectures.
8. 8
Splitting Monolith by distributionMost common transition to microservices
Store
Func 2
Account
Func 2
Delivery
Func 1
Store
Func 3
Delivery
Func 2
Delivery
Func 3
Order
Func 1
Order
Func 3
Account
Func 1
Store
Func 1
Order
Func 2
Account
Func 3
All Func
in one DB
Delivery
Func 2
Store
Func 3
Delivery
Func 3
App
2-Func DB
Order
Func 1
Order
Func 3
Account
Func 2
2-Func DB
Store
Func 2
Delivery
Func 1
Account
Func 1
3-Func DB
Order
Func 2
Store
Func 1
Account
Func 3
3-Func DB
Service 1 Service 2
Service 3 Service 4
9. 9
Monolith splitted by distributionMicroservices fitness check
3
TRANSACTION INSIDE
SERVICE
BUSINESS FOCUSED SERVICES
SINGLE DATA OWNERSHIP2
1
Delivery
Func 2
Store
Func 3
Delivery
Func 3
2-Func DB
Order
Func 1
Order
Func 3
Account
Func 2
2-Func DB
Store
Func 2
Delivery
Func 1
Account
Func 1
3-Func DB
Order
Func 2
Store
Func 1
Account
Func 3
3-Func DB
Service 1 Service 2
Service 3 Service 4
4 INDEPENDENT DEPLOYMENTS
Func mix in one DB
V2 V2
V2
10. 10
Distributed MonolithDisadvantages of distributed big ball of mud
3
DISTRIBUTED TRANSACTION
MIXED SERVICES
NO DATA OWNERSHIP2
1
Delivery
Func 2
Store
Func 3
Delivery
Func 3
Order
Func 1
Order
Func 3
Account
Func 2
Store
Func 2
Delivery
Func 1
Account
Func 1
Order
Func 2
Store
Func 1
Account
Func 3
4 DEPENDENT DEPLOYMENTS
2-Func DB 2-Func DB
3-Func DB 3-Func DB
Service 1 Service 2
Service 3 Service 4
12. 12
JAKUB NABRDALIK
MICROSERVICES ARE
TECHNICAL SOLUTION
And developers love technical solutions
Conway’s revenge - Bydgoszcz JUG - https://www.youtube.com/watch?v=UhIIpUQ-i38
Mentor in Bottega IT Solution
14. 14
Modularity – the final frontierŁukasz Szydło at Boiling Frogs 2018
NO YES
NO Monolith
YES Microservices
DISTRIBUTED
MODULAR
Modular Monolith
Distributed Monolith
DDD
19. 20
3
SPOKEN LANGUAGE MUST
REFER TO BUSINESS
LANGUAGE WILL EVOLVE WITH
UNDERSTANDING DOMAIN
SHARED LANGUAGE FROM BUSINESS
TO CODEBASE2
1
Shared understandingCommon language between people
User Client
Add order Place order
Update delivery Change delivery date
Items collection Product catalogue
Fast shipping Express delivery
24. 25
User in ecommerce contextDifferent meanings of users
ACCOUNTSDELIVERYSTORE ORDERS
• Shopper who looks for a
products
• Can add products to
basket
• Customer who bought
placed order
• Can change payment
• User in store account
• Can check personal data
• Recipient who gets
delivery
• Can change change
delivery address
25. 26
3
LOGICAL BOUNDARY
BETWEEN UNDERSTANDINGS
UNIFIED MODEL DOES NOT EXISTS
DIFFERENT MODEL FUNCTIONS
AND DATA STRUCTURE2
1
Bounded contextThings has different meaning between contexts
CustomerOrder
Payment
Products
Recipient Delivery
Company
Address
Orders Delivery
26. 27
Modules divided from
business perspective
Solution adjusted
to use-case
Team bounded
to single context
Bounded ContextBenefits of using BC
28. 29
3
DIFFERENT WAYS OF
INTEGRATIONS
SEPARATE WAYS AS
INTEGRATION APPROACH
TRANSLATIONS BETWEEN
CONTEXT2
1
Context mapApproaches of communications between contexts
Orders
Store
Shipping
Notifications
Down
Up
Shared Kernel Shared Kernel
Layer
Partnership
Legacy
Reporting
Separate
Ways
31. 32
Monolith -> Modular MonolithLess common transition to microservices
Store
Func 2
Account
Func 2
Delivery
Func 1
Store
Func 3
Delivery
Func 2
Delivery
Func 3
Order
Func 1
Order
Func 3
Account
Func 2
Store
Func 1
Order
Func 2
Account
Func 3
All Func in
one DB
Delivery
Func 2
Delivery
Func 3
Delivery
Func 3
App
Order
Func 1
Order
Func 3
Account
Func 2
Store
Func 2
Store
Func 3
Store
Func 1
Modules inside DB
Account
Func 2
Account
Func 1
Account
Func 3
Store Module Account Module
Delivery Module Order Module
App
32. 33
Modular Monolith -> MicroservicesTransition to microservices step by step
Delivery
Func 2
Delivery
Func 3
Delivery
Func 3
Order
Func 1
Order
Func 3
Account
Func 2
Store
Func 2
Store
Func 3
Store
Func 1
Modules inside DB
Account
Func 2
Account
Func 1
Account
Func 3
App 1
Delivery
Func 2
Delivery
Func 3
Delivery
Func 3
Order
Func 1
Order
Func 3
Account
Func 2
Store
Func 2
Store
Func 3
Store
Func 1
Modules inside DB
Account
Func 2
Account
Func 1
Account
Func 3
App
Store DB
Delivery DB
Store Module Account Module
Delivery Module Order Module
Store Service Account Module
Delivery Service Order Module
33. 34
Monolith splitted by modularizationMicroservices fitness check
Delivery
Func 2
Delivery
Func 3
Delivery
Func 3
Order
Func 1
Order
Func 3
Account
Func 2
Store
Func 2
Store
Func 3
Store
Func 1
Account
Func 2
Account
Func 1
Account
Func 3
Store DB
Delivery DB
Account DB
Order DB
3
TRANSACTION INSIDE
SERVICE
BUSINESS FOCUSED SERVICES
SINGLE DATA OWNERSHIP2
1
4 INDEPENDENT DEPLOYMENTS
Store Service Account Service
Delivery Service Order Service
35. 36
radblog.pl/DDD
Articles:
•Weronika Łabaj - DDD Ultra-Lite
•Herberto Graca - Domain-Driven Design
•Carbon Five - Ubiquitous Language & the joy of naming
•Sapiens Work - DDD - The Bounded Context Explained
•Philip Brown - Strategies for Integrating Bounded Contexts
•Sebastian Gębski - The awesomeness of Modular Monolith
•Microsoft - Tackling Business Complexity in a Microservice with DDD and CQRS Patterns
•Berke Sokhan - Domain Driven Design for Services Architecture
Videos:
•DevTalk - DDD with Sławomir Sobótka
•DevTalk Trio - DDD
•Domain Driven Design: The Good Parts - Jimmy Bogard
•What is Domain Driven Design?
•DDD & Microservices: At Last, Some Boundaries!
•7 Reasons Why DDD Projects Fail
Books:
•Eric Evans - Domain Driven Design
•Vernon Vaughn - Implementing Domain-Driven Design
•Vernon Vaughn - Domain-Driven Design Distilled
•Sam Newman - Building Microservices: Designing Fine-Grained
Systems
- Being closely aligned to business DDD results in better mapping client’s needs to product.
- DDD focuces on creating common understanding between project’s parties.
- DDD strategies allows to create more modular and maintable application.
- Being closely aligned to business DDD results in better mapping client’s needs to product.
- DDD focuces on creating common understanding between project’s parties.
- DDD strategies allows to create more modular and maintable application.
- Being closely aligned to business DDD results in better mapping client’s needs to product.
- DDD focuces on creating common understanding between project’s parties.
- DDD strategies allows to create more modular and maintable application.
-
- Każdy dział będzie
- Nie da się stworzyc jednorodnego modelu ponieważ rzeczywistość nie jest jednorodna.