SlideShare a Scribd company logo
Enterprise Software Patterns
Josh Lane - Wintellect
Why Enterprise Patterns?
• Techniques for simple apps don’t always scale to complex ones
• CRUD
• Synchronous communication
• Unified entity definitions
• Expected lifetime and complexity of a large-scale application requires
formal choices
• Tradeoff is more “big picture” complexity for relatively less “local”
complexity
• Another big goal is the ability to gracefully evolve over time
Bounded Context
• Formal decomposition of a complex domain model into simpler sub-
models
• Characteristics
• Different bounded contexts can have formal relationships (Domain Events, etc.)
• The same domain entity will appear in multiple bounded contexts, with only those
properties and behaviors useful within that context
• Boundaries are typically defined in terms of human concepts
• Most appropriate for complex domains
• If entity classes start to become large, with subsets of related properties/methods,
this usually indicates that BCs are needed
• Drawbacks
• Complex – formal interactions via events can be hard to grasp, vs. database schema
• Confusing – multiple entity class definitions can seem “weird”
Bounded Context example
Command-Query Responsibility Segregation
(CQRS)
• Formal separation of data writes (“commands”) vs. data reads
(“queries”)
• Main alternative is classic CRUD
• Why?
• Easier to accommodate many more reads vs. writes (or vice versa)
• Easier to accommodate different read vs. write semantics (aggregate reads
but discrete writes, multiple read styles, etc.)
• Often used with Event Sourcing, Bounded Contexts
• Main drawback is that its more complex than CRUD
Enterprise Software Development Patterns
Heterogeneous Modeling
Domain Events
• Formal modeling of relevant happenings within a problem domain
• Like UI-style events (“button1 clicked”, etc.) but for the domain model itself
• “new user added to the system”
• “new drilling plan started”
• “private workspace data promoted to a public workspace”
• Uses
• Communication within and between Bounded Contexts
• Communication with external systems
• Used to implement Event Sourcing
• Requires a pub/sub messaging architecture like a service bus
• Typical alternative is data-level (foreign keys, etc.)
• More complex than FKs, but much more flexible
• Can result in temporary out-of-sync issues
• There are formal patterns to deal with this (Eventual Consistency, etc.)
Enterprise Software Development Patterns
Event Sourcing
• Store all changes within an application domain as a sequence of
events
• Enables event-based query, point-in-time reconstruction of state, etc.
• A natural fit with Domain Events
• Can be used to implement an audit log
• Log entries may not line up perfectly with event stream elements… might
require some translation
• Requires durable storage, occasional pruning of the persisted event
stream, etc.
Enterprise Software Development Patterns
Asynchronous Messaging
• Shift away from traditional RPC-style request/response pattern
• Async patterns
• Pub/sub (one-to-many, event-based broadcast)
• One-way unicast (“commands”)
• Two-way unicast (“messages”)
• Allows loosely-coupled senders and receivers
• Agree only on message semantics
• Allows for independent resource allocation
• Provides “shock absorber” for handling traffic spikes, transient node failures, etc.
• Implications
• Sender – doesn’t wait for response, may affect user experience
• Receiver – may require some means to communicate back to sender
• Can be implemented via queues, service bus, database, etc.
Non-Relational Data Storage (“NoSQL”)
• Purposeful use of denormalized and/or pre-aggregated data
• Requires careful consideration of intended data access patterns
• Trades off improved performance and scalability for reduced ad-hoc
query capability
• Relational model has inherent limits to scalability
• In NoSQL, database modeling is less important and software modeling
is more important
• Often most effective when used with other types of storage (blob,
relational, etc.)… “Polyglot Persistence”
• Works in conjunction with Bound Context, Domain Events, CQRS, etc.
Performance vs. Scalability
• Related, but not the same thing
• Performance  seconds/request
• Scalability  requests/second
• Performance
• In a typical enterprise system, performance is a user-centric definition
• For each major system function, define a minimally acceptable time threshold
• A software system has good performance to the extent that it performs each major function in its minimally acceptable time,
for one user
• Defining performance with raw statistics and no context is meaningless (“the system is fast, we can do 1000 writes/second”,
etc.)
• Performance is a measurement of meeting these minimum time thresholds… “the system is 38% performant”, etc.
• Scalability
• In a typical enterprise system, scalability is a cost-centric definition
• A software system has good scalability to the extent that it minimizes the cost to achieve performance (defined above) as
the number of users increases over time
• Scalability is a measure of time and effort (in other words, cost)… “the system is highly scalable, to support 2x users we don’t
need to change code, we just add two more servers and change one config file”, etc.
• Remember! Code is expensive, hardware is cheaper, configuration is cheapest
Scale-up vs. Scale-out
• Two patterns for scaling an enterprise application
• Scale-up – replace existing hardware with bigger, faster hardware; deceptively easy
• Scale-out – augment existing hardware with more nodes in the cluster; uses cheap
commodity hardware; public cloud is built on this model
• Requirements
• Scale-up – ability to make large-scale investments
• Scale-out – explicit architecture and design (stateless, loosely-coupled middle tier,
etc.)
• Limitations
• Scale-up – budget, SLAs, hardware, data layer
• Scale-out – often not compatible with legacy software

