SlideShare una empresa de Scribd logo
1 de 21
High-Performance Distributed Systems withCommand/Query Responsibility Segregation Jonathan Oliver Utah Code Camp 2010
Think Differentlier Best practices != best thinking Blind vs intentional application Question everything How much does it cost?
Domain Muddling and Modeling What was the original intent? Screen-based aggregate roots? Show domain state? Validation? Get/set, go!
Distributed Systems Architecture
Optimistic and Pessimistic Stalemate Collaborative users Current state? Get data Get data Stale data Update data
Layeringitis Why go through all the layers?
Tiers for Fears Why transform across the tiers? DTOs: more code, tests, maintenance, $$$ Pre-transformed?
CQRS: Gotta Keep ‘Em Separated SOLID, Architectural “S”
Query Query Quite “Contrery” Showing data Query-only storage KISS, YAGNI If it’s stale anyway List of Customers --------------------- --------------------- --------------------- (from 10 minutes ago)
All Your Database Are Belong To Us Screen-based views UnDRY your data—data duplication “Persistent View Model” Storage/database requirements Scaling out SELECT * FROM Carts WHERE ID = 456;
Queries: Summary Stale data “Persistent View Model” For queries only One table per view Updated by events Data duplication is good No table relationships No foreign keys
Command & Conquer Say what? What is a command? Intention revealing SaveInvoicevsPlaceOrder SaveCustomervsMakeCustomerDelinquent
UI Design Excel-based UIs Task-based UIs
This Time It’s Gonna Be Different Can we fully trust user decisions?
Commands and Validation Validation Is the input potentially good? Ranges, lengths, etc Fail fast Leverage persistent view model Unique emails? Decides if a command should be sent Enables high probability of success
Business Rules Should we do this? Based upon the current system state
Commands: Summary Expresses intent Reply is: “Thank you, we’ve received your input.” Asynchronous Amazon Netflix
Domain Models, Take 2 Commands already validated No relationships for reading Only persists what it needs Behavior: Give discounts to high-volume customers
The Big Picture Image courtesy Udi Dahan
The Big Picture: Summary Simple 2-tier queries Commands express intent Task-based UI captures intent Smaller, more focused pieces
Questions?

Más contenido relacionado

Destacado

Windowing in Apache Apex
Windowing in Apache ApexWindowing in Apache Apex
Windowing in Apache ApexApache Apex
 
Towards True Elasticity of Spark-(Michael Le and Min Li, IBM)
Towards True Elasticity of Spark-(Michael Le and Min Li, IBM)Towards True Elasticity of Spark-(Michael Le and Min Li, IBM)
Towards True Elasticity of Spark-(Michael Le and Min Li, IBM)Spark Summit
 
The 5 People in your Organization that grow Legacy Code
The 5 People in your Organization that grow Legacy CodeThe 5 People in your Organization that grow Legacy Code
The 5 People in your Organization that grow Legacy CodeRoberto Cortez
 
Hadoop basic commands
Hadoop basic commandsHadoop basic commands
Hadoop basic commandsbispsolutions
 
Introduction to Apache Apex and writing a big data streaming application
Introduction to Apache Apex and writing a big data streaming application  Introduction to Apache Apex and writing a big data streaming application
Introduction to Apache Apex and writing a big data streaming application Apache Apex
 
Build your shiny new pc, with Pangoly
Build your shiny new pc, with PangolyBuild your shiny new pc, with Pangoly
Build your shiny new pc, with PangolyPangoly
 
Hadoop Internals (2.3.0 or later)
Hadoop Internals (2.3.0 or later)Hadoop Internals (2.3.0 or later)
Hadoop Internals (2.3.0 or later)Emilio Coppa
 
Hadoop Interacting with HDFS
Hadoop Interacting with HDFSHadoop Interacting with HDFS
Hadoop Interacting with HDFSApache Apex
 
Introduction to UNIX Command-Lines with examples
Introduction to UNIX Command-Lines with examplesIntroduction to UNIX Command-Lines with examples
Introduction to UNIX Command-Lines with examplesNoé Fernández-Pozo
 
Introduction to Real-Time Data Processing
Introduction to Real-Time Data ProcessingIntroduction to Real-Time Data Processing
Introduction to Real-Time Data ProcessingApache Apex
 
Apache Big Data EU 2016: Building Streaming Applications with Apache Apex
Apache Big Data EU 2016: Building Streaming Applications with Apache ApexApache Big Data EU 2016: Building Streaming Applications with Apache Apex
Apache Big Data EU 2016: Building Streaming Applications with Apache ApexApache Apex
 
