SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
Domain-Driven Design
A Gentle Introduction into Challenging Topic
Asher Sterkin
asher.sterkin@gmail.com
Clean Code Meetup
January 2, AppsFlyer
About DDD IL
Asher SterkinVladik Khononov Erik Ashepa
● White belt circle: spread the word about DDD
● Black belt circle: apply DDD to real problems
Feel free to reach out if you want to join any of them
About Myself
● Software technologist/architect
● Almost 40 years in the field
● Former VP Technology @ NDS and Distinguished Engineer @ Cisco
● Currently CTO @ IRKI
● C-level mentoring on software strategy
● Cross-discipline approach (connecting the dots):
○ (Strategic) Domain-Driven Design
○ Serverless Architecture
○ Cynefin
○ Wardley Maps
○ Lean Startup
○ Promise Theory
○ ...
● Just an overview of the main DDD concepts
● All examples are purely illustrative
● No architectural or technological recommendations
● All wording is mine, as well as mistakes
Disclaimer
Domain-Driven Design is More Relevant than Ever
● Software infrastructure is rapidly commoditized
● Focus on delivering business value “yesterday”
● AI, AR, VR, 3DP, IoT, Blockchain spiral complexity up
● Need a practical method to keep complexity under control
● So far DDD has an unsurpassed record in this area
Domain-Driven Design Acronym
L
M
B
N
Pronounced LA-M-BA-N (invention is mine)
Domain-Driven Design at a Glance
Language
Model
Boundaries
Nesting
Language
● Common (ubiquitous) language for domain
and software experts
● Vocabulary reflected directly in software
● Normally a subset of domain-specific jargon
DDD is essentially a linguistic process
Model
• Language elements have meaning (semantics)
• Semantics is captured in a form of formal model:
– Object-Oriented
– Statecharts
– Functional
– Relational
– Graph
– Mathematical
– Neural Networks
– …
DDD is also a modeling process
Boundaries
● “One size fits all” models are impractical
● G-d like models result in Big Ball of Mud
● DDD insists on identifying multiple models:
○ Coherent within their own boundaries
○ Mapped onto others where
appropriate
DDD is about maintaining boundaries for- and mappings between- models
Example
SW? SW?
?
Example
SWHR SWFN
Employee, Salary, Bonus, ...
Nesting
● Boundaries exist at different levels of granularity
● Within DDD approach the following levels of granularity are considered:
○ Conceptual boundaries (sub-domains)
○ Application and Domain Services
○ Bounded Context
○ Stateless vs Stateful Elements
○ Aggregate
○ Entity
○ Value
● It’s possible to stop at any level and still have some value
● Not all parts of the system will be designed equally well!
Sub-domains
Generic Services
Supporting Services
Core
?
?
?
Sub-domains (popular version)
Generic Services
Supporting Services
Core
Needs to be done, but no advantage
Makes you money
3rd party products/services, no advantage
Example (my approach)
Generic Services
Supporting Services
Core
...
...
Green Invoice
push down
pull up
Generic for any domain
Common for group of domains
Essense of my business
Strategic Impact: build, buy, contribute
CDN
Application vs Domain Services (oversimplified)
users
things
robots
UI devices
Application Services Domain ServicesDDD is primarily focused on thisSome practitioners believe that
applying DDD here would be an
overkill, some others do not
IoT Device
Gateway
API Gateway
IoT Protocol
Gateway
API Gateway App Service
Domain Service
Domain Service
App Cache
App Service
App Service
Event Stream
Example
Clients App Services Domain Services
? ? ?
Textbook Example: Netflix API
App API App Services Domain API Domain API
Bounded Context
Bounded Context
Domain Model
Ubiquitous Language Nouns, Adjectives, Imperative Verbs, Interrogative Verbs, Perfect Tense
Verbs, Syntax, Grammar
Entities, Values, Commands, Queries, Events, Aggregates, Repository,
Computational Services, Factories, Anti-Corruption Layer, Saga
Bounded Context
Domain Model
Ubiquitous Language
context map
● Linguistic boundaries
● Reflect commitment to maintain strong cohesion inside and loose coupling outside
● Inside Bounded Context the model could evolve independently
● Defines a Minimal Meaningful scope with Maximum Acceptable Risk of not having semantic
consistency across different parts of the system (not too much, not too little)
Example
Bounded Context
?
Bounded Context
?
?
Example (my system at the moment)
Bounded Context
Front
Office
Bounded Context
Back Office
Bounded Context
Product
Design
Green Invoice
Stateless vs Stateful
Saga
Stateless
Computation
Stateful Object
Implements a multi-step
workflow. Needs state to
keep track of progress
and run compensating
transactions in the case of
failure
Stateful Objects introduced
when managing State is a part
of the Domain Service contract
Performs computation which does not
naturally fit into any stateful object. In
particular could be a Factory for some
Stateful Object with complex creation process
Example
Workflow
?
Stateless
Computation
?
Stateful Object
?
Example (mine)
Workflow
Product Item
Registration
Stateless
Computation
Resize
Picture
Product Catalog
Pictures
Product Types
Colors
Strong Transaction
Consistency + Invariant
DDD Aggregate and Repository
<<Aggregate Root>>
Entity
Entity Value
Value
Eventual
Transaction
Consistency
aggregate storage
store/retrieve requests -->
command/query requests -->
update/query method call -->
● Data integrity boundaries
● Reflects commitment to maintain strong transactional consistency
inside and eventual consistency outside
● Inner parts are accessible only via Aggregate Root
● Inside Aggregate some form of invariant is maintained
● Aggregates of the same type are stored within Repository
● Defines a Minimal Meaningful transactional scope with Maximum
Acceptable Risk level of not having immediate data consistency
across different parts of the system (not too much, not too little)
Command/query
Request Processor
Aggregate
Repository
Aggregate
DDD Entity, Value, Event, and Command
<<Aggregate Root>>
Entity
Entity Value
Value
Puts boundaries
around some identity,
which has state and
history
<<Aggregate Root>>
Entity
Ref
Value
Many Aggregates are
flat, but some have
nested Entities
Does not have identity or history. Encapsulates raw data types
(e.g. Integer, String) to supply meaningful names from
Ubiquitous Language (e.g. Street) including external references
to other Aggregates
Event
Something interesting
happened
Command
Way to send
an update
request to
Aggregate
Example
Event
?
<<Aggregate Root>>
?
Value
?
Command
?
Example (mine)
Tariff
Changed
<<Aggregate Root>>
ProductType
Tariff
Necklace
Bracelet
Earrings
...
Operation Beadwork
Clasp
...
Currency NIS
Change
Tariff
Advanced Topics not Covered Here
● Strategic DDD Patterns
● Context Mapping
● Command-Query Request Segregation (CQRS)
● Event Sourcing (ES)
● Dealing with Legacy Systems
● Event Storming
● DDD and Microservices (Erik’s talk)
● Cloud-native and Serverless DDD (area of my research)
● DDD and Machine/Deep Learning
● DDD and IoT
● DDD and VR/AR
● ...
DDD Bookshelf
DDD Video Library
● Eric Evans: Tackling Complexity in the Heart of Software
● Eric Evans: Good Design is Imperfect Design
● Eric Evans: DDD & Microservices: At Last, Some Boundaries!
● Eric Evans: Acknowledging CAP at the Root -- in the Domain Model
● Many, many more on YouTube and Vimeo
●
DDD Online
● Eric Evans’ site: https://domainlanguage.com/
● Domain-Driven Design on InfoQ: https://www.infoq.com/domain-driven-design
● Long curated list at https://github.com/heynickc/awesome-ddd
● Vladik’s Blog at http://vladikk.com/
●
A Shameless Promotion
Domain-Driven Design Gentle Intro Challenging Topic

