Top Banner
Conway’s revenge How ignoring org setup backfires in architecture, and vice versa
77

Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Feb 21, 2017

Download

Technology

LatCraft
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Conway’s revenge

How ignoring org setup

backfires in architecture,

and vice versa

Page 2: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How do you keep quality

in 1-man project?

Test Driven Development?Following best practices?Not being stupid?

Page 3: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How do you keep quality

in 1-man project?

Self-discipline

Page 4: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How do you keep quality

in a 1 team project?

Simple: hire only smart people!

Page 5: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How do you keep quality

in a 1 team project?

So smart engineers will come to the same conclusions, right?

Page 6: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How do you keep quality

in a 1 team project?

So smart engineers will come to the same conclusions, right?

Page 7: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

But when we agree on unifying, it will be alright. How do you

keep quality in a 1 team

project?

Page 8: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

USB: UNIVERSAL Service Bus

How do you keep quality

in a 1 team project?

Page 9: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

USB: UNIVERSAL Service Bus

How do you keep quality

in a 1 team project?

Page 10: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How do you keep quality

in a 1 team project?

How was this problem being solved before?Siloses, jars, maven/gradle modules

Page 11: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How do you keep quality

in a 1 team project?

Problems:truck factor = 1final solution looks like this

Page 12: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How do you keep quality

in a 1 team project?

Current solutions

Pull requests + code reviewPair programmingSharing good practicesMentoring

Page 13: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Self-disciplineTeam-disciplineLast resort: EnforcementHow do you

keep quality in a 1 team

project?

Page 14: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How do you keep quality

in a 50 people

project?

Page 15: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How do you keep quality

in a 50 people

project?

Discipline?

Page 16: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How do you keep quality

in a 50 people

project?

Discipline?In a creative, passionate crowd?Have you ever seen a rock concert?

Page 17: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How do you keep quality

in a 50 people

project?

Engineers be like:Static code analysis? Pipeline + Sonar?Inquisition!Purge the heretics!

Page 18: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How do you keep quality

in a 50 people

project?

Managers be like:Laws, rules, committees, permission control. Control! Moar control! MOAR!!1!

Page 19: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How do you keep quality

in a 50 people

project?

Productivity and creativityrequires freedom

Fine balance between chaos and order

Page 20: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How do you keep quality

in a 50 people

project?

Solutions so far:Shared responsibility Education & MentoringCorporate...

Page 21: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How do you keep quality

in a 50 people

project?

Solutions so far:Shared responsibility Education & MentoringCorporate… Hacker...

Page 22: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How do you keep quality

in a 50 people

project?

What they had in common was mainly love of excellence and programming. They wanted to make their programs that they used be as good as they could. [Richard Stallman explains about hackers who program]

Page 23: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How do you keep quality

in a 50 people

project?

Culture is hard to make rightHackers hate corporationsHackers like freedom

Page 24: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How to solve people’s

problem with technology?

Page 25: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How to solve people’s

problem with technology?

Page 26: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How to solve people’s

problem with technology?

Page 27: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How to solve people’s

problem with technology?

Requires:DevOps as in “developers operating their systems in production”Distributed monitoringDistributed securityGood knowledge of distributed systems, CAP theorem, etc.Lots of infrastructure setup, code, libs...

Page 28: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How to solve people’s

problem with technology?

But it’s mostly a technical problemDevelopers are good at solving technical problems

Page 29: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

How to solve people’s

problem with technology?

Page 30: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Let’s see where we can fail

Page 31: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

1Too many products

Page 32: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Orchestration

You have a distributed system (eCommerce) that has to go from single product for single country, into 5 slightly different products for 20 slightly different countries (5x20 matrix)

How do you do it?

Page 33: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Orchestration

Page 34: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Orchestration

Options:1. Country/product specific

modules per microservice

Page 35: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Orchestration

Country/product specific modules per microservice

Page 36: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Modules

If you have country/product specific modules per microservice

If this service grows (lots of country/product specific features) it will become the new monolith.

Difficult to maintain.

Page 37: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Modules

Except not really, because you can have self-discipline/quality as long as you only have one team for that service

But what if requirements grow so much, that you need to add more teams to it? Then it’s a mess again

Page 38: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Orchestration

Options:1. Country/product specific

modules per microservice2. Proxy-microservice in front,

with country/product specific logic

Page 39: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Proxy-microservice, with country/product specific logic

Page 40: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Proxy

If you have proxy-microservice in front, with country/product specific logic

It may not always be possible (proxy transforms input/output data), and you may need to write a new instance of a microservice, just to change a few things inside

And hundreds of services are hard to maintain

Page 41: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Orchestration

Options:1. Country/product specific

modules per microservice2. Proxy-microservice in front,

with country/product specific logic

3. One orchestration service to rule country/product flow, services sharing many entry points

Page 42: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

One orchestration service to rule country/product flow, services sharing many entry points

Page 43: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Orchestration

