SlideShare a Scribd company logo
Michael T. Nygard
@mtnygard
This Photo by Unknown Author is licensed under CC BY-NC
This Photo by Unknown Author is licensed under CC BY-SA
This Photo by Unknown Author is licensed under CC BY-SA
UI
Domain
Persistence
Application
Users Orders Suppliers Finance
Users Orders Suppliers Finance
Users Orders Suppliers Finance
Monitoring
Logging
Authn/Authz
Context
A large system that requires decomposition.
Mix of high-level and low-level concerns
Several operations are at the same level of abstraction
Layers POSA 1
Solution
Therefore, structure your system into an appropriate number of layers and place them
on top of each other.— Buschmann, et. al., Pattern Oriented Software Architecture,
Vol 1.
Each layer should have a narrow, well-specified interface. It should be possible to
substitute a different implementation of the layer without change to higher layers in the
stack.
• Forces
• Late changes should have limited ripple effect
• Interfaces should be stable, may be standardized
• Parts should be interchangeable
• Other systems may reuse lower layers
• Responsibilities should be grouped for
comprehension and maintainability
• Further decomposition is needed for team structure
and design.
Example: TCP stack Failed example: Ruby on Rails
Question: What makes a better or worse implementation of layers?
Layer 1
1.1 1.2 1.3
Layer 2
2.1 2.2
Layer 3
3.1 3.2 3.3
<<uses>>
http://www.michaelnygard.com/blog/2015/07/the-fear-cycle/
▪No limits to effect of bad code
▪Common-mode failures in shared code
▪Latent semantic coupling
▪Poor monitoring
▪Poor retry / timeout handling
▪Disruptive deployments
▪ My experience: 2 out of 3 such projects will not
succeed.
▪ The killers:
▪ Impatience
▪ Unrealistic expectations
▪ Hubris
▪ Premise
▪ Refactor to create interfaces between subdomains, then turn those into HTTP interfaces
▪ Failure modes:
1. It takes too long. Executive impatience will defeat the plan.
2. Ongoing feature work introduces new dependencies faster than they are removed.
▪ Tempting to make your key domain objects into services.
▪ Makes deployments more disruptive
▪ Creates common dependency from many features to the entity services.
▪ Premise
▪ Keep developer utilization high by drawing them from a pool for the duration of a project.
▪ When the project is done, throw the developers back into the pool.
▪ Failure modes:
1. Project-orientation favors deadlines over code health & architecture initiatives.
2. Developers doing the hard work of refactoring should be able to enjoy the fruit of their
efforts.
▪ Instead:
1. Use product teams
▪ Premise:
▪ We know the domain, let’s design new services that leave the past behind.
▪ Reality:
▪ We make the same mistakes over and over.
▪ “Second system effect”
▪ Designers’ optimism not supported by any past evidence
▪ Instead:
▪ Design in context.
▪ Accept the scars of the past.
▪ Premise:
▪ Create an intercepting proxy that can divert some kinds of traffic to one new service at a
time.
▪ Reality:
▪ Sometimes works
▪ However, you will not like the service design.
▪ Services must be designed expediently and in the context of the current system’s interaction
▪ That’s OK, they can be replaced easier after the first effort.
▪ Premise:
▪ The current system works.
▪ Devs know what’s needed in their own areas
▪ But are afraid of the far-distant effects of their changes
▪ Response:
▪ Break into “product” teams
▪ Give each one a copy of the code
▪ Let them delete anything they don’t need.
▪ Reality:
▪ Coupling via the DB lasts a long time
▪ Services will be larger than desired
▪ Premise
▪ Microservices are never “done”
▪ Keep the pressure on simplifying design
▪ Reality
▪ Devs are often uncomfortable with ambiguity
▪ Deleting services & code that were just barely deployed feels “wrong”
▪ Premise
▪ Objects with long lifespans that serve multiple uses are hard to change
▪ Therefore, find major boundaries in the business process
▪ Make the “before” and “after” portions into separate services
▪ Reality
▪ Addresses consistency better than entity services
▪ Supports converging business processes
▪ Not as easy to support divergence
▪ Premise
▪ Domain objects make good representations to transfer in APIs
▪ An API can be expressed as REST on domain objects.
▪ Reality
▪ Makes it very difficult to handle multiple versions of APIs
▪ Leaks implementation detail & internals of the service
▪ Instead
▪ Treat request data as data
▪ At most, map into object that represent the interface itself
▪ Premise
▪ Hexagonal architecture expresses the domain independently of integration & persistence
tech
▪ Reality
▪ Improved testability
▪ Smaller domain
▪ Better support for monitoring, metrics, and ALM
Michael Nygard (@mtnygard)