Weitere ähnliche Inhalte

Was ist angesagt?

Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignNader Albert
 
Microservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and SagaMicroservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and SagaAraf Karsh Hamid
 
Designing APIs and Microservices Using Domain-Driven Design
Designing APIs and Microservices Using Domain-Driven DesignDesigning APIs and Microservices Using Domain-Driven Design
Designing APIs and Microservices Using Domain-Driven DesignLaunchAny
 
Data Center Migration to the AWS Cloud
Data Center Migration to the AWS CloudData Center Migration to the AWS Cloud
Data Center Migration to the AWS CloudTom Laszewski
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven DesignAndriy Buday
 
SmartWave - Digital client onboarding solution
SmartWave - Digital client onboarding solutionSmartWave - Digital client onboarding solution
SmartWave - Digital client onboarding solutionSmartWave
 
Building Adaptive Systems with Wardley Mapping, Domain-Driven Design, and Tea...
Building Adaptive Systems with Wardley Mapping, Domain-Driven Design, and Tea...Building Adaptive Systems with Wardley Mapping, Domain-Driven Design, and Tea...
Building Adaptive Systems with Wardley Mapping, Domain-Driven Design, and Tea...Susanne Kaiser
 
Brownfield Domain Driven Design
Brownfield Domain Driven DesignBrownfield Domain Driven Design
Brownfield Domain Driven DesignNicolò Pignatelli
 
