SlideShare a Scribd company logo
SOFTWARE ARCHITECTURE
MEETUP
DECEMBER 2018
Muhammad Ali
SOFTWARE ARCHITECT
VENTUREDIVE
Practicing DDD & CQRS
Agenda
• We’ll try to analyze a problem and will try to solve this with DDD
• We’ll develop our Ubiquitous language
• Develop our model i.e. reflection of our Ubiquitous language
• Will find Entities, Value Objects & Aggregates
• Will try to break it down into commands, events and state
Architectural Katas
“How do we get great designers? Great designers design, of course.”
Fred Brooks
So how are we supposed to get great architects, if they only get the
chance to architect fewer than a half-dozen times in their career?
Ted Neward
Architectural Katas
• Kata is a detailed choreographed pattern of movement made to be
practice alone or in groups.
• Architects needs chance to practice, similar to how programmer
needs chance to practice
• Architectural Katas are architectural problems that needs to be run in
a group of 2-3 people.
• There are usually 4-10 groups
• Katas are generally run by a moderator
Architectural Katas
• Today we are going to pick one of the kata and try it out here in this
session.
• You can find more katas here https://archkatas.herokuapp.com
• We’ll run a full architectural katas session in one of our upcoming
meetup
Sysop Squad
• An electronics giant needs a new trouble-ticket system for their
customer-facing IT consultants (the Sysop Squad) in their stores
nationwide
• Requirements: trouble tickets can be entered by either call-center
receptionists, store staff or customers online; tickets route to the
appropriate consultant based on location, availability and skill;
customers enter consultant evaluation after service; consultant tracks
work performed in customer record(s) for future reference
• Users: thousands of customers, hundreds of consultants, hundreds of
store staff
Sysop Squad
• An electronics giant needs a new trouble-ticket system for their
customer-facing IT consultants (the Sysop Squad) in their stores
nationwide
• Requirements: Trouble Tickets can be entered by either call-center
Receptionists, Store Staff or Customers online; tickets route to the
appropriate Consultant based on location, availability and skill;
customers enter consultant evaluation after service; consultant tracks
work performed in customer record(s) for future reference
• Users: thousands of customers, hundreds of consultants, hundreds of
store staff
Sysop Squad
• An electronics giant needs a new trouble-ticket system for their
customer-facing IT consultants (the Sysop Squad) in their stores
nationwide
• Requirements: trouble tickets can be entered by either call-center
receptionists, store staff or customers online; tickets route to the
appropriate consultant based on location, availability and skill;
customers enter consultant evaluation after service; consultant
tracks work performed in customer record(s) for future reference
• Users: thousands of customers, hundreds of consultants, hundreds of
store staff
Identifying Entities & Value Objects
ENTITIES
• Ticket
• Receptionist
• Store Staff
• Customer
• Consultant
VALUE OBJECTS
• Consultant Evaluation
• Work Log
Attributes
• What about other attributes? Like
• Location awareness
• Skills
• Availability
Identifying Actions
• Add Ticket
• Routing
• Service
• Consultant Evaluation
• Track Work
Event Storming
Event Storming
“All models are wrong; some models are useful”
George E. P. Box
CQRS
• Aren’t we missing something?
• If you see the model that we discussed, it only talks about commands
& events
• Once we have events, we can have an event listener to create state
• State is just a snapshot, it can be saved in Redis , CQEngine or SQL
store.
• On top of that we can have services that can be used to read the state
and respond to queries.
Questions?

More Related Content

Similar to Practicing DDD & CQRS

CP Summary of Computer People
CP Summary of Computer PeopleCP Summary of Computer People
CP Summary of Computer People
Syed Shah
 
BizTransSysTech_TalentOut_v1.0
BizTransSysTech_TalentOut_v1.0BizTransSysTech_TalentOut_v1.0
BizTransSysTech_TalentOut_v1.0
BizTrans SysTech
 
Sullivan and Cogliano Capabilties 1.22.16
Sullivan and Cogliano Capabilties 1.22.16Sullivan and Cogliano Capabilties 1.22.16
Sullivan and Cogliano Capabilties 1.22.16
Herb Cogliano
 
