Microservices - DDD = Micromonolith презентация

Содержание

Слайд 2

Agenda What is Domain-Driven Design? What are the key concepts

Agenda

What is Domain-Driven Design?
What are the key concepts of the DDD

approach?
How DDD helps to define an application’s microservice architecture?
Why design microservice architecture without DDD concepts is the way to Micro-monolith?
Слайд 3

Trends: Microservices vs Domain-Driven Design

Trends: Microservices vs Domain-Driven Design

Слайд 4

Trends: Microservices vs Domain-Driven Design "Data source: Google Trends (www.google.com/trends)"

Trends: Microservices vs Domain-Driven Design

"Data source: Google Trends (www.google.com/trends)"

Слайд 5

Слайд 6

What is the right size of a service in the microservice architecture?

What is the right size of a service in the microservice

architecture?
Слайд 7

What is the right size of a service in the microservice architecture?

What is the right size of a service in the microservice

architecture?
Слайд 8

What is the right size of a service in the

What is the right size of a service in the microservice

architecture?

Microservice = Business capability

The most meaningful separation guided by domain knowledge
The emphasis isn't on the size, but instead on business capabilities

Слайд 9

Agenda What is Domain-Driven Design? What are the key concepts

Agenda

What is Domain-Driven Design?
What are the key concepts of the DDD

approach?
How DDD helps to define an application’s microservice architecture?
Why design microservice architecture without DDD concepts is the way to Micro-monolith?
Слайд 10

“Domain-Driven Design: Tackling Complexity in the Heart of Software” by

“Domain-Driven Design: Tackling Complexity in the Heart of Software” by Eric

Evans

“Implementing Domain-Driven Design” by Vaughn Vernon

Domain-Driven Design

Слайд 11

DDD is an approach for building complex software applications that

DDD is an approach for building complex software applications that is

centered on the development of an object-oriented domain model.

Domain-Driven Design

Слайд 12

Agenda What is Domain-Driven Design? What are the key concepts

Agenda

What is Domain-Driven Design?
What are the key concepts of the DDD

approach?
How DDD helps to define an application’s microservice architecture?
Why design microservice architecture without DDD concepts is the way to Micro-monolith?
Слайд 13

Domain-Driven Design Tactical patterns Strategic patterns Ubiquitous Language Domain Domain

Domain-Driven Design

Tactical patterns

Strategic patterns

Ubiquitous Language

Domain

Domain model

Context Map

Bounded Context

Sub-domain

Continuous Integration

Entities

Aggregates

Layers

Modules

Services

Factories

Repositories

Value Objects

Слайд 14

Agenda What is Domain-Driven Design? What are the key concepts

Agenda

What is Domain-Driven Design?
What are the key concepts of the DDD

approach?
How DDD helps to define an application’s microservice architecture?
Why design microservice architecture without DDD concepts is the way to Micro-monolith?
Слайд 15

Microservices dilemma Monolith first Microservices first

Microservices dilemma

Monolith first

Microservices first

Слайд 16

Three steps to defining an application’s microservice architecture Identify system

Three steps to defining an application’s microservice architecture

Identify system operations
Identify services
Define

service APIs and collaborations
Слайд 17

Three steps to defining an application’s microservice architecture Identify system operations:

Three steps to defining an application’s microservice architecture

Identify system operations:

Слайд 18

DDD toolbox: Ubiquitous Language

DDD toolbox: Ubiquitous Language

Слайд 19

DDD toolbox: Ubiquitous Language Turn on Turn off

DDD toolbox: Ubiquitous Language

Turn on

Turn off

Слайд 20

Ubiquitous Language: Extracting a Hidden Concept

Ubiquitous Language: Extracting a Hidden Concept

Слайд 21

Ubiquitous Language: Extracting a Hidden Concept

Ubiquitous Language: Extracting a Hidden Concept

Слайд 22

Ubiquitous Language: Extracting a Hidden Concept

Ubiquitous Language: Extracting a Hidden Concept

Слайд 23

DDD toolbox: Domain, Subdomain

DDD toolbox: Domain, Subdomain

Слайд 24

Result of using Ubiquitous Language, Domain and Subdomain

Result of using Ubiquitous Language, Domain and Subdomain

Слайд 25

Three steps to defining an application’s microservice architecture Identify services:

Three steps to defining an application’s microservice architecture

Identify services:

Слайд 26

Patterns for decomposing an application into services Decompose by business capability Decompose by subdomain

Patterns for decomposing an application into services

Decompose by business capability

Decompose

by subdomain
Слайд 27

DDD toolbox: Bounded Context Explicitly set boundaries in terms of

DDD toolbox: Bounded Context

Explicitly set boundaries in terms of team organization

Explicitly

define the context within which a model is applied

Keep the model strictly consistent within these bounds

Слайд 28

Bounded Context: possible problems Duplicate concepts False cognates Customer Client Order

Bounded Context: possible problems

Duplicate concepts

False cognates

Customer

Client

Order

Слайд 29

God classes preventing decomposition

God classes preventing decomposition

Слайд 30

God classes preventing decomposition

God classes preventing decomposition

Слайд 31

DDD toolbox: Aggregate The atomic unit for any transactional behavior.

DDD toolbox: Aggregate

The atomic unit for any transactional behavior.

Responsible for maintaining

any/all business invariants.

A cluster of objects treated as a single unit.

Only accessed through its Root Entity.

Слайд 32

Reference other aggregate roots via identity (primary key) Aggregate: Rule #1

Reference other aggregate roots via identity (primary key)

Aggregate: Rule #1

Слайд 33

Aggregate: Rule #2 One transaction creates or updates one aggregate (Transaction scope = service) X X

Aggregate: Rule #2

One transaction creates or updates one aggregate (Transaction scope

= service)

X

X

Слайд 34

Aggregate granularity Product Order Customer Product Order Customer Product Order Customer Consistency Scalability

Aggregate granularity

Product

Order

Customer

Product

Order

Customer

Product

Order

Customer

Consistency

Scalability

Слайд 35

DDD & Microservices Apply strategic DDD to identify microservices (bounded

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

What is the right size of a service in the microservice

architecture?

“...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 microservice architecture?

What is the right size of a service in the microservice

architecture?
Слайд 38

Useful links Domain-Driven Design: Tackling Complexity in the Heart of

Useful links

Domain-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
Имя файла: Microservices---DDD-=-Micromonolith.pptx
Количество просмотров: 79
Количество скачиваний: 0