How to implement omnichannel architecture
How to implement omnichannel architectureHow to implement omnichannel architecture
How to implement omnichannel architectureElena Martínez
 
Large-Scale AWS Migrations with CSC
Large-Scale AWS Migrations with CSCLarge-Scale AWS Migrations with CSC
Large-Scale AWS Migrations with CSCAmazon Web Services
 
An Overview of Best Practices for Large Scale Migrations - AWS Transformation...
An Overview of Best Practices for Large Scale Migrations - AWS Transformation...An Overview of Best Practices for Large Scale Migrations - AWS Transformation...
An Overview of Best Practices for Large Scale Migrations - AWS Transformation...Amazon Web Services
 
The need for Business design to underpin strategic and operational agility
The need for Business design to underpin strategic and operational agility The need for Business design to underpin strategic and operational agility
The need for Business design to underpin strategic and operational agility Craig Martin
 
Distributed sagas a protocol for coordinating microservices
Distributed sagas a protocol for coordinating microservicesDistributed sagas a protocol for coordinating microservices
Distributed sagas a protocol for coordinating microservicesJ On The Beach
 
How to make Headless Commerce Strategy.
How to make Headless Commerce Strategy.How to make Headless Commerce Strategy.
How to make Headless Commerce Strategy.Aureate Labs
 
A Pattern Language for Microservices
A Pattern Language for MicroservicesA Pattern Language for Microservices
A Pattern Language for MicroservicesChris Richardson
 
Les Chaines de Valeur : le bon, la brute et le truand - Agile en Seine 2021
Les Chaines de Valeur : le bon, la brute et le truand - Agile en Seine 2021Les Chaines de Valeur : le bon, la brute et le truand - Agile en Seine 2021
Les Chaines de Valeur : le bon, la brute et le truand - Agile en Seine 2021Agile En Seine
 
Event-Driven Transformation in Banking and FSI
Event-Driven Transformation in Banking and FSIEvent-Driven Transformation in Banking and FSI
Event-Driven Transformation in Banking and FSISolace
 
Capgemini Cloud Assessment - A Pathway to Enterprise Cloud Migration
Capgemini Cloud Assessment - A Pathway to Enterprise Cloud MigrationCapgemini Cloud Assessment - A Pathway to Enterprise Cloud Migration
Capgemini Cloud Assessment - A Pathway to Enterprise Cloud MigrationFloyd DCosta
 

Was ist angesagt? (20)

Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Microservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and SagaMicroservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and Saga
 
Designing APIs and Microservices Using Domain-Driven Design
Designing APIs and Microservices Using Domain-Driven DesignDesigning APIs and Microservices Using Domain-Driven Design
Designing APIs and Microservices Using Domain-Driven Design
 
