SlideShare una empresa de Scribd logo
1 de 56
Descargar para leer sin conexión
© Copyright 2017 Pivotal Software, Inc. All rights Reserved. Version 1.0
Deconstructing Monoliths
with Domain Driven Design
Rohit Kelapure - Pivotal
David Turanski - Pivotal
Rohit Sood - Liberty Mutual
Justin Stone - Liberty Mutual
Part 1
DDD, CQRS, EVENT SOURCING
© Copyright 2017 Pivotal Software, Inc. All rights Reserved.
Cover w/ Image
Domain-Driven Design
“...the real breakthrough of object
design comes when the code expresses
the concepts of a model.”
“Anyone responsible for changing code
must learn to express a model through
the code. Every developer must be
involved in some level of discussion
about the model and have contact with
domain experts.”
- Eric Evans, Domain-Driven Design
Domain Driven Design
“In the end the code is the model and the
model is the code.” - Vaughn Vernon ,
Domain-Driven Design Distilled
As opposed to:
1. Business Overview
1.1 Requirement
This interface is used to send Sched CGO
messages from SHIP-PRO to ODS. SHIP-PRO will
send the SyncSCHD_CGO BO to MBS and MBS will
push the data to ODS as SCHD_CGO_WRAPPER
BO.
This interface will also be added to the AMS view
for monitoring.
Entities, Value Objects, and Services
Entity - something with continuity and
identity (Customer)
Value Object - an attribute that
describes the state of something else
(Address)
Service - Actions or operations that
don’t belong in an Entity or VO
● Domain service - Funds transfer
● Technical service - Notification
Cover w/ Image
Aggregates
AGGREGATES mark off the
scope within which
invariants have to be
maintained at every stage of
the lifecycle
● Transactional
Boundary
● Public access only via
the Aggregate Root
Bounded Context
“Generally speaking, there is a correspondence of one team per BOUNDED CONTEXT. One team can
maintain multiple BOUNDED CONTEXTS, but it is hard … for multiple teams to work on one together.” -
Evans
Event Driven Architecture
Command Triggers Events
Messaging
Publish-Subscribe
Eventual Consistency
CQRS
Event Sourcing
CQRS + ES
Resources
SpringOne Platform Sessions
● Reactive DDD, Vaughn Vernon - Tue
● State or Events, J. Pillmon, K. Bestani - Tue
● Refactoring to System of Systems, O. Gierke
- Next up
Event Sourcing Frameworks
● Axon Framework -
http://www.axonframework.org/
● Eventuate - http://eventuate.io/
Event Store
● https://eventstore.org/
Further Reading
● Domain-Driven Design, Eric Evans
● Implementing Domain-Driven Design,
Vaughn Vernon
● Domain-Driven Design Distilled, Vaughn
Vernon
● Building Microservices, Sam Newman
● https://dturanski.wordpress.com/2017/03/26/
spring-cloud-stream-for-event-driven-archite
ctures/ , David Turanski
Modernizing Legacy workloads
Deconstructing The Monolith
Break a Complex Domain with Event Storming
ES - Enables Cross Perspective Communication
Situational Awareness
Making sense of a complex domain
Clarity
Identify the Right Constraint
Business Domain Model derived from Business Events
Deconstructing a Monolith
● Define Objectives and Key Results (OKRs)
● Event Storm the app and identify the core domain and key
constraints
● Pick horizontal sequences of events in the core domain
identified during ES
● Use C4 diagrams to identify a vertical slice of components that
realize the flow of events
● Identify a decomposition strategy
● Perform SNAP analysis on each of the components of the
vertical slice
● Generate a backlog of user stories and tie it back to the OKRs
● User story mapping to map user stories to MVPs
Selection of a Vertical Slice : Pick a Core Domain
C4 Architecture Diagrams
SNAP Analysis
1M LOC Insurance Domain Monolith
What is your
Decomposition
Strategy ?
Bounded Contexts
Value Streams
Failure Domains
Anti-Corruption Layers
Single Responsibility Principle
Kitchen Sink
Event Thinking
Reduce temporal coupling
● Instrument Monolith with Events
● Break Things apart with events
● Use domain language for events
● Build things on the outside
● Strangler Pattern
● Minimally Invasive
● Cannot rely on ordering of messages or zero
message loss
Strive for autonomy with messaging
● Messaging schemas can introduce coupling
● Sagas handle Eventual Consistency
● What operations are idempotent ?
● Handle duplicate messages with Outbox pattern
● Messaging schemas can introduce coupling
● Change in mindset
● Avoid Kafka as an ESB anti-pattern
● Spring Application Events or CDI Events
Many Meanings of Event Driven Architecture (EDA)
Event Carried State Transfer
● Update clients in a way that they
don't need to contact the source
system
● Receiver has to maintaining all the
state
● Decoupling
● Reduced load on supplier
● Replicated Data
● Eventual Consistency
Event Sourcing
● Every state change of the system
is recorded as an event
● Event store becomes the source
of truth, and the system state is
derived from it
● Audit, Debugging, Historic State,
Alternative State, Memory Image
● Unfamiliar, External Systems,
Event Schema, Identifiers,
Asynchrony, Versioning
Event Notification
● Send event messages to notify
other systems of a change in its
domain
● Event carries ID and link back to
the sender for more info
● Decouples sender from receiver
● No Statement of overall behavior
How To Deal With 2PC XA Global
Transactions in the Cloud
Pat Helland
http://queue.acm.org/detail.cfm?id=
3025012
Life Beyond
Distributed
Transactions
In a system that cannot count on
distributed transactions, the
management of uncertainty must be
implemented in the business logic.
The uncertainty of the outcome is
held in the business semantics rather
than in the record lock. This is simply
workflow.
We can’t use distributed transaction
so we need to use workflow.
Demons Lie Here
Complex Event Flows
Should you Event
Source or Not ?
Should I invest in the stock market
now ?
Every team is at liberty to select their own patterns
Is there tooling available to guide you
Do you have developers with the aptitude and ability
Does data need to be persisted temporally?
Is an audit log necessary ?
What is the overall system architecture ?
Event Driven Architecture Challenges
Versioning in an Event Sourced System
Greg Young https://leanpub.com/esversioning
Event Sourcing Framework Shootout
Lessons Learned From Real World Modernizations
Too many fine bounded contexts.
Correlation strategy and Lock Strategy get complicated
Complex work flows require Sagas & Process Managers
Microservices - one per aggregate ?
DIY Event Sourcing systems are hard. Too much time spent in toil
Leverage Consumer driven Contracts to establish clear schemas
across Bounded Contexts for messages
Chose the right style of Event Driven Architecture
Delay making frameworks
Powerpoint is dead long live the Stickies
Spring is missing an event sourcing and event persistence framework
Event Sourcing is hard without a
supporting event persistence
framework or library
Pick a framework based on the
guidance on the next slide before
beginning
Challenge preconceived
architectural decisions
Set goals with measurable
metrics.
Be wary of the Hourglass effect
Part 3
Real World Experiences
© Copyright 2017 Pivotal Software, Inc. All rights Reserved.
Cover w/ Image
Our Experiences with...
■ Technical Debt
■ Monoliths
■ Entropy
■ Event Storming
■ Breaking Down Monoliths for real
■ MSA w/DDD to API-First
■ 12 factors & beyond
Technical Debt is Invisible but Real
Source: https://philippe.kruchten.com/
Conway’s Law holds true
Source: https://martinfowler.com/articles/microservices.html#CharacteristicsOfAMicroserviceArchitecture
“Any organization that designs a
system (defined broadly) will
produce a design whose structure is
a copy of the organization's
communication structure.”
- Conway’s Law
Source: http://melconway.com/Home/Conways_Law.html
Entropy always tends to increase within monoliths
Source: http://facstaff.gpc.edu/~mkim/C1211&1212Lec/C1212_Lecture.htm
Microservices
“In short, the micro-service architectural style is an approach to developing a single application as a
suite of small services, each running in its own process and communicating with lightweight
mechanisms, often an HTTP resource API.
These services are built around business capabilities and independently deployable by fully automated
deployment machinery. There is a bare minimum of centralized management of these services, which
may be written in different programming languages and use different data storage technologies.”
-Fowler, Lewis et al
Logical Separation Physical Separation
Decoupled UI Microservices
Before After *
* one bc agg
Weeks of coding can save you hours of designing.
Cover w/ Image
DDD In Practice
Aggregate (with root)
Aggregate (with root)
Context Map
1. Design API Spec 2. Collaborate & Refactor
3. Generate Server (starter)
4. Refactor/Implement Logic/Test
5. Run
Experiences & Observations
Technical Debt is real but invisible.
Monoliths can lead to technical debt.
System Entropy always wins.
Conway’s Law is true.
Microservices is not just about small services.
12 factors are important for CNA.
Go beyond the 12 factors - adopt API-First.
Breaking down monoliths with DDD.
Event Storming is a good Kickstarter to DDD.
Domain driven design should help lead to APIs first.
CQRS is a powerful pattern.
Event Sourcing is a difficult pattern - not for the faint of heart.
New technologies can bring new unknowns.
Pair programming worked very well.
Conclusions
● EDA is not the same as Event Sourcing
● Dealing with consistency is HARD.
● How do you recover ?
● Hours of design can save weeks of coding
● Pick your core architectural style
● Prefer the evolutionary approach to architecture
● Address the people challenges before the technical
ones
● Event Storming can help you identify your core domain