More Related Content

PDF
Patterns of enterprise application architecture
PPT
Database selection
PDF
Csld phan tan va song song
PDF
Software architecture, Patterns for Scale
PDF
Enterprise Day 2015 - The Enterprise Mail Handler for JIRA (Plugin People)
PPT
4. system models
PPT
Chapter 4 u
DOC
Models in ds
Patterns of enterprise application architecture
Database selection
Csld phan tan va song song
Software architecture, Patterns for Scale
Enterprise Day 2015 - The Enterprise Mail Handler for JIRA (Plugin People)
4. system models
Chapter 4 u
Models in ds

What's hot (15)

PPTX
Replication in Distributed Database
PPTX
Software Architectures, Week 1 - Monolithic Architectures
PPT
CAP, PACELC, and Determinism
PPTX
No sql (not only sql)
ODP
Distributed systems and consistency
PDF
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
PPTX
Cluster computing pptl (2)
PPTX
Programming in the large
PDF
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
PDF
Architecting for Failure in a Containerized World
PPTX
Hbase hivepig
PDF
Knowledge drivenmicroservices
PDF
Oracle BPM 11g advanced correlation
PPTX
NoSQL Evolution
Replication in Distributed Database
Software Architectures, Week 1 - Monolithic Architectures
CAP, PACELC, and Determinism
No sql (not only sql)
Distributed systems and consistency
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
Cluster computing pptl (2)
Programming in the large
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Architecting for Failure in a Containerized World
Hbase hivepig
Knowledge drivenmicroservices
Oracle BPM 11g advanced correlation
NoSQL Evolution
Ad

Viewers also liked (7)

PPT
Ise enterprise architecture and common standards program
PDF
JavaOne’12 Session 3992 - Software Modularity: Paradoxes, Principles, and Arc...
PDF
Service Oriented Architecture In Automotive
PPTX
Enterprise Architecture - Ohio's IT Optimization
PPTX
Enterprise Architecture Primer
PPT
Ea As Strategy Ver1 1
PPTX
Enterprise Architecture & IT standards
Ise enterprise architecture and common standards program
JavaOne’12 Session 3992 - Software Modularity: Paradoxes, Principles, and Arc...
Service Oriented Architecture In Automotive
Enterprise Architecture - Ohio's IT Optimization
Enterprise Architecture Primer
Ea As Strategy Ver1 1
Enterprise Architecture & IT standards
Ad

Similar to Enterprise Software Development Patterns (20)

PDF
Patterns of Distributed Application Design
KEY
Event Driven Architecture
PPTX
Patterns of Distributed Application Design
PDF
Event Driven-Architecture from a Scalability perspective
PPTX
Application architecture for cloud
PPTX
Patterns of enterprise application architecture
PPTX
Scaling Systems: Architectures that grow
KEY
What ya gonna do?
 