Building Business with Cincom Smalltalk
Building Business with Cincom SmalltalkBuilding Business with Cincom Smalltalk
Building Business with Cincom Smalltalk
ESUG
 
Mariner innovations practice of architecture
Mariner innovations   practice of architectureMariner innovations   practice of architecture
Mariner innovations practice of architecture
Carl Ozkaynak
 
BizTransSysTech_CareerEd_v1.0
BizTransSysTech_CareerEd_v1.0BizTransSysTech_CareerEd_v1.0
BizTransSysTech_CareerEd_v1.0
BizTrans SysTech
 
Technology Planning for River Groups
Technology Planning for River GroupsTechnology Planning for River Groups
Technology Planning for River Groups
Sean Larkin
 

Similar to Practicing DDD & CQRS (20)

CP Summary of Computer People
CP Summary of Computer PeopleCP Summary of Computer People
CP Summary of Computer People
 
BizTransSysTech_TalentOut_v1.0
BizTransSysTech_TalentOut_v1.0BizTransSysTech_TalentOut_v1.0
BizTransSysTech_TalentOut_v1.0
 
Sullivan and Cogliano Capabilties 1.22.16
Sullivan and Cogliano Capabilties 1.22.16Sullivan and Cogliano Capabilties 1.22.16
Sullivan and Cogliano Capabilties 1.22.16
 
Flexible Product Development Process
Flexible Product Development ProcessFlexible Product Development Process
Flexible Product Development Process
 
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
 
Service frameworks and toolkits: Making design artefacts actionable
Service frameworks and toolkits: Making design artefacts actionableService frameworks and toolkits: Making design artefacts actionable
Service frameworks and toolkits: Making design artefacts actionable
 
Discovery Phase: Planing Your Web Project
Discovery Phase: Planing Your Web ProjectDiscovery Phase: Planing Your Web Project
Discovery Phase: Planing Your Web Project
 
Sap abap course content
Sap abap course contentSap abap course content
Sap abap course content
 
Sap abap course
Sap abap course Sap abap course
Sap abap course
 
Building Business with Cincom Smalltalk
Building Business with Cincom SmalltalkBuilding Business with Cincom Smalltalk
Building Business with Cincom Smalltalk
 
Mariner innovations practice of architecture
Mariner innovations   practice of architectureMariner innovations   practice of architecture
Mariner innovations practice of architecture
 
BizTransSysTech_CareerEd_v1.0
BizTransSysTech_CareerEd_v1.0BizTransSysTech_CareerEd_v1.0
BizTransSysTech_CareerEd_v1.0
 
How to do agile roadmapping
How to do agile roadmappingHow to do agile roadmapping
How to do agile roadmapping
 
session 3D_writing winning proposals.ppt
session 3D_writing winning proposals.pptsession 3D_writing winning proposals.ppt
session 3D_writing winning proposals.ppt
 
Scoping and Estimating WordPress Projects as an Agency
Scoping and Estimating WordPress Projects as an AgencyScoping and Estimating WordPress Projects as an Agency
Scoping and Estimating WordPress Projects as an Agency
 
Scoping and Estimating WordPress Projects as an Agency
Scoping and Estimating WordPress Projects as an AgencyScoping and Estimating WordPress Projects as an Agency
Scoping and Estimating WordPress Projects as an Agency
 
Technology Planning for River Groups
Technology Planning for River GroupsTechnology Planning for River Groups
Technology Planning for River Groups
 
Why We Need Architects (and Architecture) on Agile Projects
Why We Need Architects (and Architecture) on Agile ProjectsWhy We Need Architects (and Architecture) on Agile Projects
Why We Need Architects (and Architecture) on Agile Projects
 
Dashlane Mission Teams
Dashlane Mission TeamsDashlane Mission Teams
Dashlane Mission Teams
 
Project to Product roadmap
Project to Product roadmapProject to Product roadmap
Project to Product roadmap
 

More from Muhammad Ali

More from Muhammad Ali (9)

Communication Mechanisms, Past, Present & Future
Communication Mechanisms, Past, Present & FutureCommunication Mechanisms, Past, Present & Future
Communication Mechanisms, Past, Present & Future
 
