Monolith -> Services: Theory & Practice

Structured Design, Yourdon & Constantine
  1. The cost of software is ≈ the cost of changing the software.
  2. The cost of changing the software is ≈ the cost of the expensive changes (power laws and all that).
  3. The cost of the expensive changes is generated by cascading changes — if I change this then I have to change that and that, and if I change that then…
  4. Coupling between elements of a design is this propensity for a change to propagate.
  5. So, design ≈ cost ≈ change ≈ big change ≈ coupling. Transitively, software design ≈ managing coupling.

Managing Coupling

Note I don’t say, “Eliminating coupling.” Decoupling comes with its own costs, both the cost of the decoupling itself and the future costs of unanticipated changes. The more perfectly a design is adapted to one set of changes, the more likely it is to be blind-sided by novel changes. And so we have the classic tradeoff curve:

  • Reduce coupling’s scope. If changing one element implies changing ten others, then it’s better if those elements are together than if they are scattered all over the system —less to navigate, less to examine, less to test. The number of elements to change is the same, but the cost per change is smaller. (This is also known as the “manure in one pile” principle, or less-aromatically “cohesion”.)

Not Quickly

Two factors prevent de-coupling quickly:

  • Knowledge

Good News

How can you quickly decompose a monolith into micro-services? You can’t because you need to learn how and you need to learn what. The good news is that you don’t have to quickly decompose a monolith into micro-services to quickly get some of the benefits you seek.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kent Beck

Kent Beck


Kent is a long-time programmer who also sings, plays guitar, plays poker, and makes cheese. He works at Gusto, the small business people platform.