EVOLUTIONARY ARCHITECTURE
@patkua
1
EVOLUTIONARY ARCHITECTURE @patkua 1 Who is @thoughtworks Who is - - PowerPoint PPT Presentation
EVOLUTIONARY ARCHITECTURE @patkua 1 Who is @thoughtworks Who is @patkua #architect #author #developer #facilitator #leader #lifelong-learner tiny.cc/twtl tiny.cc/retros #coach #speaker Evolutionary Architecture Neal Ford Rebecca
@patkua
1Who is @thoughtworks
Who is @patkua tiny.cc/retros tiny.cc/twtl
#architect #developer #leader #coach #lifelong-learner #author #facilitator #speaker
Evolutionary Architecture
Rebecca Parsons (ThoughtWorks CTO) Neal Ford (Meme Wrangler) Patrick Kua (Technical Principal)
Photos by Martin Fowler: http://martinfowler.com/albums/ThoughtWorkers/
Introductions
If you haven’t done so, please introduce yourself the people around you - you will be working in pairs
What is one thing you want to get out
STICKY-SESSION
COLLECT THESE ON FLIPCHARTS
… is inevitable
Programming languages Libraries Frameworks Tools Operating environments Technical constraints
Revenue models Base technology adoption Competitors Customer needs Markets Products
… is inevitable
… is inevitable
Customer case study
Customer case study
We architected a system specifically for change?
Our current working version
An evolutionary architecture supports
continual and incremental change
as a first principle along multiple dimensions
But our architecture already supports change!
Example Architectural Patterns Big Ball of Mud Layered Architecture Microkernel Microservices
How do each of these architectures support change (Technical + Domain) Big Ball of Mud Layered Architecture Microkernel Microservices
Big ball of mud
classes
coupling connections
DIMENSIONS: 0
Layered architecture
PRESENTATION
COMPONENT COMPONENT COMPONENT
BUSINESS
COMPONENT COMPONENT COMPONENT
PERSISTENCE
COMPONENT COMPONENT COMPONENT
DATABASE DIMENSIONS: 1
Layered architecture
PRESENTATION
COMPONENT COMPONENT COMPONENT
BUSINESS
COMPONENT COMPONENT COMPONENT
PERSISTENCE
COMPONENT COMPONENT COMPONENT
DATABASE DIMENSIONS: 1
request
Layered architecture
PRESENTATION
COMPONENT COMPONENT COMPONENT
BUSINESS
COMPONENT COMPONENT COMPONENT
PERSISTENCE
COMPONENT COMPONENT COMPONENT
DATABASE DIMENSIONS: 1
request
SERVICE
COMPONENT COMPONENT COMPONENT
Layered architecture
MVC
PLUGIN PLUGIN
Microkernel
DIMENSIONS: 1
PLUGIN PLUGIN PLUGIN PLUGIN
CORE SYSTEM
Microkernel
Layered architecture
PRESENTATION
COMPONENT COMPONENT COMPONENT
BUSINESS
COMPONENT COMPONENT COMPONENT
PERSISTENCE
COMPONENT COMPONENT COMPONENT
DATABASE DOMAIN DIMENSIONS: 0
Microservices
API
CUSTOMER MODULE MODULE MODULE USER/ROLE MODULE MODULE MODULE ACCOUNT MODULE MODULE MODULE PRODUCT MODULE MODULE MODULE INVENTORY MODULE MODULE MODULE FULFILLMENT MODULE MODULE MODULE CLIENT REQUESTS CLIENT REQUESTS CLIENT REQUESTSDIMENSIONS: N
An evolutionary architecture supports
continual and incremental change
as a first principle along multiple dimensions
Does not dictate schedule Supports fast feedback Appropriate coupling Iterative
Matches business capabilities Enables experimentation Decentralised governance Fitness function
Fitness function
Fitness function
NFRs CFRs Quality Attributes Low response time Large # of users
IMPORTANT UNIMPORTANT
Strong audit trail Availability Heavy legal compliance Internationalisation & Localisation Monitoring Mobile responsive
Fitness function
NFRs CFRs Quality Attributes Low response time Large # of users
IMPORTANT UNIMPORTANT
Strong audit trail Availability Heavy legal compliance Internationalisation & Localisation Monitoring Mobile responsive
Fitness function
NFRs CFRs Quality Attributes Metrics Tests
Fitness function
NFRs CFRs Quality Attributes Metrics Tests
There are known knowns
There are known unknowns There are known knowns But there are also unknown unknowns
Generations
6 months 3 months 1 month daily?
Time taken to get a single change into production
repeatably reliably
Generations = Cycle time
Generations = Cycle time
Conway’s Law
are constrained to produce designs which are copies of the communication structures of these organisations
en.wikipedia.org/wiki/Conway%27s_law
Conway’s Law Side Effect
UI Specialists Middleware Specialists DBAs
Monolith’s vs Microservices
user interface server-side DBA
Orders Shipping Catalog
Inverse conway manoeuvre
Orders Shipping Catalog
Inverse conway manoeuvre
cross-functional teams… …organised around business capabilities Because Conway’ s Law!
DDD’s “bounded context” …physically realised
Products, not projects
projects: products: ‘s “You build it, you run it”
Last responsible moment
time complexity
Last responsible moment
Last responsible moment
Last responsible moment
Domain Adapters Ports and Adapters
Last responsible moment
Last responsible moment
this is not an excuse to abstract all the things!
Sense and probe
Last responsible moment
Architectural Spikes
Bring the pain forward
Bring the pain forward
deployment pipelines database migrations/ refactoring automation continuous integration
Principle driven architecture
Architecture is abstract until operationalised
view controller model ORM DB
React v0.14 CustomerInfo 4.3.1 Customer 1.3.5 Hibernate 4.3.11 view controller model ORM PostgreSQL 9.4 Hibernate 5.1.0 nealford.com/memeagora/2015/03/30/architecture_is_abstract_until_operationalized.htmlEvolving your architecture
Architect Develop Release
Evolving your architecture
Architect Develop Release
Evolving your architecture
Architect Develop Release Reflect
Evolving your architecture
Architect Develop Release Reflect
Cycle time = constraint
ENABLING CHANGE
Foster architectural thinking
ENABLING CHANGE
Foster architectural thinking
with ARCHITECTURAL BRIEFINGS
ARCHITECTURAL BRIEFINGS ARCHITECTURAL BRIEFINGS
ARCHITECTURAL BRIEFINGS … Design decision Tool Implementation
ARCHITECTURAL BRIEFINGS ? ? …
ARCHITECTURAL BRIEFINGS …
ARCHITECTURAL BRIEFINGS
ARCHITECTURAL BRIEFINGS …
ARCHITECTURAL BRIEFINGS
ARCHITECTURAL BRIEFINGS
ARCHITECTURAL BRIEFINGS
ARCHITECTURAL BRIEFINGS
ARCHITECTURAL BRIEFINGS
Everyone becomes an Architect
Think like a town planner
Development practices that help
Continuous Delivery Cross Functional Teams Architectural briefings Feature Toggles Branch by abstraction Tracer bullet deployments Review fitness functions Early identification of fitness functions Spikes
Build Buy
Build Buy
Build Buy
and/or
Build Buy
and/or
Libraries Frameworks COTS or Software Products Custom code
Functionality
Build Buy
and/or
Libraries Frameworks COTS or Software Products Custom code
Functionality Ability to change
Strategic Commodity
Need for rapid change
High Low Low High
Value generating
Support Experimental
Best fit
Things that prevent change
Coupling Cohesion Slow feedback cycles
Cohesion
Functional Sequential Informational Procedural Temporal Logical Coincidental
TRAPS: EXUBERANT COUPLING WSDLs
TRAPS: PRODUCT CUSTOMISATION
TRAPS: INTEGRATION AT THE DB LAYER
TRAPS: INTEGRATION AT THE DB LAYER
TRAPS: SOA VIA THE ESB ROUTE Hidden Coupling Smart Endpoints Dumb Pipes
An evolutionary architecture supports
continual and incremental change
as a first principle along multiple dimensions
Architectural choices Decision making process + thinking Organisational and cultural elements
@patkua
THANK YOU
@patkua
QUESTIONS OR COMMENTS?