How to break apart a monolithic system safely without destroying your team - talk at Velocity Eu Amsterdam on 7 Nov 2016
You'll learn some team-first heuristics to use when decomposing large or monolithic software into smaller pieces.
http://conferences.oreilly.com/velocity/devops-web-performance-eu/public/schedule/detail/52879
Teams and monoliths - Matthew Skelton - Velocity EU 2016
1. How to break apart a
monolithic system safely
without destroying your team
Matthew Skelton, Skelton Thatcher Consulting
@matthewpskelton
07 November 2016, Amsterdam, NL - #velocityconf
2. Today
Cognitive load for teams
‘Monolith’
Code Forensics
Team-first boundaries
Monolith-splitting recipe
15. “organizations which design
systems ... are constrained to
produce designs which are copies
of the communication structures of
these organizations”
– Mel Conway, 1968
http://www.melconway.com/Home/Conways_Law.html
25. Science since 1988 (!)
• Driskell et al, 1999 ‘Does Stress Lead to a Loss of Team Perspective?’ Group Dynamics:
Theory, Research, and Practice 3, no. 4 (1999): 291.
• Fan et al, 2010 ‘Learning HMM-Based Cognitive Load Models for Supporting Human-Agent
Teamwork’. Cognitive Systems Research 11, no. 1 (2010): 108–119.
• Ilgen & Hollenbeck, 1993 ‘Effective Team Performance under Stress and Normal Conditions:
An Experimental Paradigm, Theory and Data for Studying Team Decision Making in
Hierarchical Teams with Distributed Expertise’. DTIC Document, 1993.
• Johnston et al, 2002 ‘Application of Cognitive Load Theory to Developing a Measure of Team
Decision Efficiency’. DTIC Document, 2002.
• Sweller, John, 1994 ‘Cognitive Load Theory, Learning Difficulty, and Instructional Design’.
Learning and Instruction 4 (1994): 295–312.
• Sweller, John, 1988. ‘Cognitive Load during Problem Solving: Effects on Learning’. Cognitive
Science 12, no. 2 (1988): 257–285.
26. “stress impacts team
performance … by narrowing
or weakening the team-level
perspective required for
effective team behavior.”
– Driskell et al, 1999
Group Dynamics: Theory, Research, and Practice 1999, Vol. 3, No. 4,291-302
30. “Don’t start with a monolith
when your goal is a
microservices architecture”
– Stefan Tilkov, innoQ
http://martinfowler.com/articles/dont-start-monolith.html
31. “Start monolithic and extract”
– Tammer Saleh, Pivotal
https://www.infoq.com/presentations/cloud-anti-patterns
35. Joined at
the DB
Difficult to change
separately (but not
impossible)
Risk is (probably)
elevated
Chris Collyer, http://www.stone-circles.org.uk/stone/pentreifan.htm
39. Dangers of splitting a
monolith
•Reduced domain consistency
•Data duplication (unintentional)
•Additional operational complexity due to
distributed system and async messaging
•Degraded UX across the product
40.
41.
42.
43. Splitting a
monolith
Reiner Flassig - CC BY-SA 2.0 de - Wikipedia
Choose the right
technique for splitting
Understand the nature
of the monolith
44.
45. ‘Fracture planes’ for code
•Business domain bounded context
•Regulatory compliance
•Change cadence
•Risk
•Performance isolation
•User personas
•Team location
62. Code repositories
Repo 1 Build Test Deploy Run
Repo 2 Build Test Deploy Run
Repo 3 Build Test Deploy Run
63. “You can use a monorepo only if
your organisation has published a
scientific paper on Computer
Science. Otherwise, use one repo
per deployable runnable thing.”
– Matthew Skelton
LondonCD meetup group, 11 Oct 2016
64. Find natural or available
‘fracture planes’ for splitting
a monolith
(with the team in mind)
84. Optimise split for team
engagement & personas
Minimise ISO 27001 footprint
Aided organisation expansion
85. When not to split a monolith
•‘Heritage’ ERP system (‘cloudified’)
•No native Unit Test framework
•20-30 min startup times
•VMs need 56GB RAM (yes)
•CI builds take 50 mins
87. Monolith-splitting recipe
1. Instrument the monolith – logging
2. Grok data flows and fault responses
3. Align teams to available segments
4. Split off segments one-by-one
97. use logging as a
channel/vector to
make distributed systems
more testable
use logging as a
channel/vector to
make distributed systems
more testable
109. Team needs / responsibilities /
capabilities come first
110. use logging as a
channel/vector to
make distributed systems
more testable
Invest in
Build & Release Engineering
111.
112. Monolith-splitting recipe *
1. Instrument the monolith – logging
2. Grok data flows and fault responses
3. Align teams to available segments
4. Split off segments one-by-one
(5. Invest in Build & Release Engineering)
* The simplistic version
113. Monolith-splitting recipe *
1. Instrument
2. Grok behaviour
3. Align teams
4. Split off segments
5. Invest in Build & Release
* The simplistic version
114. Monolith-splitting recipe *
* The simplistic version
1. Instrument
2. Grok behaviour
3. Align teams
4. Split off segments
5. Invest in Build & Release
115. Determine monolith type
(Apply ‘Code Forensics’)
Find ‘fracture planes’
Assess cognitive load for teams
Use the monolith-splitting recipe
How to break apart a
monolithic system safely
without destroying your team
118. Books & articles
• Working Effectively with Legacy Code, by Michael Feathers
• Building Microservices by Sam Newman (O’Reilly, 2015)
• Managing Cognitive Load for Team Learning by Jo Pearce
http://12devsofxmas.co.uk/2015/12/day-3-managing-cognitive-load-
for-team-learning/
• Continuous Delivery with Windows and .NET by Matthew Skelton and
Chris O’Dell (O’Reilly, 2016) http://cdwithwindows.net/
• Team Guide to Software Operability by Matthew Skelton and Rob
Thatcher (Skelton Thatcher Publications, 2016)
http://operabilitybook.com/
• Ye Olde Monolith by Pter Pilgrim https://dzone.com/articles/ye-olde-
monolith
119. Training
• From Monolith to Microservices (online training) – Sam Newman,
author of Building Microservices
http://www.oreilly.com/live-training/from-monolith-to-
microservices.html
• Run Book template & Run Book dialogue sheets
http://runbooktemplate.info/
120. Talks & slides
• Hacking Your Head – Managing Information Overload, by Jo
Pearce - http://www.slideshare.net/JoPearce5/hacking-your-
head-managing-information-overload-45-mix /
http://conferences.oreilly.com/oscon/open-source-
eu/public/schedule/detail/53013
• Principles of Microservices by Sam Newman @ Devoxx 2015
https://www.youtube.com/watch?v=PFQnNFe27kU
121. Research papers
• Driskell, James E., Eduardo Salas, and Joan Johnston. ‘Does Stress Lead to a Loss of Team
Perspective?’ Group Dynamics: Theory, Research, and Practice 3, no. 4 (1999): 291.
• Fan, Xiaocong, Po-Chun Chen, and John Yen. ‘Learning HMM-Based Cognitive Load Models for
Supporting Human-Agent Teamwork’. Cognitive Systems Research 11, no. 1 (2010): 108–119.
• Ilgen, Daniel R., and John R. Hollenbeck. ‘Effective Team Performance under Stress and Normal
Conditions: An Experimental Paradigm, Theory and Data for Studying Team Decision Making in
Hierarchical Teams with Distributed Expertise’. DTIC Document, 1993.
http://oai.dtic.mil/oai/oai?verb=getRecord&metadataPrefix=html&identifier=ADA284683.
• Johnston, Joan H., Stephen M. Fiore, Carol Paris, and C. A. Smith. ‘Application of Cognitive Load Theory
to Developing a Measure of Team Decision Efficiency’. DTIC Document, 2002.
http://oai.dtic.mil/oai/oai?verb=getRecord&metadataPrefix=html&identifier=ADA525820.
• Sweller, John. ‘Cognitive Load Theory, Learning Difficulty, and Instructional Design’. Learning and
Instruction 4 (1994): 295–312.
• Sweller, John. ‘Cognitive Load during Problem Solving: Effects on Learning’. Cognitive Science 12, no. 2
(1988): 257–285.
122. Determine monolith type
(Apply ‘Code Forensics’)
Find ‘fracture planes’
Assess cognitive load for teams
Use the monolith-splitting recipe
How to break apart a
monolithic system safely
without destroying your team