PPTX
L21 scalability
PPTX
The Big Data Stack
PPTX
Mykhailo Hryhorash: Архітектура IT-рішень (Частина 1) (UA)
PPTX
Mykhailo Hryhorash: Архітектура IT-рішень (Частина 1) (UA)
PDF
L20 Scalability
PDF
Modernising Change - Lime Point - Confluent - Kong
PDF
Distributed Systems in Data Engineering
PPTX
Event Driven Microservices architecture
PPTX
CQRS: Command/Query Responsibility Segregation
PPTX
Seminar - Scalable Enterprise Application Development Using DDD and CQRS
PDF
Scalability broad strokes
PDF
Scalable and Available, Patterns for Success
Patterns of Distributed Application Design
Event Driven Architecture
Patterns of Distributed Application Design
Event Driven-Architecture from a Scalability perspective
Application architecture for cloud
Patterns of enterprise application architecture
Scaling Systems: Architectures that grow
What ya gonna do?
 
L21 scalability
The Big Data Stack
Mykhailo Hryhorash: Архітектура IT-рішень (Частина 1) (UA)
Mykhailo Hryhorash: Архітектура IT-рішень (Частина 1) (UA)
L20 Scalability
Modernising Change - Lime Point - Confluent - Kong
Distributed Systems in Data Engineering
Event Driven Microservices architecture
CQRS: Command/Query Responsibility Segregation
Seminar - Scalable Enterprise Application Development Using DDD and CQRS
Scalability broad strokes
Scalable and Available, Patterns for Success

More from Josh Lane (8)

PPTX
Azure Cosmos DB - NoSQL In the Microsoft Cloud
PPTX
Workflow All the Things with Azure Logic Apps
PPTX
Webinar - Introduction to Azure DocumentDB
PPTX
Webinar - Introduction to Azure Data Lake
PPTX
A Gentle Introduction to Azure Service Fabric
PPTX
The Web on Windows
PPTX
Azure vs AWS
PPTX
Azure Service Bus
Azure Cosmos DB - NoSQL In the Microsoft Cloud
Workflow All the Things with Azure Logic Apps
Webinar - Introduction to Azure DocumentDB
Webinar - Introduction to Azure Data Lake
A Gentle Introduction to Azure Service Fabric
The Web on Windows
Azure vs AWS
Azure Service Bus

Recently uploaded (20)

PPTX
ISO 45001 Occupational Health and Safety Management System
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
System and Network Administration Chapter 2
PPTX
Online Work Permit System for Fast Permit Processing
PDF
Nekopoi APK 2025 free lastest update
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
ISO 45001 Occupational Health and Safety Management System
Operating system designcfffgfgggggggvggggggggg
Understanding Forklifts - TECH EHS Solution
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
How to Migrate SBCGlobal Email to Yahoo Easily
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Design an Analysis of Algorithms I-SECS-1021-03
2025 Textile ERP Trends: SAP, Odoo & Oracle
System and Network Administration Chapter 2
Online Work Permit System for Fast Permit Processing
Nekopoi APK 2025 free lastest update
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PTS Company Brochure 2025 (1).pdf.......
CHAPTER 2 - PM Management and IT Context
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx

