Building Evolutionary Architectures - Neal Ford

Transcription

Building EvolutionaryArchitectureswith Rebecca Parsons & Pat Kua@neal4dnealford.com

Rebecca ParsonsPat KuaPhotos by Martin rs/Neal Ford

What is SoftwareArchitecture?

requirementsEntire architectural Scope

elegalityscalabilityEntire architectural Scope

bilityilityreliabilityextensibilityfailure lityportabilityprecisionpredictabilityprocess s en.wikipedia.org/wiki/List of system quality attributes

bilityreliabilityextensibilityfailure tysimplicitystabilitystandards npredictabilityprocess bilityupgradabilityusabilityevolvability

Once I’ve built anarchitecture, how can Iprevent it from graduallydegrading over time?

How is long term planningpossible when thingschange unexpectedly?

Dynamic Equilibrium

Architecture is the decisionsthat you wish you could get right earlyin a project.— Ralph Johnsonthings that people perceiveas hard to change.

What if we buildarchitectures that expectchange?

Definition:An evolutionary architecture supportsincremental, guided change as a firstprinciple across multiple dimensions.

Perspectives on ArchitectureTechnical Architecture

Evolvability of Architectures

Big Ball of Mudclassescoupling connectionsdimensions :0

Layered Architectureopportunities:dimensions :41

Microkerneldimensions :1

RESTdimensions :1

Domain Perspectivedimensions :0

Microservicesevolutionary architecture dimensions :n

Definition:evolutionary architectureAn evolutionary architecture supportsincremental, guided change as a firstprinciple across multiple dimensions.

Composability

Composability

Composability

Definition:evolutionary architectureAn evolutionary architecture supportsincremental, guided change as a firstprinciple across multiple dimensions.

Incremental ChangeComponents are deployed.Features are released.Applications consist of routing.production

Incremental Changeproduction

Definition:evolutionary architectureAn evolutionary architecture supportsincremental, guided change as a firstprinciple across multiple dimensions.

Perspectives on ArchitectureData Architecture

Perspectives on ArchitectureSecurity Architecture

Perspectives on ArchitectureDomain Architecture

MicroservicesDomain Architecture

Fitness Functions a particular type of objective function that isused to summarize how close a givendesign solution is to achieving the set aims.

Architecture Fitness Functions metricstests

Definition:evolutionary architectureAn evolutionary architecture supportsincremental, guided change as a firstprinciple across multiple dimensions.

Agendadefinitionincremental changefitness functionsappropriate coupling

Fitness Functiona particular type of objectivefunction that is used tosummarize how close a givendesign solution is to achievingthe set aims.

Architecture Fitness Functionsmetricstests

Architecture Fitness Functionsmetricstests

Fitness Functionatomicholisticbatchcontinuous

Fitness Functionatomicholisticbatchcontinuous

Fitness Functionbatchatomicholisticcontinuous

Cyclic Dependency tion

Coupling Fitness Functionapplication

Fitness Functionbatchatomicholisticcontinuous

Fitness Functionatomicholisticbatchcontinuous

Fitness Functionatomicbatchholisticcontinuous

batchholisticHolistic fitness functions must run in a specific (shared) context.

Consumer Driven ontracts.html

Fitness Functionatomicbatchholisticcontinuous

Fitness Functionatomicholisticbatchcontinuous

Fitness Functionatomiccontinuousholisticbatch

atomicmonitoringcontinuouslogging

Fitness Functionatomiccontinuousholisticbatch

Fitness Functionatomicholisticbatchcontinuous

Fitness Functionatomiccontinuousbatchholistic

holisticresilience-ility?

Fitness Functionatomiccontinuousbatchholistic

Fitness Functionatomicholisticbatchcontinuous

System-wide Fitness Function

Fitness Function Fit

Guided Evolution

Agendadefinitionincremental changefitness functionsappropriate coupling

Prerequisites

Deployment Pipeline

Deployment Pipeline

Incremental Changev cwherec cycle timev maximum speed of new generationsEngine of evolutionary architecture

Agendadefinitionincremental changefitness functionsappropriate coupling

Code Reuse (Over Time)checkoutSOACustomershipping

Code Reuse (Over Time)checkoutmicroservicesshipping

The more reusable code is,the less usable it is.