More Related Content

What's hot

Modernismo en venezuela
Modernismo en venezuelaModernismo en venezuela
Modernismo en venezuela
Tony Maldonado
 
Ciudades antiguas
Ciudades antiguasCiudades antiguas
Ciudades antiguas
itc2018
 
As Cruzadas
As CruzadasAs Cruzadas
As Cruzadas
João Medeiros
 
Resumen mercados de trajano elena martinez
Resumen mercados de trajano elena martinezResumen mercados de trajano elena martinez
Resumen mercados de trajano elena martinezhumanidadescolapias
 
Infraestructura
InfraestructuraInfraestructura
Infraestructura
Heriberto Garcia Zamora
 
URBANISMO FUNCIONALISTA
URBANISMO FUNCIONALISTAURBANISMO FUNCIONALISTA
URBANISMO FUNCIONALISTA
Erika Izquierdo
 
INSTALACIONES SANITARIAS Y PLUVIALES DRENAJE
INSTALACIONES SANITARIAS Y PLUVIALES DRENAJEINSTALACIONES SANITARIAS Y PLUVIALES DRENAJE
INSTALACIONES SANITARIAS Y PLUVIALES DRENAJE
eserr1
 
Dossier
Dossier Dossier
Renascimento (Ensino Médio)
Renascimento (Ensino Médio)Renascimento (Ensino Médio)
Renascimento (Ensino Médio)
Valdir Medeiros Jr.
 
Urbanismo ejemplos
Urbanismo ejemplosUrbanismo ejemplos
Urbanismo ejemplos
Carlos Miranda San Roman
 
Movimiento moderno en Latinoamérica
Movimiento moderno en LatinoaméricaMovimiento moderno en Latinoamérica
Movimiento moderno en Latinoamérica
AriadneRomero1
 
Idade Média - Curso completo
Idade Média - Curso completoIdade Média - Curso completo
Idade Média - Curso completo
Privada
 
Reforma protestante
Reforma protestanteReforma protestante
Reforma protestante
Alexandre Guanaes Buongermino
 
Idade média igreja e cultura
Idade média   igreja e culturaIdade média   igreja e cultura
Idade média igreja e cultura
Fatima Freitas
 
Experiencias y desafíos de las bibliotecas municipales
Experiencias y desafíos de las bibliotecas municipalesExperiencias y desafíos de las bibliotecas municipales
Experiencias y desafíos de las bibliotecas municipales
Ernesto Martínez
 
Colin rowe
Colin roweColin rowe
Colin rowe
Juan David Mayorga
 

What's hot (20)

Modernismo en venezuela
Modernismo en venezuelaModernismo en venezuela
Modernismo en venezuela
 
Ciudades antiguas
Ciudades antiguasCiudades antiguas
Ciudades antiguas
 
As Cruzadas
As CruzadasAs Cruzadas
As Cruzadas
 
Resumen mercados de trajano elena martinez
Resumen mercados de trajano elena martinezResumen mercados de trajano elena martinez
Resumen mercados de trajano elena martinez
 
El Fenomeno Urbano
El Fenomeno UrbanoEl Fenomeno Urbano
El Fenomeno Urbano
 
Infraestructura
InfraestructuraInfraestructura
Infraestructura
 
Instalaciones hidrosanitarias
Instalaciones hidrosanitariasInstalaciones hidrosanitarias
Instalaciones hidrosanitarias
 
