Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Teams and monoliths - Matthew Skelton - Agile in the City Bristol 2016

581 views

Published on

Moving from a monolith to microservices can be daunting. How do we choose the right bounded contexts? How small should services be? Which teams should get which services? And how do we keep things from falling apart?

By starting with the needs of the team, we can infer some useful heuristics for evolving from a monolithic architecture to a set of more loosely coupled services.

Published in: Software
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Teams and monoliths - Matthew Skelton - Agile in the City Bristol 2016

  1. 1. How to break apart a monolithic system safely without destroying your team Matthew Skelton, Skelton Thatcher Consulting @matthewpskelton 04 Nov 2016, Bristol, UK - #agilecitybrs
  2. 2. Today Cognitive load for teams ‘Monolith’ Code Forensics Team-first boundaries Monolith-splitting recipe
  3. 3. For now, let’s forget: Microservices CQRS / Event Sourcing Queues (Architectural changes)
  4. 4. Continuous Delivery / etc… 30+ organisations UK, US, EU, India, China
  5. 5. How to break apart a monolithic system safely without destroying your team
  6. 6. Safer, more rapid changes to software systems (Business Agility)
  7. 7. A ‘team-first’ approach to software subsystem boundaries
  8. 8. TEAM
  9. 9. TEAM capabilities appetite & aptitude understanding responsibilities
  10. 10. (assumption) the team is stable, slowly changing, and long-lived #NoProjects
  11. 11. Conway’s Law
  12. 12. “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
  13. 13. Front-end developers Back-end developers
  14. 14. ‘Reverse Conway’ Tobbe Gyllebring (@drunkcod)
  15. 15. homomorphic force (#Conway  #Yawnoc) HT @allankellynet (same) (shape)
  16. 16. Cognitive load for teams
  17. 17. Cognitive load the total amount of mental effort being used in the working memory (see Sweller, 1988)
  18. 18. Cognitive load Intrinsic Extraneous (Irrelevant ) Germane (Relevant)
  19. 19. ‘Hacking Your Head’: Jo Pearce See http://www.slideshare.net/JoPearce5/hacking-your-head-managing-information-overload-45-mix @jdpearce
  20. 20. We have SCIENCE!
  21. 21. 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.
  22. 22. “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
  23. 23. (not just ‘pop’ science!)
  24. 24. ‘Monolith’
  25. 25. monolith μόνο λίθος “single stone” Reiner Flassig - CC BY-SA 2.0 de - Wikipedia
  26. 26. “Don’t start with a monolith when your goal is a microservices architecture” – Stefan Tilkov, innoQ http://martinfowler.com/articles/dont-start-monolith.html
  27. 27. “Start monolithic and extract” – Tammer Saleh, Pivotal https://www.infoq.com/presentations/cloud-anti-patterns
  28. 28. A ‘team-first’ approach to software subsystem boundaries
  29. 29. Types of software monoliths •Application monolith •Joined at the DB •Monolithic build (rebuild everything) •Monolithic releases (coupled) •Monolithic thinking (standardisation)
  30. 30. Application monolith Single block of code Deployed as a unit
  31. 31. 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
  32. 32. Monolithic builds One gigantic CI build just to get a new version of any component
  33. 33. Monolithic releases Smaller components bundled together into a ‘release’
  34. 34. Monolithic thinking ‘One-size-fits-all’ for teams Assumption that minimising variation is A Good Thing
  35. 35. 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
  36. 36. Splitting a monolith Reiner Flassig - CC BY-SA 2.0 de - Wikipedia Choose the right technique for splitting Understand the nature of the monolith
  37. 37. ‘Fracture planes’ for code •Business domain bounded context •Regulatory compliance •Change cadence •Risk •Performance isolation •User personas •Team location
  38. 38. ‘Fracture planes’ for code Ask: Could we consume this thing as a service?
  39. 39. ‘Fracture planes’ for code Ask: Could we provide this thing as a service?
  40. 40. Code Forensics
  41. 41. Forensics Your Code as a Crime Scene Adam Tornhill
  42. 42. Adam Tornhill Code, Crime, Complexity: Analyzing software with forensic psychology Adam Tornhill TEDxTrondheim youtube.com/watch?v=qJ_hplxTYJw
  43. 43. ‘Code Maat’ tool
  44. 44. Adam Tornhill, http://www.adamtornhill.com/articles/crimescene/codeascrimescene.htm Code City plus Code Maat forensics
  45. 45. Beware of badly-named subsystems
  46. 46. "information-poor abstract names are magnets for extra [unwanted] responsibilities" – Adam Tornhill p.185, Your Code as a Crime Scene
  47. 47. Team-first boundaries
  48. 48. DevOpsTopologies.com
  49. 49. Team types Component team Platform / ’substrate’ team Supporting / ‘productivity’ team Product/Feature team
  50. 50. Team types devopstopologies.com Platform / ’substrate’ team Product/Feature team
  51. 51. Team types devopstopologies.com Component team Platform / ’substrate’ team Product/Feature team
  52. 52. Team types devopstopologies.com Component team Platform / ’substrate’ team Product/Feature team Supporting / ‘productivity’ team
  53. 53. Code repositories Align repositories to subsystem boundaries Avoid monolithic-y repos like TFS* * Don’t get me started on TFS, grrr…
  54. 54. Code repositories Repo 1 Build Test Deploy Run Repo 2 Build Test Deploy Run Repo 3 Build Test Deploy Run
  55. 55. “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 
  56. 56. Find natural or available ‘fracture planes’ for splitting a monolith (with the team in mind)
  57. 57. Industry experience Examples from recent work with clients Different monoliths Different ‘fracture planes’
  58. 58. Software for R&D teams Customers: over 80% of top 20 global pharma companies
  59. 59. 2014: Monolithic: builds, releases Pharma GxP: traceability Changes slow and tricky
  60. 60. Fracture plane: business domain
  61. 61. Fracture plane: technology
  62. 62. Compose with packages Logging for insights Technology splits Improved traceability
  63. 63. Major UK broadcaster (TV + online) Increasing digital delivery of content
  64. 64. 2014: Wide mix of technologies Need for visibility of changes Need for rapid turnaround
  65. 65. Fracture planes: read-only, location & cadence
  66. 66. Split off Reporting (read-only) Split on change cadence Increased change throughput
  67. 67. UK’s second largest credit reference agency Customers: major banks + large orgs
  68. 68. 2014: 6-weekly monolithic release Outage-sensitive customers
  69. 69. Fracture planes: risk & business domain
  70. 70. Split releases based on risk Align teams to value streams More rapid release cadence
  71. 71. Software for Internal Comms Customers: FTSE 100 & Fortune 1000
  72. 72. 2015: Successful system (monolithic) ISO 27001 compliance Aim to expand the org (x N)
  73. 73. Fracture plane: business domain
  74. 74. Optimise split for team engagement & personas Minimise ISO 27001 footprint Aided organisation expansion
  75. 75. 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
  76. 76. Monolith-splitting recipe Tried and tested!
  77. 77. How to break apart a monolith without destroying your team 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
  78. 78. Instrument the monolith
  79. 79. Instrument the monolith
  80. 80. Instrument the monolith
  81. 81. search by event Event ID {Delivered, InTransit, Arrived}
  82. 82. transaction trace Correlation ID 612999958…
  83. 83. Technical Domain public enum EventID { // Badly-initialised logging data NotSet = 0, // An unrecognised event has occurred UnexpectedError = 10000, ApplicationStarted = 20000, ApplicationShutdownNoticeReceived = 20001, PageGenerationStarted = 30000, PageGenerationCompleted = 30001, MessageQueued = 40000, MessagePeeked = 40001, BasketItemAdded = 60001, BasketItemRemoved = 60002, CreditCardDetailsSubmitted = 70001, // ... }
  84. 84. BasketItemAdded = 60001 BasketItemRemoved = 60002
  85. 85. Instrument the monolith Correlation ID Logs Event ID
  86. 86. use logging as a channel/vector to make distributed systems more testable use logging as a channel/vector to make distributed systems more testable
  87. 87. Grok data flows and fault responses
  88. 88. Grok data flows and fault responses Correlation ID Event ID Unexpected collaborating subsystems Undetected fault condition
  89. 89. Grok data flows and fault responses Correlation ID Event ID Adjust subsystem boundaries Fix poor fault responses
  90. 90. runbooktemplate.info Run Book dialogue sheets
  91. 91. Align teams to available segments
  92. 92. Align teams to available segments
  93. 93. Align teams to available segments Map to business domain
  94. 94. Align teams to available segments Identify likely components or ‘platform’ elements
  95. 95. Split off segments one-by-one
  96. 96. Split off segments one-by-one
  97. 97. Split off segments one-by-one Separate: - Builds - Infrastructure - Deployments - Versions - Lifecycle
  98. 98. Team needs / responsibilities / capabilities come first
  99. 99. use logging as a channel/vector to make distributed systems more testable Invest in Build & Release Engineering
  100. 100. How to break apart a monolith without destroying your team* 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
  101. 101. How to break apart a monolith without destroying your team* 1. Instrument 2. Grok behaviour 3. Align teams 4. Split off segments 5. Invest in Build & Release * The simplistic version
  102. 102. How to break apart a monolith without destroying your team* * The simplistic version 1. Instrument 2. Grok behaviour 3. Align teams 4. Split off segments 5. Invest in Build & Release
  103. 103. Further material
  104. 104. 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)
  105. 105. Training • From Monolith to Microservices (online training) – Sam Newman, author of Building Microservices http://www.oreilly.com/live-training/from-monolith-to- microservices.html
  106. 106. 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
  107. 107. 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.
  108. 108. thank you Matthew Skelton @matthewpskelton skeltonthatcher.com

×