Apache Spark in Depth: Core Concepts, Architecture & Internals
Apache Spark in Depth: Core Concepts, Architecture & InternalsApache Spark in Depth: Core Concepts, Architecture & Internals
Apache Spark in Depth: Core Concepts, Architecture & InternalsAnton Kirillov
 
Intro to Apache Apex (next gen Hadoop) & comparison to Spark Streaming
Intro to Apache Apex (next gen Hadoop) & comparison to Spark StreamingIntro to Apache Apex (next gen Hadoop) & comparison to Spark Streaming
Intro to Apache Apex (next gen Hadoop) & comparison to Spark StreamingApache Apex
 
Intro to Apache Apex @ Women in Big Data
Intro to Apache Apex @ Women in Big DataIntro to Apache Apex @ Women in Big Data
Intro to Apache Apex @ Women in Big DataApache Apex
 
Capital One's Next Generation Decision in less than 2 ms
Capital One's Next Generation Decision in less than 2 msCapital One's Next Generation Decision in less than 2 ms
Capital One's Next Generation Decision in less than 2 msApache Apex
 
Deep Dive into Apache Apex App Development
Deep Dive into Apache Apex App DevelopmentDeep Dive into Apache Apex App Development
Deep Dive into Apache Apex App DevelopmentApache Apex
 
GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)
GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)
GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)Apache Apex
 

Destacado (19)

Windowing in Apache Apex
Windowing in Apache ApexWindowing in Apache Apex
Windowing in Apache Apex
 
Towards True Elasticity of Spark-(Michael Le and Min Li, IBM)
Towards True Elasticity of Spark-(Michael Le and Min Li, IBM)Towards True Elasticity of Spark-(Michael Le and Min Li, IBM)
Towards True Elasticity of Spark-(Michael Le and Min Li, IBM)
 
The 5 People in your Organization that grow Legacy Code
The 5 People in your Organization that grow Legacy CodeThe 5 People in your Organization that grow Legacy Code
The 5 People in your Organization that grow Legacy Code
 
Hadoop File System Shell Commands,
Hadoop File System Shell Commands,Hadoop File System Shell Commands,
Hadoop File System Shell Commands,
 
Hadoop basic commands
Hadoop basic commandsHadoop basic commands
Hadoop basic commands
 
Introduction to Apache Apex and writing a big data streaming application
Introduction to Apache Apex and writing a big data streaming application  Introduction to Apache Apex and writing a big data streaming application
Introduction to Apache Apex and writing a big data streaming application
 
Build your shiny new pc, with Pangoly
Build your shiny new pc, with PangolyBuild your shiny new pc, with Pangoly
Build your shiny new pc, with Pangoly
 
HDFS Internals
HDFS InternalsHDFS Internals
HDFS Internals
 
Hadoop Internals (2.3.0 or later)
Hadoop Internals (2.3.0 or later)Hadoop Internals (2.3.0 or later)
Hadoop Internals (2.3.0 or later)
 
Hadoop Interacting with HDFS
Hadoop Interacting with HDFSHadoop Interacting with HDFS
Hadoop Interacting with HDFS
 
Introduction to UNIX Command-Lines with examples
Introduction to UNIX Command-Lines with examplesIntroduction to UNIX Command-Lines with examples
Introduction to UNIX Command-Lines with examples
 
Introduction to Real-Time Data Processing
Introduction to Real-Time Data ProcessingIntroduction to Real-Time Data Processing
Introduction to Real-Time Data Processing
 
Apache Big Data EU 2016: Building Streaming Applications with Apache Apex
Apache Big Data EU 2016: Building Streaming Applications with Apache ApexApache Big Data EU 2016: Building Streaming Applications with Apache Apex
Apache Big Data EU 2016: Building Streaming Applications with Apache Apex
 
Apache Spark in Depth: Core Concepts, Architecture & Internals
Apache Spark in Depth: Core Concepts, Architecture & InternalsApache Spark in Depth: Core Concepts, Architecture & Internals
Apache Spark in Depth: Core Concepts, Architecture & Internals
 
Intro to Apache Apex (next gen Hadoop) & comparison to Spark Streaming
Intro to Apache Apex (next gen Hadoop) & comparison to Spark StreamingIntro to Apache Apex (next gen Hadoop) & comparison to Spark Streaming
Intro to Apache Apex (next gen Hadoop) & comparison to Spark Streaming
 
Intro to Apache Apex @ Women in Big Data
Intro to Apache Apex @ Women in Big DataIntro to Apache Apex @ Women in Big Data
Intro to Apache Apex @ Women in Big Data
 
Capital One's Next Generation Decision in less than 2 ms
Capital One's Next Generation Decision in less than 2 msCapital One's Next Generation Decision in less than 2 ms
Capital One's Next Generation Decision in less than 2 ms
 