Data Center Migration to the AWS Cloud
Data Center Migration to the AWS CloudData Center Migration to the AWS Cloud
Data Center Migration to the AWS Cloud
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven Design
 
AWS Migration Planning Roadmap
AWS Migration Planning RoadmapAWS Migration Planning Roadmap
AWS Migration Planning Roadmap
 
SmartWave - Digital client onboarding solution
SmartWave - Digital client onboarding solutionSmartWave - Digital client onboarding solution
SmartWave - Digital client onboarding solution
 
Building Adaptive Systems with Wardley Mapping, Domain-Driven Design, and Tea...
Building Adaptive Systems with Wardley Mapping, Domain-Driven Design, and Tea...Building Adaptive Systems with Wardley Mapping, Domain-Driven Design, and Tea...
Building Adaptive Systems with Wardley Mapping, Domain-Driven Design, and Tea...
 
Brownfield Domain Driven Design
Brownfield Domain Driven DesignBrownfield Domain Driven Design
Brownfield Domain Driven Design
 
How to implement omnichannel architecture
How to implement omnichannel architectureHow to implement omnichannel architecture
How to implement omnichannel architecture
 
Large-Scale AWS Migrations with CSC
Large-Scale AWS Migrations with CSCLarge-Scale AWS Migrations with CSC
Large-Scale AWS Migrations with CSC
 
An Overview of Best Practices for Large Scale Migrations - AWS Transformation...
An Overview of Best Practices for Large Scale Migrations - AWS Transformation...An Overview of Best Practices for Large Scale Migrations - AWS Transformation...
An Overview of Best Practices for Large Scale Migrations - AWS Transformation...
 
The need for Business design to underpin strategic and operational agility
The need for Business design to underpin strategic and operational agility The need for Business design to underpin strategic and operational agility
The need for Business design to underpin strategic and operational agility
 
Distributed sagas a protocol for coordinating microservices
Distributed sagas a protocol for coordinating microservicesDistributed sagas a protocol for coordinating microservices
Distributed sagas a protocol for coordinating microservices
 
How to make Headless Commerce Strategy.
How to make Headless Commerce Strategy.How to make Headless Commerce Strategy.
How to make Headless Commerce Strategy.
 
A Pattern Language for Microservices
A Pattern Language for MicroservicesA Pattern Language for Microservices
A Pattern Language for Microservices
 
Les Chaines de Valeur : le bon, la brute et le truand - Agile en Seine 2021
Les Chaines de Valeur : le bon, la brute et le truand - Agile en Seine 2021Les Chaines de Valeur : le bon, la brute et le truand - Agile en Seine 2021
Les Chaines de Valeur : le bon, la brute et le truand - Agile en Seine 2021
 
Cloud Strategy First
 Cloud Strategy First Cloud Strategy First
Cloud Strategy First
 
Event-Driven Transformation in Banking and FSI
Event-Driven Transformation in Banking and FSIEvent-Driven Transformation in Banking and FSI
Event-Driven Transformation in Banking and FSI
 
Capgemini Cloud Assessment - A Pathway to Enterprise Cloud Migration
Capgemini Cloud Assessment - A Pathway to Enterprise Cloud MigrationCapgemini Cloud Assessment - A Pathway to Enterprise Cloud Migration
Capgemini Cloud Assessment - A Pathway to Enterprise Cloud Migration
 

Ähnlich wie Domain-Driven Design Gentle Intro Challenging Topic

Developing cloud serverless components in Python: DDD Perspective
Developing cloud serverless components in Python: DDD PerspectiveDeveloping cloud serverless components in Python: DDD Perspective
Developing cloud serverless components in Python: DDD PerspectiveAsher Sterkin
 
Microservices as an evolutionary architecture: lessons learned
Microservices as an evolutionary architecture: lessons learnedMicroservices as an evolutionary architecture: lessons learned
Microservices as an evolutionary architecture: lessons learnedLuram Archanjo
 