Más contenido relacionado

La actualidad más candente

CQRS and Event Sourcing, An Alternative Architecture for DDD
CQRS and Event Sourcing, An Alternative Architecture for DDDCQRS and Event Sourcing, An Alternative Architecture for DDD
CQRS and Event Sourcing, An Alternative Architecture for DDDDennis Doomen
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices Bozhidar Bozhanov
 
Domain driven design
Domain driven designDomain driven design
Domain driven designtatyaso
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationOğuzhan Soykan
 
Microservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsMicroservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsAraf Karsh Hamid
 
Domain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) DistilledDomain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) DistilledNicola Costantino
 
Enterprise Software Architecture styles
Enterprise Software Architecture stylesEnterprise Software Architecture styles
Enterprise Software Architecture stylesAraf Karsh Hamid
 
Strategic Domain-Driven Design by Nick Tune at #AgileIndia2019
Strategic Domain-Driven Design by Nick Tune at #AgileIndia2019Strategic Domain-Driven Design by Nick Tune at #AgileIndia2019
Strategic Domain-Driven Design by Nick Tune at #AgileIndia2019Agile India
 
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
 
Using Software Architecture Principles in Practice
Using Software Architecture Principles in PracticeUsing Software Architecture Principles in Practice
Using Software Architecture Principles in PracticeEoin Woods
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignNader Albert
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecturetyrantbrian
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principlesSanjoy Kumar Roy
 