URBANISMO FUNCIONALISTA
URBANISMO FUNCIONALISTAURBANISMO FUNCIONALISTA
URBANISMO FUNCIONALISTA
 
INSTALACIONES SANITARIAS Y PLUVIALES DRENAJE
INSTALACIONES SANITARIAS Y PLUVIALES DRENAJEINSTALACIONES SANITARIAS Y PLUVIALES DRENAJE
INSTALACIONES SANITARIAS Y PLUVIALES DRENAJE
 
Dossier
Dossier Dossier
Dossier
 
Renascimento (Ensino Médio)
Renascimento (Ensino Médio)Renascimento (Ensino Médio)
Renascimento (Ensino Médio)
 
Urbanismo ejemplos
Urbanismo ejemplosUrbanismo ejemplos
Urbanismo ejemplos
 
Movimiento moderno en Latinoamérica
Movimiento moderno en LatinoaméricaMovimiento moderno en Latinoamérica
Movimiento moderno en Latinoamérica
 
Idade Média - Curso completo
Idade Média - Curso completoIdade Média - Curso completo
Idade Média - Curso completo
 
A Crise do Feudalismo
A Crise do FeudalismoA Crise do Feudalismo
A Crise do Feudalismo
 
Reforma protestante
Reforma protestanteReforma protestante
Reforma protestante
 
Idade média igreja e cultura
Idade média   igreja e culturaIdade média   igreja e cultura
Idade média igreja e cultura
 
Experiencias y desafíos de las bibliotecas municipales
Experiencias y desafíos de las bibliotecas municipalesExperiencias y desafíos de las bibliotecas municipales
Experiencias y desafíos de las bibliotecas municipales
 
Colin rowe
Colin roweColin rowe
Colin rowe
 
El espacio de los flujos
El espacio de los flujosEl espacio de los flujos
El espacio de los flujos
 

Similar to Grinding the java monolith

Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - Talk
Matthias Noback
 
The "Why", "What" and "How" of Microservices
The "Why", "What" and "How" of Microservices The "Why", "What" and "How" of Microservices
The "Why", "What" and "How" of Microservices
INPAY
 
API-driven Legacy Migration: Results from Project Winterfell
API-driven Legacy Migration: Results from Project WinterfellAPI-driven Legacy Migration: Results from Project Winterfell
API-driven Legacy Migration: Results from Project WinterfellKeith McFarlane
 
DDD Domain Relationships Radars
DDD Domain Relationships RadarsDDD Domain Relationships Radars
DDD Domain Relationships Radars
Philippe Bourgau
 
Serverless Computing Model
Serverless Computing ModelServerless Computing Model
Serverless Computing Model
Mohamed Samir
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
Comsysto Reply GmbH
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
Comsysto Reply GmbH
 
Meteor + React
Meteor + ReactMeteor + React
Meteor + React
Taggart Bowen-Gaddy
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
Srinivasan Nanduri
 
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
Fwdays
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
MahmoudZidan41
 
Stay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithStay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolith
Markus Eisele
 
Patterns of enterprise application architecture
Patterns of enterprise application architecturePatterns of enterprise application architecture
Patterns of enterprise application architecture
Chinh Ngo Nguyen
 
Why we got to Docker
Why we got to DockerWhy we got to Docker
Why we got to Docker
allingeek
 
Understanding Microservices
Understanding Microservices Understanding Microservices
Understanding Microservices
M A Hossain Tonu
 
Building FoundationDB
Building FoundationDBBuilding FoundationDB
Building FoundationDB
FoundationDB
 
Software Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuableSoftware Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuable
Comsysto Reply GmbH
 
SOA with Zend Framework
SOA with Zend FrameworkSOA with Zend Framework
SOA with Zend Framework
Mike Willbanks
 
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Lightbend
 
Going Serverless on AWS
Going Serverless on AWSGoing Serverless on AWS
Going Serverless on AWS
Aleksandr Maklakov
 

Similar to Grinding the java monolith (20)

Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - Talk
 
