- microservices - and the inverse Conway manoeuvre - - PowerPoint PPT Presentation

microservices
SMART_READER_LITE
LIVE PREVIEW

- microservices - and the inverse Conway manoeuvre - - PowerPoint PPT Presentation

- microservices - and the inverse Conway manoeuvre jalewis@thoughtworks.com @boicy 1 organizations which design systems are constrained to produce designs which are copies of the communication structure of those organizations


slide-1
SLIDE 1 1

and the inverse Conway manoeuvre

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

“…organizations which design systems … are constrained to produce designs which are copies of the communication structure of those organizations”

Melvyn Conway, 1968

slide-3
SLIDE 3
slide-4
SLIDE 4

The mirroring phenomenon is consistent with two rival causal

  • mechanisms. First, designs may evolve to reflect their development
  • environments. In tightly-coupled organizations, dedicated teams

employed by a single firm and located at a single site develop the

  • design. Problems are solved by face-to-face interaction, and

performance “tweaked” by taking advantage of the access that module developers have to information and solutions developed in other

  • modules. Even if not an explicit managerial choice, the design

naturally becomes more tightly-coupled. By contrast, in loosely-coupled organizations, a large, distributed team of volunteers develops the design. Face-to-face communications are rare given most developers never meet. Hence fewer connections between modules are established. The architecture that evolves is more modular as a result of the limitations on communication between developers.

4 http://www.hbs.edu/faculty/Publication%20Files/08-039_1861e507-1dc1-4602-85b8-90d71559d85b.pdf "Exploring the Duality between Product and Organizational Architectures : A Test of the “Mirroring” Hypothesis"

2007

slide-5
SLIDE 5

The mirroring phenomenon is consistent with two rival causal

  • mechanisms. First, designs may evolve to reflect their development
  • environments. In tightly-coupled organizations, dedicated teams

employed by a single firm and located at a single site develop the

  • design. Problems are solved by face-to-face interaction, and

performance “tweaked” by taking advantage of the access that module developers have to information and solutions developed in other

  • modules. Even if not an explicit managerial choice, the design

naturally becomes more tightly-coupled. By contrast, in loosely-coupled organizations, a large, distributed team of volunteers develops the design. Face-to-face communications are rare given most developers never meet. Hence fewer connections between modules are established. The architecture that evolves is more modular as a result of the limitations on communication between developers.

5 http://www.hbs.edu/faculty/Publication%20Files/08-039_1861e507-1dc1-4602-85b8-90d71559d85b.pdf "Exploring the Duality between Product and Organizational Architectures : A Test of the “Mirroring” Hypothesis"
slide-6
SLIDE 6

The mirroring phenomenon is consistent with two rival causal

  • mechanisms. First, designs may evolve to reflect their development
  • environments. In tightly-coupled organizations, dedicated teams

employed by a single firm and located at a single site develop the

  • design. Problems are solved by face-to-face interaction, and

performance “tweaked” by taking advantage of the access that module developers have to information and solutions developed in other

  • modules. Even if not an explicit managerial choice, the design

naturally becomes more tightly-coupled. By contrast, in loosely-coupled organizations, a large, distributed team of volunteers develops the design. Face-to-face communications are rare given most developers never meet. Hence fewer connections between modules are established. The architecture that evolves is more modular as a result of the limitations on communication between developers.

6 http://www.hbs.edu/faculty/Publication%20Files/08-039_1861e507-1dc1-4602-85b8-90d71559d85b.pdf "Exploring the Duality between Product and Organizational Architectures : A Test of the “Mirroring” Hypothesis"
slide-7
SLIDE 7

loosely-coupled organizations ⇒,design is more modular as a result of the limitations on communication between developers.

7 http://www.hbs.edu/faculty/Publication%20Files/08-039_1861e507-1dc1-4602-85b8-90d71559d85b.pdf "Exploring the Duality between Product and Organizational Architectures : A Test of the “Mirroring” Hypothesis"

tightly-coupled organizations ⇒ design becomes more tightly-coupled.

slide-8
SLIDE 8 8
slide-9
SLIDE 9
  • rganised around business capabilities

componentisation via services products not projects smart endpoints and dumb pipes decentralised governance decentralised data management infrastructure automation evolutionary design designed for failure