Interactive real time dashboards on data streams using Kafka, Druid, and Supe...
Interactive real time dashboards on data streams using Kafka, Druid, and Supe...Interactive real time dashboards on data streams using Kafka, Druid, and Supe...
Interactive real time dashboards on data streams using Kafka, Druid, and Supe...DataWorks Summit
 
DDD Strategic Patterns and Microservices by Example
DDD Strategic Patterns and Microservices by ExampleDDD Strategic Patterns and Microservices by Example
DDD Strategic Patterns and Microservices by ExampleErik Ashepa
 
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and HailoMicroservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailogjuljo
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven DesignAndriy Buday
 
Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Araf Karsh Hamid
 

La actualidad más candente (20)

CQRS and Event Sourcing, An Alternative Architecture for DDD
CQRS and Event Sourcing, An Alternative Architecture for DDDCQRS and Event Sourcing, An Alternative Architecture for DDD
CQRS and Event Sourcing, An Alternative Architecture for DDD
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices
 
Domain driven design
Domain driven designDomain driven design
Domain driven design
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) Presentation
 
Microservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsMicroservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native Apps
 
Domain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) DistilledDomain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) Distilled
 
Enterprise Software Architecture styles
Enterprise Software Architecture stylesEnterprise Software Architecture styles
Enterprise Software Architecture styles
 