Decentralized Data Management

Decentralized Data ManagementTransactions aretemporal coupling.

Decentralized Data ManagementLimittransactionalcontexts.

Evolutionary Database Designhttp://databaserefactoring.com/

Evolving Columns

Transition

Expand/Contract Patternapp v205compatible with dbv13 and v14DBversion13app v230compatible with dbv14app v234compatible with dbv14app v241compatible with dbv14 and 15DBversion14app v205deployedmigratedb to v14app v248compatible with dbv15DBversion15app v230deployedapp v234deployedTimeapp v234deployedmigratedb to v15app v248deployed

Decentralized Governance

Decentralized Governance

Decentralized Governance

“Goldilocks” GovernanceChoose technology stacksappropriate to problem scale.

Shift to Domain-centric Architectures

Shift to Domain-centric Architectures

Shift to Domain-centric Architectures

Incidentally Coupled Teamsuser interfaceserver-sideDBA

Conway’s Laworganizations which designsystems . are constrained toproduce designs which are copiesof the communication structuresof these organizationsMelvin Conway, 1968en.wikipedia.org/wiki/Conway%27s law

Incidentally Coupled Teamsuser interfaceserver-sideDBA

Autonomous TeamsOrdersShippingInverse Conway ManeuverCatalog

Low Efferent Coupling between Teamsn(n-1)2

Architectural Quantum

Architectural Quantum

Architectural Quantum

Architectural Quantum

UtilizingEvolutionary Architecture

1. Choose Dimensions

elegalityscalabilityEntire architectural Scope

auditabilitydatasecurityfitness ilityEntire architectural Scope

auditabilitydatasecurityfitness ilityEntire architectural Scope

UtilizingEvolutionary Architecture

2. Identify Fitness Functionsatomic/automated / manualholistic

UtilizingEvolutionary Architecture

3. Apply Incremental Change

UtilizingEvolutionary Architecture

UtilizingEvolutionary Architecture

Agendadefinitionincremental changefitness functionsappropriate coupling

Why should a companydecide to build anevolutionary architecture?

Predictable versus EvolvableScaleWhyshouldacompanyCycle Time as a Business Metricdecide to build anIsolating “—ilities” at the Quantum Levelevolutionary architecture?Longer Lasting Useful SystemsAdvanced Business Capabilities

Why should a companydecide to build anevolutionary architecture?

Why would a company choose notto build an evolutionaryarchitecture?

Can’t Evolve a Ball of MudWhywouldacompanychoosenotOther Architectural Characteristicsto buildDominatean evolutionaryarchitecture?Sacrificial ArchitecturePlanning on Closing the Business Soon

Predictable versus EvolvableScaleWhyshouldacompanyCycle Time as a Business Metricdecide to build anIsolating “—ilities” at the Quantum Levelevolutionary architecture?Longer Lasting Useful SystemsAdvanced Business Capabilities

Hypothesis and DataDriven Development

MoveFast&FixThings

https://github.com/github/scientist

︎ It decides whether or not to run the try block, ︎ Rrun,andomizes the order in which use and try blocks are ︎ Measures the durations of all behaviors, ︎ Compares the result of try to the result of use,wallows (but records) any exceptions raised in the try ︎ Sblock ︎ Publishes all this information.

Bugs Found; Resolutionfaster conflict return because shell script exited ︎ immediately;replicated in libraryndex write was causing O(n) problem; inlined into ︎ imemoryhe ancestor had a file with a given filemode, whilst one ︎ tsideof the merge had removed the file and the otherside had changed the filemode; bug in git!it incorrectly successfully merged files w/ 768 conflicts; ︎ Gfixedgit shell scriptew library was skipping an entire step; bug found & ︎ nfixed

Definition:evolutionary architectureAn evolutionary architecture supportsincremental, guided change as a firstprinciple across multiple dimensions.

http://evolutionaryarchitecture.com

mlnealford.com/books

Agendadefinitionincremental changefitness functionsappropriate coupling

Building Evolutionary Architectures @neal4d nealford.com with Rebecca Parsons & Pat Kua. Rebecca Parsons Pat Kua Neal Ford Photos by Martin Fowler: . Microservices evolutionary architecture dimensions : n. An evolutionary architecture supports incremental, guided change as a first