If you have an orchestration service, either:

There is a team responsible for it, therefore creating a huge bottleneck (everybody waits for them)

Nobody is responsible for it, therefore it’s a total mess, impossible to maintain

Page 44: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Conclusion

If for each of your services you choose between modules and proxies, you will- stay within reasonable

number of services- not copy&paste to change 2

lines of a service inside- not use modules, when the

service has a chance of growing to >1 teams

Page 45: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Conclusion

Orchestration, however, is the worst solution for this company

Because of lack of ownership/self-discipline

Page 46: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Conclusion

Unless every team has one guy from this project(2D team system)

But that complicates a lot and is risky (may not work in the long run). Is it worth it?

Page 47: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

2Cool

technologies, boring people

Page 48: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

People on the market

Scala + Akka

So you want a cool technologySmall country~100 Scala developers~30 Akka developersCan get ~10% from the marketBusiness success, needs to hire ~30 devs

Page 49: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

People on the market

Scala + Akka

Options:- accept slowing down, recruit

juniors, train them- become a 100% remote

working company (big culture change)

- remove Akka, drop Scala

Page 50: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

People on the market

Scala + Akka

Accept slowing down, recruit juniors, train themManagement doesn’t want to slow down

Become a 100% remote working company (big culture change)Management doesn’t trust developers enough

Remove Akka, drop ScalaManagement doesn’t give a fuck

Page 51: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

People on the market

Scala + Akka

Lesson:

Ignore management, organization, structure, and your architecture will perish

Page 52: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

3Cool people,

boring technologies

Page 53: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

People on the market

Delphi

Year 2003. Business analyzes local University. They still teach Turbo Pascal

Enterprise architects + management decide to build new platform with Delphi (Object Pascal) because it’s close to what is at the University

Page 54: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

People on the market

Delphi

They chose Kylix (Linux version)

Good business - Linux: free- Students: almost free, educated- Borland Kylix: cheap

Page 55: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

People on the market

Delphi

Students were learning Turbo Pascal, because the University had old teachers, that couldn’t teach anything else.

In 2003 not a single developer would like to work in Kylix

Students treated this job as a start to go somewhere else

Page 56: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

EnterpriseService

Bus

An architect wanted to introduce ESB in 2014, for internal distributed system

3 months later, his team rebelled

Page 57: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

People on the market

Delphi

Lessons:

Ignore fashion, needs of developers, and you will end up without developers

Page 58: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

4How much

abuse can your architecture

take?

Page 59: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Resistant architecture

DDD + CQRS, for clean design

Company hires lots of new devs

Big ball of mud (all entities have relation to each other, no boundaries)

Page 60: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Resistant architecture

Does your architecture fit the people who are going to use it?

How do you communicate constraints?

How do you verify you architecture?

Page 61: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Resistant architecture

Integration Tests for architectureVeripacksSeparate modulesSeparate DBs for bounded contextsMake it hard to break architectureWiki, documentation

Page 62: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

5Two styles of management

Page 63: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Two style of management

How do sell your microservice architecture to management?

Page 64: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Two style of management

“I’ve also noticed that different countries and cultures place different values on control.

Some (e.g. the UK) value control and the restraint that it brings whereas others (e.g. Scandinavia)value empowerment and motivation.”

[Software Architecture for Developers; Simon Brown; Leanpub 2014]

Page 65: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Two style of management

For Scandinavia:- emphasise productivity- invest in tools to get people

up to speed- get to production fast- show how much devs like this

architecture

Page 66: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Two style of management

For UK: - create a service visualization

tool (who talks with whom)- emphasise control, and

visibility- create a reporting service- get metrics working first- use magic word: SOA

(English people love three letter acronyms)

Page 67: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

6Why big

systems go bad

Conway’s Rationale

Page 68: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

1Managers realize the system will be large, so they throw too many people at the design

Page 69: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

2many people = too many communication paths = zero productivity

so organizations limit communication by creating design subgroups

Page 70: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

3

large organization can understand only tree structure with single superior + 7 subordinates.

so design subgroups are organized this way

this limits communication channels to this structure, hence: miscommunication

Page 71: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

4relationship between the graph structure of a design organization and the graph structure of the system it designs is 1:1

Page 72: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

5so the final design also has the wrong structure, and is build on miscommunication

Page 73: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Conclusion

Page 74: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Conclusion

Look at your architecture from communication perspective

Will communication be efficient?

Can your organization handle this architecture?

Page 75: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Conclusion

Even big systems should be designed only in a small group

What a small group cannot handle, a big one will fuck up even more

Page 76: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Conclusion

Design architecture AND organization

World has no boundariesBoundaries are in our mindsAll systems are connectedAll systems interact

And read Conway’s paper:http://www.melconway.com/Home/Committees_Paper.html

Page 77: Conway’s Revenge: How ignoring org setup backfires in architecture, and vice versa

Thanks!

[email protected]@jnabrdaliksolidcraft.eu