Deep Dive into Apache Apex App Development
Deep Dive into Apache Apex App DevelopmentDeep Dive into Apache Apex App Development
Deep Dive into Apache Apex App Development
 
GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)
GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)
GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)
 

Similar a High Performance Distributed Systems with CQRS

How Will Going Virtual Impact Your Search Performance?
How Will Going Virtual Impact Your Search Performance?How Will Going Virtual Impact Your Search Performance?
How Will Going Virtual Impact Your Search Performance?IdeaEng
 
"Traffic Speed Control System in the Cloud using Machine Learning" by Albert ...
"Traffic Speed Control System in the Cloud using Machine Learning" by Albert ..."Traffic Speed Control System in the Cloud using Machine Learning" by Albert ...
"Traffic Speed Control System in the Cloud using Machine Learning" by Albert ...DevClub_lv
 
Mission Possible: Future of IT Support
Mission Possible: Future of IT SupportMission Possible: Future of IT Support
Mission Possible: Future of IT SupportCompTIA
 
¿Cómo modernizar una arquitectura de TI con la virtualización de datos?
¿Cómo modernizar una arquitectura de TI con la virtualización de datos?¿Cómo modernizar una arquitectura de TI con la virtualización de datos?
¿Cómo modernizar una arquitectura de TI con la virtualización de datos?Denodo
 
Data Mining with SQL Server 2008
Data Mining with SQL Server 2008Data Mining with SQL Server 2008
Data Mining with SQL Server 2008Peter Gfader
 
Monomi: Practical Analytical Query Processing over Encrypted Data
Monomi: Practical Analytical Query Processing over Encrypted DataMonomi: Practical Analytical Query Processing over Encrypted Data
Monomi: Practical Analytical Query Processing over Encrypted DataShurenBi1
 
Develop & Deploy cloud-native apps as resilient Microservices Architectures
Develop & Deploy cloud-native apps as resilient Microservices ArchitecturesDevelop & Deploy cloud-native apps as resilient Microservices Architectures
Develop & Deploy cloud-native apps as resilient Microservices ArchitecturesRed Hat Developers
 
BitYota Data Warehouse Podcast
BitYota Data Warehouse PodcastBitYota Data Warehouse Podcast
BitYota Data Warehouse Podcastinside-BigData.com
 
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...Bill Wilder
 
HyperconvergedFantasyAnalytics
HyperconvergedFantasyAnalyticsHyperconvergedFantasyAnalytics
HyperconvergedFantasyAnalyticsJerry Jermann
 
Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing ...
Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing ...Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing ...
Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing ...Andreas Grabner
 
Presentation_BigData_NenaMarin
Presentation_BigData_NenaMarinPresentation_BigData_NenaMarin
Presentation_BigData_NenaMarinn5712036
 
The Yin and Yang of Software
The Yin and Yang of SoftwareThe Yin and Yang of Software
The Yin and Yang of Softwareelliando dias
 
AIDC NY: BODO AI Presentation - 09.19.2019
AIDC NY: BODO AI Presentation - 09.19.2019AIDC NY: BODO AI Presentation - 09.19.2019
AIDC NY: BODO AI Presentation - 09.19.2019Intel® Software
 
Scaling a Rails Application from the Bottom Up
Scaling a Rails Application from the Bottom Up Scaling a Rails Application from the Bottom Up
Scaling a Rails Application from the Bottom Up Abhishek Singh
 
Python - code quality and production monitoring
Python - code quality and production monitoringPython - code quality and production monitoring
Python - code quality and production monitoringDavid Melamed
 

Similar a High Performance Distributed Systems with CQRS (20)

How Will Going Virtual Impact Your Search Performance?
How Will Going Virtual Impact Your Search Performance?How Will Going Virtual Impact Your Search Performance?
How Will Going Virtual Impact Your Search Performance?
 
"Traffic Speed Control System in the Cloud using Machine Learning" by Albert ...
"Traffic Speed Control System in the Cloud using Machine Learning" by Albert ..."Traffic Speed Control System in the Cloud using Machine Learning" by Albert ...
"Traffic Speed Control System in the Cloud using Machine Learning" by Albert ...
 
Mission Possible: Future of IT Support
Mission Possible: Future of IT SupportMission Possible: Future of IT Support
Mission Possible: Future of IT Support
 
¿Cómo modernizar una arquitectura de TI con la virtualización de datos?
¿Cómo modernizar una arquitectura de TI con la virtualización de datos?¿Cómo modernizar una arquitectura de TI con la virtualización de datos?
¿Cómo modernizar una arquitectura de TI con la virtualización de datos?
 