The "Why", "What" and "How" of Microservices
The "Why", "What" and "How" of Microservices The "Why", "What" and "How" of Microservices
The "Why", "What" and "How" of Microservices
 
API-driven Legacy Migration: Results from Project Winterfell
API-driven Legacy Migration: Results from Project WinterfellAPI-driven Legacy Migration: Results from Project Winterfell
API-driven Legacy Migration: Results from Project Winterfell
 
DDD Domain Relationships Radars
DDD Domain Relationships RadarsDDD Domain Relationships Radars
DDD Domain Relationships Radars
 
Serverless Computing Model
Serverless Computing ModelServerless Computing Model
Serverless Computing Model
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
 
Meteor + React
Meteor + ReactMeteor + React
Meteor + React
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Stay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithStay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolith
 
Patterns of enterprise application architecture
Patterns of enterprise application architecturePatterns of enterprise application architecture
Patterns of enterprise application architecture
 
Why we got to Docker
Why we got to DockerWhy we got to Docker
Why we got to Docker
 
Understanding Microservices
Understanding Microservices Understanding Microservices
Understanding Microservices
 
Building FoundationDB
Building FoundationDBBuilding FoundationDB
Building FoundationDB
 
Software Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuableSoftware Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuable
 
SOA with Zend Framework
SOA with Zend FrameworkSOA with Zend Framework
SOA with Zend Framework
 
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
 
Going Serverless on AWS
Going Serverless on AWSGoing Serverless on AWS
Going Serverless on AWS
 

More from Michael Nygard

Uncoupling
UncouplingUncoupling
Uncoupling
Michael Nygard
 
Tempo, Maneuverability, and Initiative
Tempo, Maneuverability, and InitiativeTempo, Maneuverability, and Initiative
Tempo, Maneuverability, and Initiative
Michael Nygard
 
Manueverable architecture
Manueverable architectureManueverable architecture
Manueverable architecture
Michael Nygard
 
Architecture without an end state
Architecture without an end stateArchitecture without an end state
Architecture without an end state
Michael Nygard
 
Chef in the cloud and on the ground code freeze 2012
Chef in the cloud and on the ground   code freeze 2012Chef in the cloud and on the ground   code freeze 2012
Chef in the cloud and on the ground code freeze 2012
Michael Nygard
 
The Big Red Button
The Big Red ButtonThe Big Red Button
The Big Red Button
Michael Nygard
 
Where to put_my_data
Where to put_my_dataWhere to put_my_data
Where to put_my_data
Michael Nygard
 

More from Michael Nygard (7)

Uncoupling
UncouplingUncoupling
Uncoupling
 
Tempo, Maneuverability, and Initiative
Tempo, Maneuverability, and InitiativeTempo, Maneuverability, and Initiative
Tempo, Maneuverability, and Initiative
 
Manueverable architecture
Manueverable architectureManueverable architecture
Manueverable architecture
 
Architecture without an end state
Architecture without an end stateArchitecture without an end state
Architecture without an end state
 
Chef in the cloud and on the ground code freeze 2012
Chef in the cloud and on the ground   code freeze 2012Chef in the cloud and on the ground   code freeze 2012
Chef in the cloud and on the ground code freeze 2012
 
The Big Red Button
The Big Red ButtonThe Big Red Button
The Big Red Button
 
Where to put_my_data
Where to put_my_dataWhere to put_my_data
Where to put_my_data
 

Recently uploaded

Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
Google
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 

Recently uploaded (20)

Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 

