let's not rewrite it all

124
LET’S NOT REWRITE IT ALL MICHELLE BRUSH

Upload: michelle-brush

Post on 07-Apr-2017

804 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Let's not rewrite it all

LET’S NOT REWRITE IT ALLMICHELLE BRUSH

Page 2: Let's not rewrite it all

I’M TIRED OF BUILDING METAPHORS.

Page 3: Let's not rewrite it all

BUT I’M GOING TO USE ONE…

Page 4: Let's not rewrite it all

VIVALAS VEGAS!

Page 5: Let's not rewrite it all

TEXTDidier B, CC 2004https://commons.wikimedia.org/wiki/File:Boardwalk-Casino.jpg

Page 6: Let's not rewrite it all

1200 BRAND NEW ENGINEERS

Page 7: Let's not rewrite it all

TEXTDidier B, CC 2004https://commons.wikimedia.org/wiki/File:Boardwalk-Casino.jpg

Page 8: Let's not rewrite it all
Page 9: Let's not rewrite it all

HOME OF THE VDARA HOTEL

DEATH RAY

Page 10: Let's not rewrite it all

$1.84 million

free

- OR -

Page 11: Let's not rewrite it all

$9.2 Billion

Page 12: Let's not rewrite it all

© Copyright Nigel Williams, CC

Page 13: Let's not rewrite it all

TEXTDidier B, CC 2004https://commons.wikimedia.org/wiki/File:Boardwalk-Casino.jpg

Page 14: Let's not rewrite it all
Page 15: Let's not rewrite it all

EVOLUTIONARY ARCHITECTURE

Page 16: Let's not rewrite it all

OR TWO…

Page 17: Let's not rewrite it all

"Almost no buildings adapt well.  They're designed not to adapt..."

 "When we deal with buildings we deal with

decisions taken long ago for remote reasons." 

"In wider use, the term architecture always means 'unchanging deep structure'“

How Buildings Learn

Page 18: Let's not rewrite it all
Page 19: Let's not rewrite it all

PURPOSE, NOT MODERNIZATION, DRIVES CHANGE

Page 20: Let's not rewrite it all

SHEARING LAYERS OF CHANGE TYPES OF REWRITES

LANGUAGE

ARCHITECTURE USER INTERFACE

DESIGNAPI/FRAMEWORK

CODE

PARADIGM…

Page 21: Let's not rewrite it all

SHEARING LAYERS OF CHANGE TYPES OF REWRITES

LANGUAGE

ARCHITECTURE USER INTERFACE

DESIGNAPI/FRAMEWORK

CODE

PARADIGM…

Page 22: Let's not rewrite it all

REFACTOR BAD CODE, DON’T REWRITE IT

RULE 0:

Page 23: Let's not rewrite it all

