never done jalewis@thoughtworks.com @boicy 1 never done 2 never - - PowerPoint PPT Presentation

never done
SMART_READER_LITE
LIVE PREVIEW

never done jalewis@thoughtworks.com @boicy 1 never done 2 never - - PowerPoint PPT Presentation

building systems that are never done jalewis@thoughtworks.com @boicy 1 never done 2 never done Incomplete adjective not having all the necessary or appropriate parts 3 never done Incomplete adjective not having all the necessary or


slide-1
SLIDE 1 1

never done

building systems that are

jalewis@thoughtworks.com @boicy
slide-2
SLIDE 2 2

never done

slide-3
SLIDE 3 3

never done

Incomplete adjective not having all the necessary or appropriate parts

slide-4
SLIDE 4 3

never done

Incomplete adjective not having all the necessary or appropriate parts

slide-5
SLIDE 5 4
slide-6
SLIDE 6 4

KERRBOX!

slide-7
SLIDE 7 5
slide-8
SLIDE 8

How big are they?

slide-9
SLIDE 9
slide-10
SLIDE 10
slide-11
SLIDE 11
slide-12
SLIDE 12 10

never done

slide-13
SLIDE 13 11

never done

slide-14
SLIDE 14 11

“This, milord, is my family's axe. We have owned it for almost nine hundred years, see. Of course, sometimes it needed a new blade. And sometimes it has required a new handle, new designs on the metalwork, a little refreshing of the

  • rnamentation . . . but is this not

the nine hundred-year-old axe of my family? And because it has changed gently over time, it is still a pretty good axe, y'know. Pretty good.”

never done

slide-15
SLIDE 15 12

replaceable component architectures

Dan North
slide-16
SLIDE 16 13

the future is scary

slide-17
SLIDE 17

BACK IN 2004 (ISH)

14
slide-18
SLIDE 18 15
slide-19
SLIDE 19

TIME PASSES…

slide-20
SLIDE 20

TIME PASSES…

16
slide-21
SLIDE 21 17

These companies are doing things a bit differently

They can deploy small, independent services on demand They scale teams independently of one another around these services They operate at web-scale if they need to
slide-22
SLIDE 22
slide-23
SLIDE 23

CONSULTANTS! HELL YEAH!

slide-24
SLIDE 24 19 Enterprise Unicorns Ability to adopt new technologies and practices

And the speed at which they can deliver software is increasing

slide-25
SLIDE 25 20 https://www.thoughtworks.com/radar/
slide-26
SLIDE 26 21

be cheap to replace microservices should allow us to go as “fast as possible” be deployable on demand be resilient on imperfect networks but it’s not as simple as that

slide-27
SLIDE 27 22

“the first post-devops architectural style”

Neal Ford
slide-28
SLIDE 28 23

a note on the law of unintended consequences

slide-29
SLIDE 29 24

Consider a single application - its a website, lets call it A

A

slide-30
SLIDE 30 25 we want to get A into production and since we are hipsters we are going to practice continuous delivery - we will have a full automated build pipeline compile, unit and functional test integration test acceptance test deploy to production run on build machine deployed on build machine deployed to integration environment
slide-31
SLIDE 31 25 we want to get A into production and since we are hipsters we are going to practice continuous delivery - we will have a full automated build pipeline Tappety tap compile, unit and functional test integration test acceptance test deploy to production run on build machine deployed on build machine deployed to integration environment
slide-32
SLIDE 32 25 we want to get A into production and since we are hipsters we are going to practice continuous delivery - we will have a full automated build pipeline Tappety tap compile, unit and functional test integration test acceptance test deploy to production run on build machine deployed on build machine deployed to integration environment
slide-33
SLIDE 33 26

How many environments do we need?

slide-34
SLIDE 34 27

How many environments do we need?

compile, unit and functional test integration test acceptance test deploy to production run on build machine deployed on build machine deployed to integration environment
slide-35
SLIDE 35 28 OK, so we are going to be cool and use microservices

A B

slide-36
SLIDE 36 29 and we might as well call them something interesting

webapp customers

slide-37
SLIDE 37 30 and they have a dependency on one another…

webapp customers

slide-38
SLIDE 38 31

How do we traditionally make sure that new versions of the services work with each other? Let me illustrate this

slide-39
SLIDE 39 32

V1 V1

slide-40
SLIDE 40 32 git push origin master

V1 V1

slide-41
SLIDE 41 32

V2

git push origin master

V1 V1

slide-42
SLIDE 42 32

V2

git push origin master

V1 V1

slide-43
SLIDE 43 32

V2

git push origin master

V1 V1

slide-44
SLIDE 44 32

V2

git push origin master

V1 V1

slide-45
SLIDE 45 32

V2

git push origin master

V1 V1

slide-46
SLIDE 46 33

V2 V1

What should V2 of the blue app be tested against here

slide-47
SLIDE 47 34

V1

This is in production, so presumably we should test against this?

slide-48
SLIDE 48 35

V1 V1

slide-49
SLIDE 49 35 git push origin master