Enterprise Software Development Patterns

  • 2. Why Enterprise Patterns? • Techniques for simple apps don’t always scale to complex ones • CRUD • Synchronous communication • Unified entity definitions • Expected lifetime and complexity of a large-scale application requires formal choices • Tradeoff is more “big picture” complexity for relatively less “local” complexity • Another big goal is the ability to gracefully evolve over time
  • 3. Bounded Context • Formal decomposition of a complex domain model into simpler sub- models • Characteristics • Different bounded contexts can have formal relationships (Domain Events, etc.) • The same domain entity will appear in multiple bounded contexts, with only those properties and behaviors useful within that context • Boundaries are typically defined in terms of human concepts • Most appropriate for complex domains • If entity classes start to become large, with subsets of related properties/methods, this usually indicates that BCs are needed • Drawbacks • Complex – formal interactions via events can be hard to grasp, vs. database schema • Confusing – multiple entity class definitions can seem “weird”
  • 5. Command-Query Responsibility Segregation (CQRS) • Formal separation of data writes (“commands”) vs. data reads (“queries”) • Main alternative is classic CRUD • Why? • Easier to accommodate many more reads vs. writes (or vice versa) • Easier to accommodate different read vs. write semantics (aggregate reads but discrete writes, multiple read styles, etc.) • Often used with Event Sourcing, Bounded Contexts • Main drawback is that its more complex than CRUD
  • 8. Domain Events • Formal modeling of relevant happenings within a problem domain • Like UI-style events (“button1 clicked”, etc.) but for the domain model itself • “new user added to the system” • “new drilling plan started” • “private workspace data promoted to a public workspace” • Uses • Communication within and between Bounded Contexts • Communication with external systems • Used to implement Event Sourcing • Requires a pub/sub messaging architecture like a service bus • Typical alternative is data-level (foreign keys, etc.) • More complex than FKs, but much more flexible • Can result in temporary out-of-sync issues • There are formal patterns to deal with this (Eventual Consistency, etc.)
  • 10. Event Sourcing • Store all changes within an application domain as a sequence of events • Enables event-based query, point-in-time reconstruction of state, etc. • A natural fit with Domain Events • Can be used to implement an audit log • Log entries may not line up perfectly with event stream elements… might require some translation • Requires durable storage, occasional pruning of the persisted event stream, etc.
  • 12. Asynchronous Messaging • Shift away from traditional RPC-style request/response pattern • Async patterns • Pub/sub (one-to-many, event-based broadcast) • One-way unicast (“commands”) • Two-way unicast (“messages”) • Allows loosely-coupled senders and receivers • Agree only on message semantics • Allows for independent resource allocation • Provides “shock absorber” for handling traffic spikes, transient node failures, etc. • Implications • Sender – doesn’t wait for response, may affect user experience • Receiver – may require some means to communicate back to sender • Can be implemented via queues, service bus, database, etc.
  • 13. Non-Relational Data Storage (“NoSQL”) • Purposeful use of denormalized and/or pre-aggregated data • Requires careful consideration of intended data access patterns • Trades off improved performance and scalability for reduced ad-hoc query capability • Relational model has inherent limits to scalability • In NoSQL, database modeling is less important and software modeling is more important • Often most effective when used with other types of storage (blob, relational, etc.)… “Polyglot Persistence” • Works in conjunction with Bound Context, Domain Events, CQRS, etc.
  • 14. Performance vs. Scalability • Related, but not the same thing • Performance  seconds/request • Scalability  requests/second • Performance • In a typical enterprise system, performance is a user-centric definition • For each major system function, define a minimally acceptable time threshold • A software system has good performance to the extent that it performs each major function in its minimally acceptable time, for one user • Defining performance with raw statistics and no context is meaningless (“the system is fast, we can do 1000 writes/second”, etc.) • Performance is a measurement of meeting these minimum time thresholds… “the system is 38% performant”, etc. • Scalability • In a typical enterprise system, scalability is a cost-centric definition • A software system has good scalability to the extent that it minimizes the cost to achieve performance (defined above) as the number of users increases over time • Scalability is a measure of time and effort (in other words, cost)… “the system is highly scalable, to support 2x users we don’t need to change code, we just add two more servers and change one config file”, etc. • Remember! Code is expensive, hardware is cheaper, configuration is cheapest
  • 15. Scale-up vs. Scale-out • Two patterns for scaling an enterprise application • Scale-up – replace existing hardware with bigger, faster hardware; deceptively easy • Scale-out – augment existing hardware with more nodes in the cluster; uses cheap commodity hardware; public cloud is built on this model • Requirements • Scale-up – ability to make large-scale investments • Scale-out – explicit architecture and design (stateless, loosely-coupled middle tier, etc.) • Limitations • Scale-up – budget, SLAs, hardware, data layer • Scale-out – often not compatible with legacy software