Grinding the java monolith

  • 2.
  • 3. This Photo by Unknown Author is licensed under CC BY-NC
  • 4. This Photo by Unknown Author is licensed under CC BY-SA
  • 5.
  • 6. This Photo by Unknown Author is licensed under CC BY-SA
  • 12. Context A large system that requires decomposition. Mix of high-level and low-level concerns Several operations are at the same level of abstraction Layers POSA 1 Solution Therefore, structure your system into an appropriate number of layers and place them on top of each other.— Buschmann, et. al., Pattern Oriented Software Architecture, Vol 1. Each layer should have a narrow, well-specified interface. It should be possible to substitute a different implementation of the layer without change to higher layers in the stack. • Forces • Late changes should have limited ripple effect • Interfaces should be stable, may be standardized • Parts should be interchangeable • Other systems may reuse lower layers • Responsibilities should be grouped for comprehension and maintainability • Further decomposition is needed for team structure and design. Example: TCP stack Failed example: Ruby on Rails Question: What makes a better or worse implementation of layers? Layer 1 1.1 1.2 1.3 Layer 2 2.1 2.2 Layer 3 3.1 3.2 3.3 <<uses>>
  • 13.
  • 15. ▪No limits to effect of bad code ▪Common-mode failures in shared code ▪Latent semantic coupling
  • 16. ▪Poor monitoring ▪Poor retry / timeout handling ▪Disruptive deployments
  • 17. ▪ My experience: 2 out of 3 such projects will not succeed. ▪ The killers: ▪ Impatience ▪ Unrealistic expectations ▪ Hubris
  • 18.
  • 19. ▪ Premise ▪ Refactor to create interfaces between subdomains, then turn those into HTTP interfaces ▪ Failure modes: 1. It takes too long. Executive impatience will defeat the plan. 2. Ongoing feature work introduces new dependencies faster than they are removed.
  • 20. ▪ Tempting to make your key domain objects into services. ▪ Makes deployments more disruptive ▪ Creates common dependency from many features to the entity services.
  • 21. ▪ Premise ▪ Keep developer utilization high by drawing them from a pool for the duration of a project. ▪ When the project is done, throw the developers back into the pool. ▪ Failure modes: 1. Project-orientation favors deadlines over code health & architecture initiatives. 2. Developers doing the hard work of refactoring should be able to enjoy the fruit of their efforts. ▪ Instead: 1. Use product teams
  • 22. ▪ Premise: ▪ We know the domain, let’s design new services that leave the past behind. ▪ Reality: ▪ We make the same mistakes over and over. ▪ “Second system effect” ▪ Designers’ optimism not supported by any past evidence ▪ Instead: ▪ Design in context. ▪ Accept the scars of the past.
  • 23. ▪ Premise: ▪ Create an intercepting proxy that can divert some kinds of traffic to one new service at a time. ▪ Reality: ▪ Sometimes works ▪ However, you will not like the service design. ▪ Services must be designed expediently and in the context of the current system’s interaction ▪ That’s OK, they can be replaced easier after the first effort.
  • 24. ▪ Premise: ▪ The current system works. ▪ Devs know what’s needed in their own areas ▪ But are afraid of the far-distant effects of their changes ▪ Response: ▪ Break into “product” teams ▪ Give each one a copy of the code ▪ Let them delete anything they don’t need. ▪ Reality: ▪ Coupling via the DB lasts a long time ▪ Services will be larger than desired
  • 25. ▪ Premise ▪ Microservices are never “done” ▪ Keep the pressure on simplifying design ▪ Reality ▪ Devs are often uncomfortable with ambiguity ▪ Deleting services & code that were just barely deployed feels “wrong”
  • 26. ▪ Premise ▪ Objects with long lifespans that serve multiple uses are hard to change ▪ Therefore, find major boundaries in the business process ▪ Make the “before” and “after” portions into separate services ▪ Reality ▪ Addresses consistency better than entity services ▪ Supports converging business processes ▪ Not as easy to support divergence
  • 27. ▪ Premise ▪ Domain objects make good representations to transfer in APIs ▪ An API can be expressed as REST on domain objects. ▪ Reality ▪ Makes it very difficult to handle multiple versions of APIs ▪ Leaks implementation detail & internals of the service ▪ Instead ▪ Treat request data as data ▪ At most, map into object that represent the interface itself
  • 28.
  • 29. ▪ Premise ▪ Hexagonal architecture expresses the domain independently of integration & persistence tech ▪ Reality ▪ Improved testability ▪ Smaller domain ▪ Better support for monitoring, metrics, and ALM
  • 30.
  • 31.
  • 32.