From class to architecture
From class to architectureFrom class to architecture
From class to architectureMarcin Hawraniak
 
Applying Domain-Driven Design to craft Rich Domain Models
Applying Domain-Driven Design to craft Rich Domain ModelsApplying Domain-Driven Design to craft Rich Domain Models
Applying Domain-Driven Design to craft Rich Domain ModelsAlexander van Trijffel
 
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...Daniel Zivkovic
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignMuhammad Ali
 
Which Questions We Should Have
Which Questions We Should HaveWhich Questions We Should Have
Which Questions We Should HaveOracle Korea
 
Shaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patternsShaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patternsShimon Tolts
 
Shaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patternsShaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patternsAsher Sterkin
 
D2 domain driven-design
D2 domain driven-designD2 domain driven-design
D2 domain driven-designArnaud Bouchez
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignRyan Riley
 
Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introductionwojtek_s
 
Clean architecture
Clean architectureClean architecture
Clean architecture.NET Crowd
 
Modelling a complex domain with Domain-Driven Design
Modelling a complex domain with Domain-Driven DesignModelling a complex domain with Domain-Driven Design
Modelling a complex domain with Domain-Driven DesignNaeem Sarfraz
 
Idiomatic Domain Driven Design: implementing CQRS
Idiomatic Domain Driven Design: implementing CQRSIdiomatic Domain Driven Design: implementing CQRS
Idiomatic Domain Driven Design: implementing CQRSAndrea Saltarello
 
An Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHPAn Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHPChris Renner
 
Domain Driven Design & Hexagonal Architecture
Domain Driven Design & Hexagonal ArchitectureDomain Driven Design & Hexagonal Architecture
Domain Driven Design & Hexagonal ArchitectureCan Pekdemir
 
AWS Techniques and lessons writing a minimal cost gitlab runner
AWS Techniques and lessons writing a minimal cost gitlab runnerAWS Techniques and lessons writing a minimal cost gitlab runner
AWS Techniques and lessons writing a minimal cost gitlab runnerAnthony Scata
 

Ähnlich wie Domain-Driven Design Gentle Intro Challenging Topic (20)

Developing cloud serverless components in Python: DDD Perspective
Developing cloud serverless components in Python: DDD PerspectiveDeveloping cloud serverless components in Python: DDD Perspective
Developing cloud serverless components in Python: DDD Perspective
 
Microservices as an evolutionary architecture: lessons learned
Microservices as an evolutionary architecture: lessons learnedMicroservices as an evolutionary architecture: lessons learned
Microservices as an evolutionary architecture: lessons learned
 
From class to architecture
From class to architectureFrom class to architecture
From class to architecture
 
Applying Domain-Driven Design to craft Rich Domain Models
Applying Domain-Driven Design to craft Rich Domain ModelsApplying Domain-Driven Design to craft Rich Domain Models
Applying Domain-Driven Design to craft Rich Domain Models
 
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Which Questions We Should Have
Which Questions We Should HaveWhich Questions We Should Have
Which Questions We Should Have
 
Shaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patternsShaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patterns
 
Shaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patternsShaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patterns
 
D2 domain driven-design
D2 domain driven-designD2 domain driven-design
D2 domain driven-design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introduction
 
Clean architecture
Clean architectureClean architecture
Clean architecture
 
Modelling a complex domain with Domain-Driven Design
Modelling a complex domain with Domain-Driven DesignModelling a complex domain with Domain-Driven Design
Modelling a complex domain with Domain-Driven Design
 
Idiomatic Domain Driven Design: implementing CQRS
Idiomatic Domain Driven Design: implementing CQRSIdiomatic Domain Driven Design: implementing CQRS
Idiomatic Domain Driven Design: implementing CQRS
 
An Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHPAn Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHP
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven Design
 
Domain Driven Design & Hexagonal Architecture
Domain Driven Design & Hexagonal ArchitectureDomain Driven Design & Hexagonal Architecture
Domain Driven Design & Hexagonal Architecture
 