V1 V1

git push origin master
slide-50
SLIDE 50 35

V2

git push origin master

V1 V1 V2

git push origin master
slide-51
SLIDE 51 35

V2

git push origin master

V1 V1 V2

git push origin master
slide-52
SLIDE 52 35

V2

git push origin master

V1 V1 V2

git push origin master
slide-53
SLIDE 53 35

V2

git push origin master

V1 V1 V2

git push origin master
slide-54
SLIDE 54 35

V2

git push origin master

V1 V1 V2

git push origin master
slide-55
SLIDE 55 36 I’m sorry Dave, I can’t let you do that

I’m sorry Dave, I can’t let you do that

slide-56
SLIDE 56 37
slide-57
SLIDE 57 37
slide-58
SLIDE 58 38

Locks == Delay

slide-59
SLIDE 59 39

V1 V1 s s V1 V1

slide-60
SLIDE 60 40
slide-61
SLIDE 61 41
slide-62
SLIDE 62 41
slide-63
SLIDE 63 42

2 services

4 environments =>

slide-64
SLIDE 64 43

2 services

slide-65
SLIDE 65 43

2 services 4

slide-66
SLIDE 66 43

2 services 4 >600

slide-67
SLIDE 67 44
slide-68
SLIDE 68 45
slide-69
SLIDE 69 45 http://james-iry.blogspot.com.au/2009/05/brief-incomplete-and-mostly-wrong.html
slide-70
SLIDE 70 46

<thinks>

slide-71
SLIDE 71 47

if:

slide-72
SLIDE 72 47

if:

Integration testing

slide-73
SLIDE 73 47

if:

Integration testing Independent deployment

slide-74
SLIDE 74 47

if:

Integration testing Independent deployment Service versioning / evolution

slide-75
SLIDE 75 47

if:

Integration testing Independent deployment Service versioning / evolution

is hard

slide-76
SLIDE 76 48

What about some of our other sacred cows?

slide-77
SLIDE 77 48 agile XP TDD BDD YAGNI DRY SOLID Continuous Delivery Refactoring GoF GRASP emergent design World of Warcraft KISS

What about some of our other sacred cows?

slide-78
SLIDE 78 49 agile XP TDD BDD

YAGNI

DRY SOLID Continuous Delivery Refactoring GoF GRASP emergent design World of Warcraft KISS
slide-79
SLIDE 79 50
slide-80
SLIDE 80 50 http://martinfowler.com/bliki/Yagni.html
slide-81
SLIDE 81 51 51

build out services as you need them minimise holding cost and batch size

slide-82
SLIDE 82 52 agile XP TDD BDD YAGNI DRY SOLID Continuous Delivery Refactoring GoF

GRASP

emergent design World of Warcraft KISS
slide-83
SLIDE 83 53 Fulfilment Retail
slide-84
SLIDE 84 54 Fulfilment Retail
slide-85
SLIDE 85 55 Fulfilment Retail
slide-86
SLIDE 86 56 Fulfilment Retail

High cohesion Low coupling

slide-87
SLIDE 87 57 agile XP TDD BDD YAGNI

DRY

SOLID Continuous Delivery Refactoring GoF GRASP emergent design World of Warcraft KISS
slide-88
SLIDE 88 58

“Every piece of knowledge must have a single, unambiguous, authoritative representation within a system”

Andrew Hunt, Dave Thomas: The Pragmatic Programmer. 1999-10-01. ISBN: 978-0-2016-1622-4 https://pragprog.com/book/tpp/the-pragmatic-programmer
slide-89
SLIDE 89 59

DRY holds across services

slide-90
SLIDE 90 60 agile XP

TDD

BDD YAGNI DRY SOLID Continuous Delivery Refactoring GoF GRASP emergent design World of Warcraft KISS
slide-91
SLIDE 91 61

“The London school

  • f Test Driven

Development”

Mike Feathers
slide-92
SLIDE 92 62

should we bother with test driving our code if we are going to throw it away?

slide-93
SLIDE 93 63 http://moleseyhill.com/blog/2009/08/27/dreyfus-model/
slide-94
SLIDE 94 64

All rules are contextual

slide-95
SLIDE 95 65 Start
slide-96
SLIDE 96 Am I Kent Beck? 65 Start
slide-97
SLIDE 97 Do what I think is best Yes Am I Kent Beck? 65 Start
slide-98
SLIDE 98

No

Do what I think is best Yes Am I Kent Beck? 65 Start Am I Dan North?
slide-99
SLIDE 99 Do what I think is best Yes

No

Do what I think is best Yes Am I Kent Beck? 65 Start Am I Dan North?
slide-100
SLIDE 100 No Do what I think is best Yes

No

Do what I think is best Yes Am I Kent Beck? 65 Start Am I Dan North?
slide-101
SLIDE 101 No Do what I think is best Yes

No

Do what I think is best Yes Am I Kent Beck? 65 Start Am I Dan North?

USE TDD ALREADY!

slide-102
SLIDE 102 66
slide-103
SLIDE 103 66
slide-104
SLIDE 104