slide-10
SLIDE 10

How big are they? But first…

slide-11
SLIDE 11
slide-12
SLIDE 12
slide-13
SLIDE 13
slide-14
SLIDE 14 14

microservices should be:

cheap to replace and should allow you to go as “fast as possible”? quick to scale withstand failure

slide-15
SLIDE 15

THE 20TH CENTURY ORGANISATION

15
slide-16
SLIDE 16

develop- ment

16

testing architects

  • ps

PMO HR sales marketing finance

slide-17
SLIDE 17 17 Project(process( Business IT Solutions dev QA Support Idea High level Estimation and decision to proceed Deploymen t Testing Business Requirement Document Business Case Project Brief Functional spec Initiation Doc reqs. matrix Detailed Estimate Project Approve d TDD PM docs Test Script s Change Request Requirement s clarification and estimation 1010100010100101011010 Dev Kick off Coding (Dev) Additional <thing> raised >10 % CAPE X <10 % CAPE X Support handover User Acceptance Testing Normal Flow Data Flow Alternate Process Flow KEY Dropped requirements become Enhancements
slide-18
SLIDE 18 18
slide-19
SLIDE 19 19
slide-20
SLIDE 20 20
slide-21
SLIDE 21

develop- ment

21

testing architects

  • ps

PMO HR sales marketing finance

slide-22
SLIDE 22 22

each of these chords represents a delay

slide-23
SLIDE 23

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

Peter Drucker

23
slide-24
SLIDE 24

INTRODUCING BUSINESS CAPABILITIES

(nothing new to see here, move along now folks)

24
slide-25
SLIDE 25 25

A capability is a combination of people, processes, systems that provides value to customers (internal or external)

slide-26
SLIDE 26 26
slide-27
SLIDE 27 27

Retail Customers

slide-28
SLIDE 28 28

Customers Retail

slide-29
SLIDE 29 29

Customers Retail

slide-30
SLIDE 30 30

Customers Retail

slide-31
SLIDE 31 31

Customers Retail

slide-32
SLIDE 32

THE TROUBLE WITH PROJECTS

32
slide-33
SLIDE 33 33

Customers Retail

THE CAPABILITIES WERE BUILT BY LARGE TEAMS

slide-34
SLIDE 34 34

Customers Retail

USING PROJECT-THINKING, NOT SERVICE THINKING*

* http://lmgtfy.com/?q=GDS+service+thinking

slide-35
SLIDE 35 35

AND THE DECOUPLED CAPABILITIES END UP AS A TANGLED MESS OF “MICROSERVICES”

slide-36
SLIDE 36

Feature starts dev

iteration 2 iteration 1 iteration 3

Feature deployed

regression testing performance testing deployment tests

cycle time

ANYONE SEEN 6 WEEK PERIODS OF “HARDENING”?

slide-37
SLIDE 37 37 Unit Tests Build Service Tests

Service A

Build

Service B

End-to-end Tests Build

Service C

Build

Service D

Service Tests Unit Tests Unit Tests Unit Tests Service Tests Service Tests

ANYONE SEEN “FAN-IN” TO END TO END TESTS?

slide-38
SLIDE 38

ANYONE HAD TO DEPLOY EVERYTHING ALL AT ONCE?

write spec write code test release

Without deploying into production, inventory is built up - inventory costs money and the more we have the more risky our deployments

?

slide-39
SLIDE 39
slide-40
SLIDE 40 40

beware the distributed monolith!

slide-41
SLIDE 41 41

this is a recipe for a nervous breakdown

this is not “as fast as possible”

slide-42
SLIDE 42

WHAT MIGHT GOOD LOOK LIKE?

42
slide-43
SLIDE 43 43
slide-44
SLIDE 44

Pauline Cafferkey, early 2015

slide-45
SLIDE 45 45

Team at the Royal Free

slide-46
SLIDE 46

infectious diseases

46

lab services facilities domestic services physio micro biology estates pharmacy finance

Royal Free Hospital Capabilities

<other> <other>

slide-47
SLIDE 47

infectious diseases

47

lab services facilities domestic services physio micro biology estates pharmacy finance

slide-48
SLIDE 48 48

“The approach favors agility over raw power <snip>”

http://en.wikipedia.org/wiki/OODA_loop
slide-49
SLIDE 49 49 1 Dr Rebecca Lester, Infectious diseases, Specialist registrar 2 Dr Damien Mack, Microbiology, Consultant 3 Dr Ruaridh Buchanan, Infectious diseases, Specialist registrar 4 Dr Simon Warren, Infectious diseases, Consultant 5 Oliver Carpenter, Infectious diseases, Nurse clinical practice educator 6 Breda Athanasopoulos, Infectious diseases, Senior matron lead high level isolation unit 7 Dr Tabitha Mahungu, Infectious diseases, Specialist registrar 8 Susan Coath, Infectious diseases, Ward sister 9 Zenaida Pandio, Domestic services, Housekeeper 10 Claire Harawa, Domestic services, Domestic team leader 11 Renato Pandio, Domestic services, Deep cleaner 12 Sheila Connolly, Patient environment, Head of patient environment 13 Peter Williams, Facilities, Security manager 14 Marchito Tumibay, Domestic services, Support worker 15 Michael Campo, Facilities, Porter 16 Lauren Geddes, Physiotherapy, Clinical lead cardiorespiratory care 17 Victoria Maddox, Laboratory service, Senior health care scientist 18 Nikki Williams, Infectious diseases, Ward sister 19 Dr Sanjay Bhagani, Infectious diseases, Consultant 20 Sarah Stanley, Patient at risk team, Nurse consultant 21 Dr Susan Hopkins, Infectious diseases and microbiology, Consultant 22 Torrain Exall, Physiotherapy, Clinical lead critical care 23 Dr Stephen Mepham, Infectious diseases and microbiology, Consultant 24 Dr Michael Jacobs, Infectious diseases, Consultant 25 Simon Rattenbury, Laboratory service, Head of laboratory service 26 Bryan O’Farrell, Pharmacy, Senior Pharmacist 27 Adrien Cooper, Estates, Director of estates 28 Robert Elliot-Cooke, Pharmacy, Senior pharmacist 29 Allan Harris, Estates, Engineering supervisor 30 Sumal Kuranaratne, Facilities, Support services manager 31 Dave Reavy, Facilities, Head of security and support services 32 Garba Ibrahim, Domestic services, Domestic team leader 33 Stephen King, Royal Free Charity, Head of finance
slide-50
SLIDE 50 50 1 Dr Rebecca Lester, Infectious diseases, Specialist registrar 2 Dr Damien Mack, Microbiology, Consultant 3 Dr Ruaridh Buchanan, Infectious diseases, Specialist registrar 4 Dr Simon Warren, Infectious diseases, Consultant 5 Oliver Carpenter, Infectious diseases, Nurse clinical practice educator 6 Breda Athanasopoulos, Infectious diseases, Senior matron lead high level isolation unit 7 Dr Tabitha Mahungu, Infectious diseases, Specialist registrar 8 Susan Coath, Infectious diseases, Ward sister 9 Zenaida Pandio, Domestic services, Housekeeper 10 Claire Harawa, Domestic services, Domestic team leader 11 Renato Pandio, Domestic services, Deep cleaner 12 Sheila Connolly, Patient environment, Head of patient environment 13 Peter Williams, Facilities, Security manager 14 Marchito Tumibay, Domestic services, Support worker 15 Michael Campo, Facilities, Porter 16 Lauren Geddes, Physiotherapy, Clinical lead cardiorespiratory care 17 Victoria Maddox, Laboratory service, Senior health care scientist 18 Nikki Williams, Infectious diseases, Ward sister 19 Dr Sanjay Bhagani, Infectious diseases, Consultant 20 Sarah Stanley, Patient at risk team, Nurse consultant 21 Dr Susan Hopkins, Infectious diseases and microbiology, Consultant 22 Torrain Exall, Physiotherapy, Clinical lead critical care 23 Dr Stephen Mepham, Infectious diseases and microbiology, Consultant 24 Dr Michael Jacobs, Infectious diseases, Consultant 25 Simon Rattenbury, Laboratory service, Head of laboratory service 26 Bryan O’Farrell, Pharmacy, Senior Pharmacist 27 Adrien Cooper, Estates, Director of estates 28 Robert Elliot-Cooke, Pharmacy, Senior pharmacist 29 Allan Harris, Estates, Engineering supervisor 30 Sumal Kuranaratne, Facilities, Support services manager 31 Dave Reavy, Facilities, Head of security and support services 32 Garba Ibrahim, Domestic services, Domestic team leader 33 Stephen King, Royal Free Charity, Head of finance
slide-51
SLIDE 51 51 1 Dr Rebecca Lester, Infectious diseases, Specialist registrar 2 Dr Damien Mack, Microbiology, Consultant 3 Dr Ruaridh Buchanan, Infectious diseases, Specialist registrar 4 Dr Simon Warren, Infectious diseases, Consultant 5 Oliver Carpenter, Infectious diseases, Nurse clinical practice educator 6 Breda Athanasopoulos, Infectious diseases, Senior matron lead high level isolation unit 7 Dr Tabitha Mahungu, Infectious diseases, Specialist registrar 8 Susan Coath, Infectious diseases, Ward sister 9 Zenaida Pandio, Domestic services, Housekeeper 10 Claire Harawa, Domestic services, Domestic team leader 11 Renato Pandio, Domestic services, Deep cleaner 12 Sheila Connolly, Patient environment, Head of patient environment 13 Peter Williams, Facilities, Security manager 14 Marchito Tumibay, Domestic services, Support worker 15 Michael Campo, Facilities, Porter 16 Lauren Geddes, Physiotherapy, Clinical lead cardiorespiratory care 17 Victoria Maddox, Laboratory service, Senior health care scientist 18 Nikki Williams, Infectious diseases, Ward sister 19 Dr Sanjay Bhagani, Infectious diseases, Consultant 20 Sarah Stanley, Patient at risk team, Nurse consultant 21 Dr Susan Hopkins, Infectious diseases and microbiology, Consultant 22 Torrain Exall, Physiotherapy, Clinical lead critical care 23 Dr Stephen Mepham, Infectious diseases and microbiology, Consultant 24 Dr Michael Jacobs, Infectious diseases, Consultant 25 Simon Rattenbury, Laboratory service, Head of laboratory service 26 Bryan O’Farrell, Pharmacy, Senior Pharmacist 27 Adrien Cooper, Estates, Director of estates 28 Robert Elliot-Cooke, Pharmacy, Senior pharmacist 29 Allan Harris, Estates, Engineering supervisor 30 Sumal Kuranaratne, Facilities, Support services manager 31 Dave Reavy, Facilities, Head of security and support services 32 Garba Ibrahim, Domestic services, Domestic team leader 33 Stephen King, Royal Free Charity, Head of finance
slide-52
SLIDE 52

“If you imagine all the functions a hospital has to have, not only the doctors and nurses and physiotherapists and pharmacists but estates management and food and facilities and laundry — they all have to be involved, and they all have to be specially trained to be safe to work in that environment. “

Dr Michael Jacobs - Consultant, infectious disease

52
slide-53
SLIDE 53

infectious diseases

53

lab services facilities domestic services physio micro biology estates pharmacy finance

Royal Free Hospital Capabilities

<other> <other>

slide-54
SLIDE 54

infectious diseases

54

Ebola treatment

slide-55
SLIDE 55 55

single purpose

cross-functional teams

focussed entirely on ‘customer’ outcome

slide-56
SLIDE 56 56

In our study at a large Australian Telco, we found that stories leaving a team cycled 12 times slower than those that stayed in the team.

slide-57
SLIDE 57 57

This is true for Trauma teams in hospitals And Formula 1 teams And “reinforced battle groups”

slide-58
SLIDE 58

A SOFTWARE EXISTENCE PROOF…

58
slide-59
SLIDE 59

develop- ment

59

testing architects

  • ps

PMO HR sales marketing finance

slide-60
SLIDE 60

x-func teams organised around lines of business

60
  • ps

HR sales marketing finance

slide-61
SLIDE 61

insurance company

slide-62
SLIDE 62

insurance company

slide-63
SLIDE 63

separate lines of business

home motor life

slide-64
SLIDE 64

separate lines of business

and cross-cutting capabilities home motor life my account

slide-65
SLIDE 65

cross-functional teams delivering lines of business

slide-66
SLIDE 66
slide-67
SLIDE 67

x-func teams organised around lines of business

67
  • ps

HR sales marketing finance

slide-68
SLIDE 68

x-func teams organised around lines of business

68
  • ps

HR sales marketing finance

slide-69
SLIDE 69

x-func teams organised around lines of business

69
  • ps

HR sales marketing finance

slide-70
SLIDE 70
slide-71
SLIDE 71 71
slide-72
SLIDE 72 72

DEVOPS!!!

Well, continuous delivery…

slide-73
SLIDE 73

x-func teams organised around lines of business

73
  • ps

HR sales marketing finance

slide-74
SLIDE 74 74
  • ps

HR sales marketing finance Continuous Delivery

slide-75
SLIDE 75

Continuous Delivery

75

HR sales marketing finance

slide-76
SLIDE 76

each of these capabilities can be tested and deployed independently

and cross-cutting capabilities home motor life my account

slide-77
SLIDE 77 77

CAN WE GO FURTHER?

“If you imagine all the functions a hospital has to have, not only the doctors and nurses and physiotherapists and pharmacists but estates management and food and facilities and laundry — they all have to be involved, and they all have to be specially trained to be safe to work in that environment. “

Dr Michael Jacobs - Consultant, infectious disease

slide-78
SLIDE 78

Continuous Delivery

78

HR sales marketing finance

slide-79
SLIDE 79 79

teams

slide-80
SLIDE 80 80

Value streams

slide-81
SLIDE 81 81

Lines of business

slide-82
SLIDE 82

USER SERVICE

each team owns one or more services how many depends on your requirements

slide-83
SLIDE 83 83

~160-200 ~10-15

multiples thereof

slide-84
SLIDE 84 84

Thomas J. Allen, 1977

slide-85
SLIDE 85 85 10 20 30 40 50 60 70 80 90 100 0.05 0.10 0.15 0.20 0.25 0.30 m Probability of weekly interaction

x x x x x xxxxxxxx x x x x x x x x

The effect of distance on communication

slide-86
SLIDE 86 86

co-locate as much as possible

take advantage of serendipitous conversations

slide-87
SLIDE 87

as you chunk up from team to value stream to line of business to organisation, Conways Law acts to preserve low-coupling and high cohesion and you can use different practices at those boundaries

slide-88
SLIDE 88 88

The “chunking up from microservices to teams to value streams to lines of business to

  • rganisations" practice onion*

*I might need a better name for this

slide-89
SLIDE 89 89

Low change rate

inter-line of business / company

High stability Semantic Versioning Contract Testing Tolerant Reader “Conversational change”

slide-90
SLIDE 90 90

higher change rate

inter-value stream

lower stability Semantic Versioning Contract Testing Tolerant Reader “Conversational change”

slide-91
SLIDE 91 91

higher change rate

inter-team

lower stability Semantic Versioning Contract Testing Tolerant Reader “Conversational change”

slide-92
SLIDE 92 92

highest change rate

intra-team

lowest stability Semantic Versioning Contract Testing Tolerant Reader “Conversational change”

slide-93
SLIDE 93 93

https://www.flickr.com/photos/snippets101/2686592689/ https://creativecommons.org/licenses/by-nd/2.0/

Thoughts to finish

slide-94
SLIDE 94
  • rganised around business capabilities

componentisation via services products not projects smart endpoints and dumb pipes decentralised governance decentralised data management infrastructure automation evolutionary design designed for failure

successfully adopting the microservice style of architecture requires more than just componentisation via services

slide-95
SLIDE 95

CONWAY’S LAW SENDS US SIGNALS

constantly ordering work across capabilities splitting stories between teams moving people around deploying in lock-step fan-in for end-to-end testing

95

THERE IS A HIGH COST ASSOCIATED WITH WORK LEAVING YOUR TEAM

raising tickets with the “platform team” handing off work to other departments constantly starting and stopping projects

slide-96
SLIDE 96 96

The Inverse Conway Manoeuvre

Design the organisation you want, the architecture will follow (kicking and screaming).

Evan Bottcher, ThoughtWorks

slide-97
SLIDE 97 97

thanks!

slide-98
SLIDE 98

FSM: Sarah Pierce. albinobloodsugar.deviantart.com ebola virus: CDC/Cynthia Goldsmith - Public Health Image Library, #10816 Jez Humble face - Release! the game - https://inedo.com/release