1030 iordanescu
1030 iordanescu1030 iordanescu
1030 iordanescu
 
Data Access Patterns
Data Access PatternsData Access Patterns
Data Access Patterns
 
Data Mining with SQL Server 2008
Data Mining with SQL Server 2008Data Mining with SQL Server 2008
Data Mining with SQL Server 2008
 
Monomi: Practical Analytical Query Processing over Encrypted Data
Monomi: Practical Analytical Query Processing over Encrypted DataMonomi: Practical Analytical Query Processing over Encrypted Data
Monomi: Practical Analytical Query Processing over Encrypted Data
 
Develop & Deploy cloud-native apps as resilient Microservices Architectures
Develop & Deploy cloud-native apps as resilient Microservices ArchitecturesDevelop & Deploy cloud-native apps as resilient Microservices Architectures
Develop & Deploy cloud-native apps as resilient Microservices Architectures
 
BitYota Data Warehouse Podcast
BitYota Data Warehouse PodcastBitYota Data Warehouse Podcast
BitYota Data Warehouse Podcast
 
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...
 
Intro to Databases
Intro to DatabasesIntro to Databases
Intro to Databases
 
HyperconvergedFantasyAnalytics
HyperconvergedFantasyAnalyticsHyperconvergedFantasyAnalytics
HyperconvergedFantasyAnalytics
 
Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing ...
Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing ...Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing ...
Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing ...
 
Presentation_BigData_NenaMarin
Presentation_BigData_NenaMarinPresentation_BigData_NenaMarin
Presentation_BigData_NenaMarin
 
New Resume
New ResumeNew Resume
New Resume
 
The Yin and Yang of Software
The Yin and Yang of SoftwareThe Yin and Yang of Software
The Yin and Yang of Software
 
AIDC NY: BODO AI Presentation - 09.19.2019
AIDC NY: BODO AI Presentation - 09.19.2019AIDC NY: BODO AI Presentation - 09.19.2019
AIDC NY: BODO AI Presentation - 09.19.2019
 
Scaling a Rails Application from the Bottom Up
Scaling a Rails Application from the Bottom Up Scaling a Rails Application from the Bottom Up
Scaling a Rails Application from the Bottom Up
 
Python - code quality and production monitoring
Python - code quality and production monitoringPython - code quality and production monitoring
Python - code quality and production monitoring
 

High Performance Distributed Systems with CQRS

  • 1. High-Performance Distributed Systems withCommand/Query Responsibility Segregation Jonathan Oliver Utah Code Camp 2010
  • 2. Think Differentlier Best practices != best thinking Blind vs intentional application Question everything How much does it cost?
  • 3. Domain Muddling and Modeling What was the original intent? Screen-based aggregate roots? Show domain state? Validation? Get/set, go!
  • 5. Optimistic and Pessimistic Stalemate Collaborative users Current state? Get data Get data Stale data Update data
  • 6. Layeringitis Why go through all the layers?
  • 7. Tiers for Fears Why transform across the tiers? DTOs: more code, tests, maintenance, $$$ Pre-transformed?
  • 8. CQRS: Gotta Keep ‘Em Separated SOLID, Architectural “S”
  • 9. Query Query Quite “Contrery” Showing data Query-only storage KISS, YAGNI If it’s stale anyway List of Customers --------------------- --------------------- --------------------- (from 10 minutes ago)
  • 10. All Your Database Are Belong To Us Screen-based views UnDRY your data—data duplication “Persistent View Model” Storage/database requirements Scaling out SELECT * FROM Carts WHERE ID = 456;
  • 11. Queries: Summary Stale data “Persistent View Model” For queries only One table per view Updated by events Data duplication is good No table relationships No foreign keys
  • 12. Command & Conquer Say what? What is a command? Intention revealing SaveInvoicevsPlaceOrder SaveCustomervsMakeCustomerDelinquent
  • 13. UI Design Excel-based UIs Task-based UIs
  • 14. This Time It’s Gonna Be Different Can we fully trust user decisions?
  • 15. Commands and Validation Validation Is the input potentially good? Ranges, lengths, etc Fail fast Leverage persistent view model Unique emails? Decides if a command should be sent Enables high probability of success
  • 16. Business Rules Should we do this? Based upon the current system state
  • 17. Commands: Summary Expresses intent Reply is: “Thank you, we’ve received your input.” Asynchronous Amazon Netflix
  • 18. Domain Models, Take 2 Commands already validated No relationships for reading Only persists what it needs Behavior: Give discounts to high-volume customers
  • 19. The Big Picture Image courtesy Udi Dahan
  • 20. The Big Picture: Summary Simple 2-tier queries Commands express intent Task-based UI captures intent Smaller, more focused pieces