Strategic Domain-Driven Design by Nick Tune at #AgileIndia2019
Strategic Domain-Driven Design by Nick Tune at #AgileIndia2019Strategic Domain-Driven Design by Nick Tune at #AgileIndia2019
Strategic Domain-Driven Design by Nick Tune at #AgileIndia2019
 
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
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Using Software Architecture Principles in Practice
Using Software Architecture Principles in PracticeUsing Software Architecture Principles in Practice
Using Software Architecture Principles in Practice
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principles
 
Interactive real time dashboards on data streams using Kafka, Druid, and Supe...
Interactive real time dashboards on data streams using Kafka, Druid, and Supe...Interactive real time dashboards on data streams using Kafka, Druid, and Supe...
Interactive real time dashboards on data streams using Kafka, Druid, and Supe...
 
DDD Strategic Patterns and Microservices by Example
DDD Strategic Patterns and Microservices by ExampleDDD Strategic Patterns and Microservices by Example
DDD Strategic Patterns and Microservices by Example
 
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and HailoMicroservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven Design
 
Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018
 

Similar a Deconstructing Monoliths with Domain Driven Design

Event Sourcing in less than 20 minutes - With Akka and Java 8
Event Sourcing in less than 20 minutes - With Akka and Java 8Event Sourcing in less than 20 minutes - With Akka and Java 8
Event Sourcing in less than 20 minutes - With Akka and Java 8J On The Beach
 
Docebo: history of a journey from legacy to serverless
Docebo: history of a journey from legacy to serverlessDocebo: history of a journey from legacy to serverless
Docebo: history of a journey from legacy to serverlessAWS User Group Italy
 
Pragmatic Approach to Microservices and Cell-based Architecture
Pragmatic Approach to Microservices and Cell-based Architecture Pragmatic Approach to Microservices and Cell-based Architecture
Pragmatic Approach to Microservices and Cell-based Architecture Andrew Blades
 
Eda on the azure services platform
Eda on the azure services platformEda on the azure services platform
Eda on the azure services platformYves Goeleven
 
How to Overcome Data Challenges When Refactoring Monoliths to Microservices
How to Overcome Data Challenges When Refactoring Monoliths to MicroservicesHow to Overcome Data Challenges When Refactoring Monoliths to Microservices
How to Overcome Data Challenges When Refactoring Monoliths to MicroservicesVMware Tanzu
 
Why Your Digital Transformation Strategy Demands Middleware Modernization
Why Your Digital Transformation Strategy Demands Middleware ModernizationWhy Your Digital Transformation Strategy Demands Middleware Modernization
Why Your Digital Transformation Strategy Demands Middleware ModernizationVMware Tanzu
 
JavaScript for Enterprise Applications
JavaScript for Enterprise ApplicationsJavaScript for Enterprise Applications
JavaScript for Enterprise ApplicationsPiyush Katariya
 
External should that be a microservice
External should that be a microserviceExternal should that be a microservice
External should that be a microserviceRohit Kelapure
 
2018 Pivotal DevOps Day_Pivotal 소개 및 세션 아젠다 소개
2018 Pivotal DevOps Day_Pivotal 소개 및 세션 아젠다 소개2018 Pivotal DevOps Day_Pivotal 소개 및 세션 아젠다 소개
2018 Pivotal DevOps Day_Pivotal 소개 및 세션 아젠다 소개VMware Tanzu Korea
 