WebRTC Introduction & Basics
WebRTC Introduction & BasicsWebRTC Introduction & Basics
WebRTC Introduction & Basics
 
Introduction to Architectural Katas
Introduction to Architectural KatasIntroduction to Architectural Katas
Introduction to Architectural Katas
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
DBMS Modeling & Optimization
DBMS Modeling & OptimizationDBMS Modeling & Optimization
DBMS Modeling & Optimization
 
Android architectural components
Android architectural componentsAndroid architectural components
Android architectural components
 
Architectural katas
Architectural katasArchitectural katas
Architectural katas
 
Software Architecture Meetup introduction
Software Architecture Meetup introductionSoftware Architecture Meetup introduction
Software Architecture Meetup introduction
 
Introduction to Domain driven design
Introduction to Domain driven designIntroduction to Domain driven design
Introduction to Domain driven design
 

Recently uploaded

AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
Alluxio, Inc.
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
mbmh111980
 

Recently uploaded (20)

Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
iGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by SkilrockiGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by Skilrock
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
 

Practicing DDD & CQRS

  • 3. Agenda • We’ll try to analyze a problem and will try to solve this with DDD • We’ll develop our Ubiquitous language • Develop our model i.e. reflection of our Ubiquitous language • Will find Entities, Value Objects & Aggregates • Will try to break it down into commands, events and state
  • 4. Architectural Katas “How do we get great designers? Great designers design, of course.” Fred Brooks So how are we supposed to get great architects, if they only get the chance to architect fewer than a half-dozen times in their career? Ted Neward
  • 5. Architectural Katas • Kata is a detailed choreographed pattern of movement made to be practice alone or in groups. • Architects needs chance to practice, similar to how programmer needs chance to practice • Architectural Katas are architectural problems that needs to be run in a group of 2-3 people. • There are usually 4-10 groups • Katas are generally run by a moderator
  • 6. Architectural Katas • Today we are going to pick one of the kata and try it out here in this session. • You can find more katas here https://archkatas.herokuapp.com • We’ll run a full architectural katas session in one of our upcoming meetup
  • 7. Sysop Squad • An electronics giant needs a new trouble-ticket system for their customer-facing IT consultants (the Sysop Squad) in their stores nationwide • Requirements: trouble tickets can be entered by either call-center receptionists, store staff or customers online; tickets route to the appropriate consultant based on location, availability and skill; customers enter consultant evaluation after service; consultant tracks work performed in customer record(s) for future reference • Users: thousands of customers, hundreds of consultants, hundreds of store staff
  • 8. Sysop Squad • An electronics giant needs a new trouble-ticket system for their customer-facing IT consultants (the Sysop Squad) in their stores nationwide • Requirements: Trouble Tickets can be entered by either call-center Receptionists, Store Staff or Customers online; tickets route to the appropriate Consultant based on location, availability and skill; customers enter consultant evaluation after service; consultant tracks work performed in customer record(s) for future reference • Users: thousands of customers, hundreds of consultants, hundreds of store staff
  • 9. Sysop Squad • An electronics giant needs a new trouble-ticket system for their customer-facing IT consultants (the Sysop Squad) in their stores nationwide • Requirements: trouble tickets can be entered by either call-center receptionists, store staff or customers online; tickets route to the appropriate consultant based on location, availability and skill; customers enter consultant evaluation after service; consultant tracks work performed in customer record(s) for future reference • Users: thousands of customers, hundreds of consultants, hundreds of store staff
  • 10. Identifying Entities & Value Objects ENTITIES • Ticket • Receptionist • Store Staff • Customer • Consultant VALUE OBJECTS • Consultant Evaluation • Work Log
  • 11. Attributes • What about other attributes? Like • Location awareness • Skills • Availability
  • 12. Identifying Actions • Add Ticket • Routing • Service • Consultant Evaluation • Track Work
  • 15. “All models are wrong; some models are useful” George E. P. Box
  • 16. CQRS • Aren’t we missing something? • If you see the model that we discussed, it only talks about commands & events • Once we have events, we can have an event listener to create state • State is just a snapshot, it can be saved in Redis , CQEngine or SQL store. • On top of that we can have services that can be used to read the state and respond to queries.