AWS Techniques and lessons writing a minimal cost gitlab runner
AWS Techniques and lessons writing a minimal cost gitlab runnerAWS Techniques and lessons writing a minimal cost gitlab runner
AWS Techniques and lessons writing a minimal cost gitlab runner
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 

Mehr von Asher Sterkin

Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024Asher Sterkin
 
Cloud Infrastructure from Python Code: PyCon DE-23
Cloud Infrastructure from Python Code: PyCon DE-23Cloud Infrastructure from Python Code: PyCon DE-23
Cloud Infrastructure from Python Code: PyCon DE-23Asher Sterkin
 
pyjamas22_ generic composite in python.pdf
pyjamas22_ generic composite in python.pdfpyjamas22_ generic composite in python.pdf
pyjamas22_ generic composite in python.pdfAsher Sterkin
 
If your computer is cloud what its Operating System look like?
If your computer is cloud what its Operating System look like?If your computer is cloud what its Operating System look like?
If your computer is cloud what its Operating System look like?Asher Sterkin
 
Serverless flow programming a new perspective (py web meetup, sept 2nd, 2019...
Serverless flow programming  a new perspective (py web meetup, sept 2nd, 2019...Serverless flow programming  a new perspective (py web meetup, sept 2nd, 2019...
Serverless flow programming a new perspective (py web meetup, sept 2nd, 2019...Asher Sterkin
 
Documenting serverless architectures could we do it better - o'reily sa con...
Documenting serverless architectures  could we do it better  - o'reily sa con...Documenting serverless architectures  could we do it better  - o'reily sa con...
Documenting serverless architectures could we do it better - o'reily sa con...Asher Sterkin
 
Shaping serverless architecture with domain driven design patterns - py web-il
Shaping serverless architecture with domain driven design patterns - py web-ilShaping serverless architecture with domain driven design patterns - py web-il
Shaping serverless architecture with domain driven design patterns - py web-ilAsher Sterkin
 
Strategy toolbox for startsups
Strategy toolbox for startsupsStrategy toolbox for startsups
Strategy toolbox for startsupsAsher Sterkin
 
Software strategy for startups
Software strategy for startupsSoftware strategy for startups
Software strategy for startupsAsher Sterkin
 
What is exactly anti fragile in dev ops - v3
What is exactly anti fragile in dev ops - v3What is exactly anti fragile in dev ops - v3
What is exactly anti fragile in dev ops - v3Asher Sterkin
 

Mehr von Asher Sterkin (14)

Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024
 
Cloud Infrastructure from Python Code: PyCon DE-23
Cloud Infrastructure from Python Code: PyCon DE-23Cloud Infrastructure from Python Code: PyCon DE-23
Cloud Infrastructure from Python Code: PyCon DE-23
 
PyCascades-23.pdf
PyCascades-23.pdfPyCascades-23.pdf
PyCascades-23.pdf
 
PyConFR-23 Talk.pdf
PyConFR-23 Talk.pdfPyConFR-23 Talk.pdf
PyConFR-23 Talk.pdf
 
pyjamas22_ generic composite in python.pdf
pyjamas22_ generic composite in python.pdfpyjamas22_ generic composite in python.pdf
pyjamas22_ generic composite in python.pdf
 
If your computer is cloud what its Operating System look like?
If your computer is cloud what its Operating System look like?If your computer is cloud what its Operating System look like?
If your computer is cloud what its Operating System look like?
 
Serverless flow programming a new perspective (py web meetup, sept 2nd, 2019...
Serverless flow programming  a new perspective (py web meetup, sept 2nd, 2019...Serverless flow programming  a new perspective (py web meetup, sept 2nd, 2019...
Serverless flow programming a new perspective (py web meetup, sept 2nd, 2019...
 
Documenting serverless architectures could we do it better - o'reily sa con...
Documenting serverless architectures  could we do it better  - o'reily sa con...Documenting serverless architectures  could we do it better  - o'reily sa con...
Documenting serverless architectures could we do it better - o'reily sa con...
 
Shaping serverless architecture with domain driven design patterns - py web-il
Shaping serverless architecture with domain driven design patterns - py web-ilShaping serverless architecture with domain driven design patterns - py web-il
Shaping serverless architecture with domain driven design patterns - py web-il
 
Strategy toolbox for startsups
Strategy toolbox for startsupsStrategy toolbox for startsups
Strategy toolbox for startsups
 
AI as a service
AI as a serviceAI as a service
AI as a service
 
Serverless ddd
Serverless dddServerless ddd
Serverless ddd
 
Software strategy for startups
Software strategy for startupsSoftware strategy for startups
Software strategy for startups
 
What is exactly anti fragile in dev ops - v3
What is exactly anti fragile in dev ops - v3What is exactly anti fragile in dev ops - v3
What is exactly anti fragile in dev ops - v3
 

Kürzlich hochgeladen

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 

Kürzlich hochgeladen (20)

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 

Domain-Driven Design Gentle Intro Challenging Topic

  • 1. Domain-Driven Design A Gentle Introduction into Challenging Topic Asher Sterkin asher.sterkin@gmail.com Clean Code Meetup January 2, AppsFlyer
  • 2. About DDD IL Asher SterkinVladik Khononov Erik Ashepa ● White belt circle: spread the word about DDD ● Black belt circle: apply DDD to real problems Feel free to reach out if you want to join any of them
  • 3. About Myself ● Software technologist/architect ● Almost 40 years in the field ● Former VP Technology @ NDS and Distinguished Engineer @ Cisco ● Currently CTO @ IRKI ● C-level mentoring on software strategy ● Cross-discipline approach (connecting the dots): ○ (Strategic) Domain-Driven Design ○ Serverless Architecture ○ Cynefin ○ Wardley Maps ○ Lean Startup ○ Promise Theory ○ ...
  • 4. ● Just an overview of the main DDD concepts ● All examples are purely illustrative ● No architectural or technological recommendations ● All wording is mine, as well as mistakes Disclaimer
  • 5. Domain-Driven Design is More Relevant than Ever ● Software infrastructure is rapidly commoditized ● Focus on delivering business value “yesterday” ● AI, AR, VR, 3DP, IoT, Blockchain spiral complexity up ● Need a practical method to keep complexity under control ● So far DDD has an unsurpassed record in this area
  • 6. Domain-Driven Design Acronym L M B N Pronounced LA-M-BA-N (invention is mine)
  • 7. Domain-Driven Design at a Glance Language Model Boundaries Nesting
  • 8. Language ● Common (ubiquitous) language for domain and software experts ● Vocabulary reflected directly in software ● Normally a subset of domain-specific jargon DDD is essentially a linguistic process
  • 9. Model • Language elements have meaning (semantics) • Semantics is captured in a form of formal model: – Object-Oriented – Statecharts – Functional – Relational – Graph – Mathematical – Neural Networks – … DDD is also a modeling process
  • 10. Boundaries ● “One size fits all” models are impractical ● G-d like models result in Big Ball of Mud ● DDD insists on identifying multiple models: ○ Coherent within their own boundaries ○ Mapped onto others where appropriate DDD is about maintaining boundaries for- and mappings between- models
  • 13. Nesting ● Boundaries exist at different levels of granularity ● Within DDD approach the following levels of granularity are considered: ○ Conceptual boundaries (sub-domains) ○ Application and Domain Services ○ Bounded Context ○ Stateless vs Stateful Elements ○ Aggregate ○ Entity ○ Value ● It’s possible to stop at any level and still have some value ● Not all parts of the system will be designed equally well!
  • 15. Sub-domains (popular version) Generic Services Supporting Services Core Needs to be done, but no advantage Makes you money 3rd party products/services, no advantage
  • 16. Example (my approach) Generic Services Supporting Services Core ... ... Green Invoice push down pull up Generic for any domain Common for group of domains Essense of my business Strategic Impact: build, buy, contribute
  • 17. CDN Application vs Domain Services (oversimplified) users things robots UI devices Application Services Domain ServicesDDD is primarily focused on thisSome practitioners believe that applying DDD here would be an overkill, some others do not IoT Device Gateway API Gateway IoT Protocol Gateway API Gateway App Service Domain Service Domain Service App Cache App Service App Service Event Stream
  • 18. Example Clients App Services Domain Services ? ? ?
  • 19. Textbook Example: Netflix API App API App Services Domain API Domain API
  • 20. Bounded Context Bounded Context Domain Model Ubiquitous Language Nouns, Adjectives, Imperative Verbs, Interrogative Verbs, Perfect Tense Verbs, Syntax, Grammar Entities, Values, Commands, Queries, Events, Aggregates, Repository, Computational Services, Factories, Anti-Corruption Layer, Saga Bounded Context Domain Model Ubiquitous Language context map ● Linguistic boundaries ● Reflect commitment to maintain strong cohesion inside and loose coupling outside ● Inside Bounded Context the model could evolve independently ● Defines a Minimal Meaningful scope with Maximum Acceptable Risk of not having semantic consistency across different parts of the system (not too much, not too little)
  • 22. Example (my system at the moment) Bounded Context Front Office Bounded Context Back Office Bounded Context Product Design Green Invoice
  • 23. Stateless vs Stateful Saga Stateless Computation Stateful Object Implements a multi-step workflow. Needs state to keep track of progress and run compensating transactions in the case of failure Stateful Objects introduced when managing State is a part of the Domain Service contract Performs computation which does not naturally fit into any stateful object. In particular could be a Factory for some Stateful Object with complex creation process
  • 26. Strong Transaction Consistency + Invariant DDD Aggregate and Repository <<Aggregate Root>> Entity Entity Value Value Eventual Transaction Consistency aggregate storage store/retrieve requests --> command/query requests --> update/query method call --> ● Data integrity boundaries ● Reflects commitment to maintain strong transactional consistency inside and eventual consistency outside ● Inner parts are accessible only via Aggregate Root ● Inside Aggregate some form of invariant is maintained ● Aggregates of the same type are stored within Repository ● Defines a Minimal Meaningful transactional scope with Maximum Acceptable Risk level of not having immediate data consistency across different parts of the system (not too much, not too little) Command/query Request Processor Aggregate Repository Aggregate
  • 27. DDD Entity, Value, Event, and Command <<Aggregate Root>> Entity Entity Value Value Puts boundaries around some identity, which has state and history <<Aggregate Root>> Entity Ref Value Many Aggregates are flat, but some have nested Entities Does not have identity or history. Encapsulates raw data types (e.g. Integer, String) to supply meaningful names from Ubiquitous Language (e.g. Street) including external references to other Aggregates Event Something interesting happened Command Way to send an update request to Aggregate
  • 30. Advanced Topics not Covered Here ● Strategic DDD Patterns ● Context Mapping ● Command-Query Request Segregation (CQRS) ● Event Sourcing (ES) ● Dealing with Legacy Systems ● Event Storming ● DDD and Microservices (Erik’s talk) ● Cloud-native and Serverless DDD (area of my research) ● DDD and Machine/Deep Learning ● DDD and IoT ● DDD and VR/AR ● ...
  • 32. DDD Video Library ● Eric Evans: Tackling Complexity in the Heart of Software ● Eric Evans: Good Design is Imperfect Design ● Eric Evans: DDD & Microservices: At Last, Some Boundaries! ● Eric Evans: Acknowledging CAP at the Root -- in the Domain Model ● Many, many more on YouTube and Vimeo ●
  • 33. DDD Online ● Eric Evans’ site: https://domainlanguage.com/ ● Domain-Driven Design on InfoQ: https://www.infoq.com/domain-driven-design ● Long curated list at https://github.com/heynickc/awesome-ddd ● Vladik’s Blog at http://vladikk.com/ ●