for(int i = 0; i < count1; ++i) { for(int j = 0; j < count2; ++j) { for(int k = 0; k < count3; ++k) { for(int l = 0; l < count4; ++l) { for(int m = 0; m < count5; ++m) { for(int n = 0; n < count6; ++n) { for(int o = 0; o < count7; ++o) { for(int p = 0; p < count8; ++p) { for(int q = 0; q < count9; ++q) { for(int r = 0; r < count10; ++r) { for(int s = 0; s < count 11 for(int t = 0; t < count for(int u = 0; for(int v = 0 for(int w for(i fo

FOR-NADO?

Page 24: Let's not rewrite it all
Page 25: Let's not rewrite it all

LANGUAGE

ARCHITECTURE USER INTERFACE

DESIGNAPI/FRAMEWORK

CODE

Page 26: Let's not rewrite it all

LANGUAGE

ARCHITECTURE USER INTERFACE

DESIGNAPI/FRAMEWORK

CODE

Page 27: Let's not rewrite it all

LANGUAGE

ARCHITECTURE USER INTERFACE

DESIGNAPI/FRAMEWORK

CODE

Page 28: Let's not rewrite it all

LANGUAGE

ARCHITECTURE USER INTERFACE

DESIGNAPI/FRAMEWORK

CODE

Page 29: Let's not rewrite it all

ARCHITECTURE USER INTERFACE

DESIGNAPI/FRAMEWORK

CODE

LANGUAGE

Page 30: Let's not rewrite it all

ARCHITECTURE USER INTERFACE

DESIGNAPI/FRAMEWORK

CODE

VIRTUAL MACHINE

Page 31: Let's not rewrite it all

HOW TO MIGRATE SOFTWARE

Page 32: Let's not rewrite it all

HOW SOFTWARE LEARNS

Page 33: Let's not rewrite it all

MINIMIZE THE SCOPERULE 1:

Page 34: Let's not rewrite it all

?

core business logic

Page 35: Let's not rewrite it all

core business logic

core business logic

Page 36: Let's not rewrite it all

core business logic

core business logic

Page 37: Let's not rewrite it all

core business logic

core business logic

Page 38: Let's not rewrite it all

core business logic

core business logic

Page 39: Let's not rewrite it all

WHAT WERE WE REALLY TRYING TO DO?

GET RID OF THIS

DEFINE AND STICK TO A SMALL SET OF OBJECTIVES.

COROLLARY 1.1:

Page 40: Let's not rewrite it all

EXAMPLE OBJECTIVES

Page 41: Let's not rewrite it all

Improve the time it takes for data to be available in applications.

EXAMPLE OBJECTIVES

Page 42: Let's not rewrite it all

Improve the time it takes for data to be available in applications.

Increase resiliency of pipeline to system failures.

EXAMPLE OBJECTIVES

Page 43: Let's not rewrite it all

Improve the time it takes for data to be available in applications.

Increase resiliency of pipeline to system failures.

Reduce overall memory utilization of core algorithms.

EXAMPLE OBJECTIVES

Page 44: Let's not rewrite it all

Improve the time it takes for data to be available in applications.

Increase resiliency of pipeline to system failures.

Reduce overall memory utilization of core algorithms.

Increase responsiveness of application during key workflows.

EXAMPLE OBJECTIVES

Page 45: Let's not rewrite it all

Improve the time it takes for data to be available in applications.

Increase resiliency of pipeline to system failures.

Reduce overall memory utilization of core algorithms.

Increase responsiveness of application during key workflows.

Reduce time to implement new workflows.

EXAMPLE OBJECTIVES

Page 46: Let's not rewrite it all

Improve the time it takes for data to be available in applications.

Increase resiliency of pipeline to system failures.

Reduce overall memory utilization of core algorithms.

Increase responsiveness of application during key workflows.

Reduce time to implement new workflows.

Eliminate unsupported or unmanageable technical dependencies.

EXAMPLE OBJECTIVES

Page 47: Let's not rewrite it all

Improve the time it takes for data to be available in applications.

Increase resiliency of pipeline to system failures.

Reduce overall memory utilization of core algorithms.

Increase responsiveness of application during key workflows.

Reduce time to implement new workflows.

Eliminate unsupported or unmanageable technical dependencies.

EXAMPLE OBJECTIVES

Page 48: Let's not rewrite it all

PURPOSE, NOT MODERNIZATION, DRIVES CHANGE

Page 49: Let's not rewrite it all

CREATE A TECHNICAL VISIONRULE 2:

Page 50: Let's not rewrite it all
Page 51: Let's not rewrite it all

THE POWER OF HEURISTICS

Page 52: Let's not rewrite it all

THE POWER OF HEURISTICS

BREADTH-FIRST SEARCH

Page 53: Let's not rewrite it all

THE POWER OF HEURISTICS

BREADTH-FIRST SEARCH

DJIKSTRA’S ALGORITHM

Page 54: Let's not rewrite it all

THE POWER OF HEURISTICS

BREADTH-FIRST SEARCH

DJIKSTRA’S ALGORITHM

A*

Page 55: Let's not rewrite it all

MAKE EVERYONE UNDERSTANDS IT.

COROLLARY 2.1:

We will never cross the streams.

We monitor everything.

Assume nothing about connectivity.

Page 56: Let's not rewrite it all

ENFORCE IT.

COROLLARY 2.2:

We will never cross the streams.

We monitor everything.

Assume nothing about connectivity.

Page 57: Let's not rewrite it all

REDUCE COMPLEXITYRULE 3:

Page 58: Let's not rewrite it all

LOOK FOR OPPORTUNITIES TO ELIMINATE WASTE.

150

130 components

75 essential

Page 59: Let's not rewrite it all

LOOK FOR OPPORTUNITIES TO ELIMINATE WASTE.

150

130 components

75 essential

black list

Page 60: Let's not rewrite it all

WORK IN THIN SLICESRULE 4:

Page 61: Let's not rewrite it all

UNBOUNDED QUEUE OF CHANGE REQUESTS

Page 62: Let's not rewrite it all

UNBOUNDED QUEUE OF CHANGE REQUESTS

“THE REWRITE”

Page 63: Let's not rewrite it all

“THE REWRITE”

3 YEAR REWRITE COST 7 YEARS OF FEATURE DEVELOPMENT

Page 64: Let's not rewrite it all

UNBOUNDED QUEUE OF CHANGE REQUESTS

“THE REWRITE”

Page 65: Let's not rewrite it all

UNBOUNDED QUEUE OF CHANGE REQUESTS

“THE REWRITE”

MIGRATION

MIGRATION

MIGRATION

Page 66: Let's not rewrite it all

WHAT IS MOST LIKELY TO CHANGE?

Page 67: Let's not rewrite it all

SLICES

Page 68: Let's not rewrite it all

SLICESSupports continued development of unaffected layers.

Minimizes opportunities for cross-layer improvements.

Page 69: Let's not rewrite it all

SLICESAligns with functional

understanding of the system.

Allows testing of full stack assumptions more quickly.

Page 70: Let's not rewrite it all

SLICESDATA SETS

Page 71: Let's not rewrite it all

SLICES

IDENTIFY PATTERNS

& RISKS.

RAPIDLY MIGRATE LAYERS.

Page 72: Let's not rewrite it all

EACH COMPONENT IS STYLED

CONSISTENTLY.

Page 73: Let's not rewrite it all

PLAN TO BUILD ADAPTERS & ABSTRACTIONS

COROLLARY 3.1:

Page 74: Let's not rewrite it all

ACCEPT YOU MAY HAVE TO WRITE THROWAWAY CODE

COROLLARY 3.2:

Page 75: Let's not rewrite it all

SLICES

Page 76: Let's not rewrite it all

PURPOSE, NOT MODERNIZATION, DRIVES

CHANGE

Page 77: Let's not rewrite it all

BUILD YOUR TESTS FIRSTRULE 5:

Page 78: Let's not rewrite it all

WHAT’S YOUR BETTER THAN NOTHING?

Page 79: Let's not rewrite it all

pieces that are constantly changing

BOUNDARY THAT IS FIXED AND UNCHANGING

(for each slice)

Page 80: Let's not rewrite it all

pieces that are constantly changing

BOUNDARY THAT IS FIXED AND UNCHANGING

(for each slice)

INPU

T

OUTP

UT

Page 81: Let's not rewrite it all

pieces that are constantly changing

BOUNDARY THAT IS FIXED AND UNCHANGING

(for each slice)

INPU

T

OUTP

UTTESTS

Page 82: Let's not rewrite it all

shortest pathfinding algorithm

<SO

URCE

, DES

TINAT

ION>

LIST<

MANE

UVER

S>

Page 83: Let's not rewrite it all

375,000 RANDOMLY GENERATED ROUTES

Page 84: Let's not rewrite it all
Page 85: Let's not rewrite it all

C++ SERVER

Page 86: Let's not rewrite it all

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

Page 87: Let's not rewrite it all

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

DATA ACCESS

Page 88: Let's not rewrite it all

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

Oracle'

DATA ACCESS

Page 89: Let's not rewrite it all

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

Oracle'

DATA ACCESS

JAVA SERVER

SERVICE SERVICE SERVICE JAVA

SERVER

SERVICE SERVICE SERVICE JAVA

SERVER

SERVICE SERVICE SERVICE JAVA

SERVER

SERVICE SERVICE SERVICE JAVA

SERVER

SERVICE SERVICE SERVICE

JDBC

Page 90: Let's not rewrite it all

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

Oracle'

DATA ACCESS

JAVA SERVER

SERVICE SERVICE SERVICE JAVA

SERVER

SERVICE SERVICE SERVICE JAVA

SERVER

SERVICE SERVICE SERVICE JAVA

SERVER

SERVICE SERVICE SERVICE JAVA

SERVER

SERVICE SERVICE SERVICE

JDBC

(Yes, it’s a monolith.)

Page 91: Let's not rewrite it all

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

Oracle'

DATA ACCESS

TRY NOT TO MESS WITH YOUR INTERFACES.

COROLLARY 5.1:

Page 92: Let's not rewrite it all

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

C++ SERVER

Oracle'

DATA ACCESS

PRIORITIZE BUG FIXES.

COROLLARY 5.2:

Page 93: Let's not rewrite it all

EMBRACE OPERATIONS EARLYRULE 6:

Page 94: Let's not rewrite it all

SHEARING LAYERS OF CHANGE TYPES OF REWRITES

LANGUAGE

ARCHITECTURE USER INTERFACE

DESIGNAPI/FRAMEWORK

CODE

PARADIGM…

Page 95: Let's not rewrite it all

v v

Stream

Batch

Page 96: Let's not rewrite it all

NO MODIFICATION TO THE INTERFACES.

WELL-ENCAPSULATED BUSINESS LOGIC.

CLEAR OBJECTIVE: REDUCE LATENCY.

STRATEGY FOR INCREMENTAL VALUE

Page 97: Let's not rewrite it all

SLICESSupports continued development of unaffected layers.

Minimizes opportunities for cross-layer improvements.

Page 98: Let's not rewrite it all

OPERATIONS

Page 99: Let's not rewrite it all

Dashboards and reports that relied on older forms of operational data had to be rewritten.

OPERATIONS

Page 100: Let's not rewrite it all

Engineers were addicted to rebuilding the world when pseudo-reference data changed.

OPERATIONS

Page 101: Let's not rewrite it all

Performance expertise was lacking.

OPERATIONS

Page 102: Let's not rewrite it all

Our definition of “good” needed radical adjustment.

OPERATIONS

Page 103: Let's not rewrite it all

WE HAD TO TOUCH EVERYTHING.

OPERATIONS

Page 104: Let's not rewrite it all

WE HAD TO TOUCH EVERYTHING.

Page 105: Let's not rewrite it all

WE HAD TO TOUCH EVERYTHING.

SUPPORT CULTURE

DEPLOYMENT STRATEGY

TESTING STRATEGY

MONITORING BEHAVIOR

RISK TOLERANCE

TEAM EXPERTISE

PERFORMANCE MEASUREMENTS

JARGON

CAPACITY PLANNING

DISASTER RECOVERY

ESTIMATION

Page 106: Let's not rewrite it all

WE HAD TO TOUCH EVERYTHING.

COROLLARY 6.1:DOCUMENT OPERATIONAL RISKS AND ASSUMPTIONS AS YOU GO

Page 107: Let's not rewrite it all

INVEST IN LEARNINGRULE 7:

Page 108: Let's not rewrite it all

JUST IN TIME

MULTIMODAL

OBJECTIVE-BASED

LAYERED

WHAT DO WE WANT PEOPLE TO GET OUT OF THIS?

Page 109: Let's not rewrite it all

JUST IN TIME

MULTIMODAL

OBJECTIVE-BASED

LAYERED

IS IT AVAILABLE JUST BEFORE THEY

NEED IT?

Page 110: Let's not rewrite it all

JUST IN TIME

MULTIMODAL

OBJECTIVE-BASED

LAYERED

DOES IT COVER MULTIPLE VIEWS OF THE SYSTEM?

Page 111: Let's not rewrite it all

JUST IN TIME

MULTIMODAL

OBJECTIVE-BASED

LAYERED

DOES IT COME IN VARIOUS SHAPES

AN SIZES?

Page 113: Let's not rewrite it all

CURATE LEARNING MATERIALS REGULARLY.

COROLLARY 7.2:

/** * Documentation is an obvious example of this. * Create and gather assets like: * @param blogs * @param diagrams * @param snippets * @param principles */

We will never cross the streams.

We monitor everything.

Assume nothing about connectivity.

Page 114: Let's not rewrite it all

CURATE LEARNING MATERIALS REGULARLY.

COROLLARY 7.2:

/** * Documentation is an obvious example of this. * Create and gather assets like: * @param blogs * @param diagrams * @param snippets * @param principles */

We will never cross the streams.

We monitor everything.

Assume nothing about connectivity.

Page 115: Let's not rewrite it all

MAKE THE RIGHT THING EASYRULE 8:

Page 116: Let's not rewrite it all

PEOPLE CAN BE LAZY.

Page 117: Let's not rewrite it all

PEOPLE CAN BE LAZY.ACCEPT IT

Page 118: Let's not rewrite it all

MAKE THE WRONG THING HARDRULE 8:

Page 119: Let's not rewrite it all

150

55 components

75 essential

black list

Page 120: Let's not rewrite it all

PURPOSE, NOT MODERNIZATION, DRIVES CHANGE

Page 121: Let's not rewrite it all

© Copyright Nigel Williams, CC

Page 122: Let's not rewrite it all

EVOLUTIONARY ARCHITECTURE

Page 123: Let's not rewrite it all

HOME OF THE VDARA HOTEL

DEATH RAY

Page 124: Let's not rewrite it all

Engineering Director, Cerner Corporation Chapter Leader, Kansas City Girl Develop It Conference Organizer, Midwest.io

@michellebrush

MICHELLE BRUSH

Population Health

55 million unique people.

3 petabytes of healthcare data

processing on an 800 node Hadoop cluster

more data is always arriving