2018 Pivotal DevOps Day_마이크로서비스 전환 방법론과 사례
2018 Pivotal DevOps Day_마이크로서비스 전환 방법론과 사례2018 Pivotal DevOps Day_마이크로서비스 전환 방법론과 사례
2018 Pivotal DevOps Day_마이크로서비스 전환 방법론과 사례VMware Tanzu Korea
 
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
 
Buzzwords: Microservices, containers and serverless - real life applications ...
Buzzwords: Microservices, containers and serverless - real life applications ...Buzzwords: Microservices, containers and serverless - real life applications ...
Buzzwords: Microservices, containers and serverless - real life applications ...drnugent
 
Distributed Data Processing for Real-time Applications
Distributed Data Processing for Real-time ApplicationsDistributed Data Processing for Real-time Applications
Distributed Data Processing for Real-time ApplicationsScyllaDB
 
Sukumar Nayak-Agile-DevOps-Cloud Management
Sukumar Nayak-Agile-DevOps-Cloud ManagementSukumar Nayak-Agile-DevOps-Cloud Management
Sukumar Nayak-Agile-DevOps-Cloud ManagementSukumar Nayak
 
Kochi mulesoft meetup 02
Kochi mulesoft meetup 02Kochi mulesoft meetup 02
Kochi mulesoft meetup 02sumitahuja94
 
infrastructure management at digital ages
infrastructure management at digital agesinfrastructure management at digital ages
infrastructure management at digital agesBernard Paques
 
CQRS + Event Sourcing
CQRS + Event SourcingCQRS + Event Sourcing
CQRS + Event SourcingMike Bild
 
Automating Applications with Habitat - Sydney Cloud Native Meetup
Automating Applications with Habitat - Sydney Cloud Native MeetupAutomating Applications with Habitat - Sydney Cloud Native Meetup
Automating Applications with Habitat - Sydney Cloud Native MeetupMatt Ray
 

Similar a Deconstructing Monoliths with Domain Driven Design (20)

Event Sourcing in less than 20 minutes - With Akka and Java 8
Event Sourcing in less than 20 minutes - With Akka and Java 8Event Sourcing in less than 20 minutes - With Akka and Java 8
Event Sourcing in less than 20 minutes - With Akka and Java 8
 
Docebo: history of a journey from legacy to serverless
Docebo: history of a journey from legacy to serverlessDocebo: history of a journey from legacy to serverless
Docebo: history of a journey from legacy to serverless
 
Pragmatic Approach to Microservices and Cell-based Architecture
Pragmatic Approach to Microservices and Cell-based Architecture Pragmatic Approach to Microservices and Cell-based Architecture
Pragmatic Approach to Microservices and Cell-based Architecture
 
Eda on the azure services platform
Eda on the azure services platformEda on the azure services platform
Eda on the azure services platform
 
How to Overcome Data Challenges When Refactoring Monoliths to Microservices
How to Overcome Data Challenges When Refactoring Monoliths to MicroservicesHow to Overcome Data Challenges When Refactoring Monoliths to Microservices
How to Overcome Data Challenges When Refactoring Monoliths to Microservices
 
Why Your Digital Transformation Strategy Demands Middleware Modernization
Why Your Digital Transformation Strategy Demands Middleware ModernizationWhy Your Digital Transformation Strategy Demands Middleware Modernization
Why Your Digital Transformation Strategy Demands Middleware Modernization
 
JavaScript for Enterprise Applications
JavaScript for Enterprise ApplicationsJavaScript for Enterprise Applications
JavaScript for Enterprise Applications
 
External should that be a microservice
External should that be a microserviceExternal should that be a microservice
External should that be a microservice
 
Md Zahir Uddin
Md Zahir UddinMd Zahir Uddin
Md Zahir Uddin
 
