Похожие презентации:
Microservices - DDD = Micromonolith
1.
Microservices - DDD = Micromonolith#ThumbtackJavaMeetup
27/03/2019
Vadim Anosov
2.
AgendaI. What is Domain-Driven Design?
II. What are the key concepts of the DDD approach?
III. How DDD helps to define an application’s microservice architecture?
IV. Why design microservice architecture without DDD concepts is the
way to Micro-monolith?
3.
Trends: Microservices vs Domain-DrivenDesign
4.
Trends: Microservices vs Domain-DrivenDesign
"Data source: Google Trends (www.google.com/trends)"
5.
6.
What is the right size of a service in the microservicearchitecture?
7.
What is the right size of a service in the microservicearchitecture?
8.
What is the right size of a service in the microservicearchitecture?
Microservice
=
Business capability
★ The most meaningful separation guided by domain knowledge
★ The emphasis isn't on the size, but instead on business capabilities
9.
AgendaI. What is Domain-Driven Design?
II. What are the key concepts of the DDD approach?
III. How DDD helps to define an application’s microservice architecture?
IV. Why design microservice architecture without DDD concepts is the
way to Micro-monolith?
10.
Domain-Driven Design“Implementing Domain-Driven Design”
by Vaughn Vernon
“Domain-Driven Design: Tackling
Complexity in the Heart of
Software” by Eric Evans
11.
Domain-Driven DesignDDD is an approach for building complex software applications that is
centered on the development of an object-oriented domain model.
12.
AgendaI. What is Domain-Driven Design?
II. What are the key concepts of the DDD approach?
III. How DDD helps to define an application’s microservice architecture?
IV. Why design microservice architecture without DDD concepts is the
way to Micro-monolith?
13.
Domain-Driven DesignStrategic patterns
Sub-domain
Ubiquitous
Language
Tactical patterns
Entities
Continuous
Integration
Domain
Modules
Factories
Bounded
Context
Context
Map
Services
Repositories
Layers
Domain
model
Aggregates
Value
Objects
14.
AgendaI. What is Domain-Driven Design?
II. What are the key concepts of the DDD approach?
III. How DDD helps to define an application’s microservice architecture?
IV. Why design microservice architecture without DDD concepts is the
way to Micro-monolith?
15.
Microservices dilemmaMonolith first
Microservices first
16.
Three steps to defining an application’smicroservice architecture
★ Identify system operations
★ Identify services
★ Define service APIs and collaborations
17.
Three steps to defining an application’smicroservice architecture
★ Identify system operations:
18.
DDD toolbox: Ubiquitous Language19.
DDD toolbox: Ubiquitous LanguageTurn on
Turn off
20.
Ubiquitous Language: Extracting a Hidden Concept21.
Ubiquitous Language: Extracting a Hidden Concept22.
Ubiquitous Language: Extracting a Hidden Concept23.
DDD toolbox: Domain, Subdomain24.
Result of using Ubiquitous Language, Domainand Subdomain
25.
Three steps to defining an application’smicroservice architecture
★ Identify services:
26.
Patterns for decomposing an application intoservices
Decompose by
business capability
Decompose by
subdomain
27.
DDD toolbox: Bounded ContextExplicitly define the context within
Keep the model strictly
which a model is applied
consistent within these bounds
Explicitly set boundaries in terms
of team organization
28.
Bounded Context: possible problemsDuplicate concepts
Customer
Client
False cognates
Order
29.
God classes preventing decomposition30.
God classes preventing decomposition31.
DDD toolbox: AggregateOnly accessed through its
Root Entity.
Responsible for maintaining
any/all business invariants.
A cluster of objects treated
as a single unit.
The atomic unit for any
transactional behavior.
32.
Aggregate: Rule #1Reference other aggregate roots
via identity (primary key)
33.
Aggregate: Rule #2X
X
One transaction creates or
updates one aggregate
(Transaction scope = service)
34.
Aggregate granularityCustomer
Product
Order
Consistency
Customer
Customer
Product
Product
Order
Order
Scalability
35.
DDD & Microservices★ Apply strategic DDD to identify microservices (bounded context,
ubiquitous language, context map)
★ Apply tactical DDD to design individual services (aggregator, value
object, service)
36.
What is the right size of a service in the microservicearchitecture?
“...Microservice should be no smaller than an aggregate, and no larger
than a bounded context...”
37.
What is the right size of a service in the microservicearchitecture?
38.
Useful linksDomain-Driven Design: Tackling Complexity in the Heart
of Software
Implementing Domain-Driven Design
Microservices Patterns: With examples in Java
Building Microservices: Designing Fine-Grained Systems
Martin Fowlers blog: DDD
DDD Europe