should we write unit tests?

67

Most of the other stuff is made so much easier

slide-105
SLIDE 105 68 agile XP TDD BDD YAGNI DRY Continuous Delivery Refactoring GoF GRASP emergent design World of Warcraft KISS

SRP

slide-106
SLIDE 106 69

a class should be no bigger than my head

slide-107
SLIDE 107 70

SRP a service should be no bigger than my head

slide-108
SLIDE 108 71 agile XP TDD BDD YAGNI DRY SOLID Continuous Delivery Refactoring GoF GRASP emergent design World of Warcraft

KISS

slide-109
SLIDE 109 72

“Simplicity is a great virtue but it requires hard work to achieve it and education to appreciate it. And to make matters worse: complexity sells better.” Edsger W. Dijkstra

slide-110
SLIDE 110 73
slide-111
SLIDE 111 74

WWJD?

slide-112
SLIDE 112 74

WWJD?

(what would Joe do?)

slide-113
SLIDE 113 75
slide-114
SLIDE 114 76

cron, python, boto, pydot, graphviz

slide-115
SLIDE 115 76

cron, python, boto, pydot, graphviz

slide-116
SLIDE 116 77

cron, python, boto, pydot, graphviz

Do the simplest thing possible

slide-117
SLIDE 117 78

maybe we can use CD to help with our testing problem?

slide-118
SLIDE 118 79

“There is nothing so useless as doing efficiently that which should not be done at all”

Peter Drucker

slide-119
SLIDE 119 80
slide-120
SLIDE 120 80
slide-121
SLIDE 121 80 Good Monitoring
slide-122
SLIDE 122 80 Good Monitoring Fast Remediation
slide-123
SLIDE 123 80 Good Monitoring Fast Remediation

QA

slide-124
SLIDE 124 80

Test in production

Good Monitoring Fast Remediation

QA

slide-125
SLIDE 125 81
slide-126
SLIDE 126 81
slide-127
SLIDE 127 81

SEMANTIC MONITORING

slide-128
SLIDE 128 82 Customer Service Web Shop
slide-129
SLIDE 129 82 Customer Service Web Shop Expectations
slide-130
SLIDE 130 82 Customer Service Web Shop Expectations
slide-131
SLIDE 131 82 Customer Service Web Shop Expectations
slide-132
SLIDE 132 82 Customer Service Web Shop Expectations

Consumer Driven Contracts

slide-133
SLIDE 133 83
slide-134
SLIDE 134 83
slide-135
SLIDE 135 84

integration environment

the death of the

slide-136
SLIDE 136 85

production != live

slide-137
SLIDE 137 86

the future is scary

slide-138
SLIDE 138 87 Enterprise Startup Ability to adopt new technologies and practices

And the speed at which they can deliver software is only increasing

slide-139
SLIDE 139

EVEN FINANCE IS NOT IMMUNE

88
slide-140
SLIDE 140

we have to learn how to: Craft my families axe Deploy small services independently Test microservices in isolation Test microservices in production

slide-141
SLIDE 141 90

the future is bright

slide-142
SLIDE 142 91
slide-143
SLIDE 143 92
slide-144
SLIDE 144 93

we have old techniques that apply: SRP GRASP YAGNI KISS TDD DRY

slide-145
SLIDE 145

and new techniques to apply: Consumer Driven Contracts Semantic Monitoring Semantic Versioning Testing in Production Failure Isolation

slide-146
SLIDE 146 95 jalewis@thoughtworks.com @boicy

Thanks!

slide-147
SLIDE 147 96

"ever accelerating progress of technology and changes in the mode of human life, which gives the appearance of approaching some essential singularity in the history of the race beyond which human affairs, as we know them, could not continue”

John von Neumann, as recorded by Ulam, 1958

slide-148
SLIDE 148 97 “Around the world, laboring women produce forty-five thousand babies a day, representing 1023 MIPS of processing power. Also around the world, fab lines casually churn out thirty million microprocessors a day, representing 1023 MIPS. In another ten months, most of the MIPS being added to the solar system will be machine-hosted for the first time”
slide-149
SLIDE 149 98 yeah, it’s just science fiction right>

yeah, it’s just science fiction right?

slide-150
SLIDE 150 98 yeah, it’s just science fiction right>

yeah, it’s just science fiction right?

slide-151
SLIDE 151 99
slide-152
SLIDE 152 100

“Self-Driving Trucks Are Going to Hit Us Like a Human-Driven Truck”

https://medium.com/basic-income/self-driving-trucks-are-going-to-hit-us-like-a-human-driven-truck-b8507d9c5961 source: Morgan Stanley

This is where we’re at and this is what we face as we look towards a quickly approaching horizon of over 3 million unemployed truckers and millions more unemployed service industry workers in small towns all over the country dependent on truckers as consumers of their services.

slide-153
SLIDE 153

“If you aren’t worried about strong AI within the next 5-10 years then you aren’t working closely enough with AI teams” (paraphrasing Elon Musk)

101