2018 Pivotal DevOps Day_Pivotal 소개 및 세션 아젠다 소개
2018 Pivotal DevOps Day_Pivotal 소개 및 세션 아젠다 소개2018 Pivotal DevOps Day_Pivotal 소개 및 세션 아젠다 소개
2018 Pivotal DevOps Day_Pivotal 소개 및 세션 아젠다 소개
 
2018 Pivotal DevOps Day_마이크로서비스 전환 방법론과 사례
2018 Pivotal DevOps Day_마이크로서비스 전환 방법론과 사례2018 Pivotal DevOps Day_마이크로서비스 전환 방법론과 사례
2018 Pivotal DevOps Day_마이크로서비스 전환 방법론과 사례
 
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
 
Buzzwords: Microservices, containers and serverless - real life applications ...
Buzzwords: Microservices, containers and serverless - real life applications ...Buzzwords: Microservices, containers and serverless - real life applications ...
Buzzwords: Microservices, containers and serverless - real life applications ...
 
Distributed Data Processing for Real-time Applications
Distributed Data Processing for Real-time ApplicationsDistributed Data Processing for Real-time Applications
Distributed Data Processing for Real-time Applications
 
Sukumar Nayak-Agile-DevOps-Cloud Management
Sukumar Nayak-Agile-DevOps-Cloud ManagementSukumar Nayak-Agile-DevOps-Cloud Management
Sukumar Nayak-Agile-DevOps-Cloud Management
 
Kochi mulesoft meetup 02
Kochi mulesoft meetup 02Kochi mulesoft meetup 02
Kochi mulesoft meetup 02
 
infrastructure management at digital ages
infrastructure management at digital agesinfrastructure management at digital ages
infrastructure management at digital ages
 
Cloud to Edge
Cloud to EdgeCloud to Edge
Cloud to Edge
 
CQRS + Event Sourcing
CQRS + Event SourcingCQRS + Event Sourcing
CQRS + Event Sourcing
 
Automating Applications with Habitat - Sydney Cloud Native Meetup
Automating Applications with Habitat - Sydney Cloud Native MeetupAutomating Applications with Habitat - Sydney Cloud Native Meetup
Automating Applications with Habitat - Sydney Cloud Native Meetup
 

Más de VMware Tanzu

What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItVMware Tanzu
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023VMware Tanzu
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleVMware Tanzu
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023VMware Tanzu
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductVMware Tanzu
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready AppsVMware Tanzu
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And BeyondVMware Tanzu
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfVMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023VMware Tanzu
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptxVMware Tanzu
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchVMware Tanzu
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishVMware Tanzu
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVMware Tanzu
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - FrenchVMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023VMware Tanzu
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootVMware Tanzu
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerVMware Tanzu
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeVMware Tanzu
 
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsSpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsVMware Tanzu
 

Más de VMware Tanzu (20)

What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About It
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - French
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
 
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsSpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
 

Último

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Último (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Deconstructing Monoliths with Domain Driven Design

  • 1. © Copyright 2017 Pivotal Software, Inc. All rights Reserved. Version 1.0 Deconstructing Monoliths with Domain Driven Design Rohit Kelapure - Pivotal David Turanski - Pivotal Rohit Sood - Liberty Mutual Justin Stone - Liberty Mutual
  • 2. Part 1 DDD, CQRS, EVENT SOURCING © Copyright 2017 Pivotal Software, Inc. All rights Reserved.
  • 3. Cover w/ Image Domain-Driven Design “...the real breakthrough of object design comes when the code expresses the concepts of a model.” “Anyone responsible for changing code must learn to express a model through the code. Every developer must be involved in some level of discussion about the model and have contact with domain experts.” - Eric Evans, Domain-Driven Design
  • 4. Domain Driven Design “In the end the code is the model and the model is the code.” - Vaughn Vernon , Domain-Driven Design Distilled As opposed to: 1. Business Overview 1.1 Requirement This interface is used to send Sched CGO messages from SHIP-PRO to ODS. SHIP-PRO will send the SyncSCHD_CGO BO to MBS and MBS will push the data to ODS as SCHD_CGO_WRAPPER BO. This interface will also be added to the AMS view for monitoring.
  • 5. Entities, Value Objects, and Services Entity - something with continuity and identity (Customer) Value Object - an attribute that describes the state of something else (Address) Service - Actions or operations that don’t belong in an Entity or VO ● Domain service - Funds transfer ● Technical service - Notification
  • 6. Cover w/ Image Aggregates AGGREGATES mark off the scope within which invariants have to be maintained at every stage of the lifecycle ● Transactional Boundary ● Public access only via the Aggregate Root
  • 7. Bounded Context “Generally speaking, there is a correspondence of one team per BOUNDED CONTEXT. One team can maintain multiple BOUNDED CONTEXTS, but it is hard … for multiple teams to work on one together.” - Evans
  • 13. CQRS
  • 16. Resources SpringOne Platform Sessions ● Reactive DDD, Vaughn Vernon - Tue ● State or Events, J. Pillmon, K. Bestani - Tue ● Refactoring to System of Systems, O. Gierke - Next up Event Sourcing Frameworks ● Axon Framework - http://www.axonframework.org/ ● Eventuate - http://eventuate.io/ Event Store ● https://eventstore.org/ Further Reading ● Domain-Driven Design, Eric Evans ● Implementing Domain-Driven Design, Vaughn Vernon ● Domain-Driven Design Distilled, Vaughn Vernon ● Building Microservices, Sam Newman ● https://dturanski.wordpress.com/2017/03/26/ spring-cloud-stream-for-event-driven-archite ctures/ , David Turanski
  • 18. Break a Complex Domain with Event Storming
  • 19. ES - Enables Cross Perspective Communication Situational Awareness Making sense of a complex domain Clarity Identify the Right Constraint
  • 20. Business Domain Model derived from Business Events
  • 21. Deconstructing a Monolith ● Define Objectives and Key Results (OKRs) ● Event Storm the app and identify the core domain and key constraints ● Pick horizontal sequences of events in the core domain identified during ES ● Use C4 diagrams to identify a vertical slice of components that realize the flow of events ● Identify a decomposition strategy ● Perform SNAP analysis on each of the components of the vertical slice ● Generate a backlog of user stories and tie it back to the OKRs ● User story mapping to map user stories to MVPs
  • 22. Selection of a Vertical Slice : Pick a Core Domain
  • 25. 1M LOC Insurance Domain Monolith
  • 26. What is your Decomposition Strategy ? Bounded Contexts Value Streams Failure Domains Anti-Corruption Layers Single Responsibility Principle Kitchen Sink
  • 27. Event Thinking Reduce temporal coupling ● Instrument Monolith with Events ● Break Things apart with events ● Use domain language for events ● Build things on the outside ● Strangler Pattern ● Minimally Invasive ● Cannot rely on ordering of messages or zero message loss Strive for autonomy with messaging ● Messaging schemas can introduce coupling ● Sagas handle Eventual Consistency ● What operations are idempotent ? ● Handle duplicate messages with Outbox pattern ● Messaging schemas can introduce coupling ● Change in mindset ● Avoid Kafka as an ESB anti-pattern ● Spring Application Events or CDI Events
  • 28. Many Meanings of Event Driven Architecture (EDA) Event Carried State Transfer ● Update clients in a way that they don't need to contact the source system ● Receiver has to maintaining all the state ● Decoupling ● Reduced load on supplier ● Replicated Data ● Eventual Consistency Event Sourcing ● Every state change of the system is recorded as an event ● Event store becomes the source of truth, and the system state is derived from it ● Audit, Debugging, Historic State, Alternative State, Memory Image ● Unfamiliar, External Systems, Event Schema, Identifiers, Asynchrony, Versioning Event Notification ● Send event messages to notify other systems of a change in its domain ● Event carries ID and link back to the sender for more info ● Decouples sender from receiver ● No Statement of overall behavior
  • 29. How To Deal With 2PC XA Global Transactions in the Cloud Pat Helland http://queue.acm.org/detail.cfm?id= 3025012 Life Beyond Distributed Transactions In a system that cannot count on distributed transactions, the management of uncertainty must be implemented in the business logic. The uncertainty of the outcome is held in the business semantics rather than in the record lock. This is simply workflow. We can’t use distributed transaction so we need to use workflow.
  • 30. Demons Lie Here Complex Event Flows
  • 31. Should you Event Source or Not ? Should I invest in the stock market now ? Every team is at liberty to select their own patterns Is there tooling available to guide you Do you have developers with the aptitude and ability Does data need to be persisted temporally? Is an audit log necessary ? What is the overall system architecture ?
  • 32. Event Driven Architecture Challenges Versioning in an Event Sourced System Greg Young https://leanpub.com/esversioning
  • 34. Lessons Learned From Real World Modernizations Too many fine bounded contexts. Correlation strategy and Lock Strategy get complicated Complex work flows require Sagas & Process Managers Microservices - one per aggregate ? DIY Event Sourcing systems are hard. Too much time spent in toil Leverage Consumer driven Contracts to establish clear schemas across Bounded Contexts for messages Chose the right style of Event Driven Architecture Delay making frameworks Powerpoint is dead long live the Stickies Spring is missing an event sourcing and event persistence framework Event Sourcing is hard without a supporting event persistence framework or library Pick a framework based on the guidance on the next slide before beginning Challenge preconceived architectural decisions Set goals with measurable metrics. Be wary of the Hourglass effect
  • 35. Part 3 Real World Experiences © Copyright 2017 Pivotal Software, Inc. All rights Reserved.
  • 36. Cover w/ Image Our Experiences with... ■ Technical Debt ■ Monoliths ■ Entropy ■ Event Storming ■ Breaking Down Monoliths for real ■ MSA w/DDD to API-First ■ 12 factors & beyond
  • 37. Technical Debt is Invisible but Real Source: https://philippe.kruchten.com/
  • 38. Conway’s Law holds true Source: https://martinfowler.com/articles/microservices.html#CharacteristicsOfAMicroserviceArchitecture “Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure.” - Conway’s Law Source: http://melconway.com/Home/Conways_Law.html
  • 39. Entropy always tends to increase within monoliths Source: http://facstaff.gpc.edu/~mkim/C1211&1212Lec/C1212_Lecture.htm
  • 40. Microservices “In short, the micro-service architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies.” -Fowler, Lewis et al
  • 41.
  • 42.
  • 45. Before After * * one bc agg
  • 46.
  • 47. Weeks of coding can save you hours of designing.
  • 48.
  • 50. DDD In Practice Aggregate (with root) Aggregate (with root) Context Map
  • 51.
  • 52. 1. Design API Spec 2. Collaborate & Refactor
  • 53. 3. Generate Server (starter)
  • 55. Experiences & Observations Technical Debt is real but invisible. Monoliths can lead to technical debt. System Entropy always wins. Conway’s Law is true. Microservices is not just about small services. 12 factors are important for CNA. Go beyond the 12 factors - adopt API-First. Breaking down monoliths with DDD. Event Storming is a good Kickstarter to DDD. Domain driven design should help lead to APIs first. CQRS is a powerful pattern. Event Sourcing is a difficult pattern - not for the faint of heart. New technologies can bring new unknowns. Pair programming worked very well.
  • 56. Conclusions ● EDA is not the same as Event Sourcing ● Dealing with consistency is HARD. ● How do you recover ? ● Hours of design can save weeks of coding ● Pick your core architectural style ● Prefer the evolutionary approach to architecture ● Address the people challenges before the technical ones ● Event Storming can help you identify your core domain