SlideShare a Scribd company logo
1 of 41
Download to read offline
Return of the Monolith
(Episode VI)
@alper_hankendi
github.com/alperhankendi
2
Good and Bad Monolith
Neal Ford stated in his book Building Evolutionary Architectures:
“ If you can’t build a monolith, what makes you think microservices are the
answer ”
Microservice premium(Blog article) by M.Fowler:
“ Don't even consider microservices unless you have a system that's
too complex to manage as a monolith. ”
- In fact, a physical monolith is typically the right thing to do.
Pure evil is monolithic thinking.
3
Monoliths are cool again!
4
Monoliths are cool again!
5
Monoliths are cool again!
6
Monoliths are cool again!
7
Good and Bad Monolith
Neal Ford stated in his book Building Evolutionary Architectures:
“ If you can’t build a monolith, what makes you think microservices are the
answer ”
Microservice premium(Blog article) by M.Fowler:
“ Don't even consider microservices unless you have a system that's
too complex to manage as a monolith. ”
- In fact, a physical monolith is typically the right thing to do. Pure
evil is monolithic thinking.
- The disturbing question is: Why is monolith synonymous with a bad
design for some and yet the right thing to do for others
8
Two Kinds of Monolith
Physical Monolith
A physical block of software, typically running
as a single process.
A physical monolith system is developed and
built as a single binary(artifact), deployed all
at once and falling in its entirely.
Resources; database are often shared,
communication is local.
A physical monolith is not anti-pattern. It is a
good thing to start with as it is easy to
build,deploy and operate.
9
Two Kinds of Monolith
Logical Monolith a.k.a Big ball of mud
Logically monolithic codebases lack boundaries,
everything is coupled to everything and no visible
architecture is to be found.
Logical monoliths is unmaintainable on a scale
and complexity grows exponentially.
Logical monoliths are evil and dangerous
constructs that cause high complexity and tight
coupling of building blocks making development
expensive and free error.
10
By doing things right
Modular Monolith
The opposite of a logical monolith is a modular
monolith. Codebase business capabilities are
worked out by services with explicit logical
boundaries.
A Modular monolith is probably the best
architectural approach for most applications. It is
easy to extend,maintain and other reasons.
11
By doing things very wrong
Distributed Monolith
A logically,but not physically, monolithic systems is
named a distributed monolith.
Distributed monoliths have all the drawbacks of
distributed systems with almost none of the
benefits.
With dealing with the big ball of mud is a pain but
distributed monoliths are a real disaster.
Systems often end up as distributed monoliths
while adapting the microservices approach
incorrectly.
12
Types of systems by physical and logical architecture
If you have problem with your monolithic system,
the problem most likely its logically monolithic
design.
The physical of the monolith is usually a secondary
problem, easy to solve after the proper SOA
design has been applied.
One the logical monolith is resolved,You’re very
close to apply microservice architecture.
13
Good & Bad Design
14
Architectural Drivers
15
Context is king
Each of our decisions are made in a given
context.
The same decision made in one context can
bring great result, while in another context can
cause devastating failure.
Simon Brown in the book Software Architecture
for Developers describes Architectural Drivers;
“ Regardless of the process that you follow
(traditional and plan-driven vs lightweight and
adaptive), there’s a set of common things that
really drive, influence and shape the resulting
software architecture. ”
src:https://www.neverletdown.net/2014/10/architectural-drivers.html
16
Drivers categorization
src:https://www.neverletdown.net/2014/10/architectural-drivers.html
The main categories are;
- Functional Requirements: what and how
problems does the system solve.
- Quality Attributes: a set of attributes that
determine the quality of architecture like
maintainability or scalability
- Technical Constraints: technology standards,
patterns, tools limitations, team experience
- Business Constraints: Organization,budget, tight
timeline (a.k.a deadlines)
17
There is no one “right” solution
The Software architecture is a continuous choice between one driver and another. There is no Silver
Bullet.
The shape of the architecture of your system is influenced by many factors and everything depends
on your context.
1
8
The Model Code Gap
Your architecture models and your source code will not
show the same things. The difference between them is the
model-code gap.
The gap between executable
code and the abstractions we
use to discuss systems is something
many developers don’t realize
and aren’t familiar with.
https://www.cs.toronto.edu/~gelahi/Ref/Reflexion%20models.pdf
19
Modular monoliths
20
Majestic monoliths
21
Majestic Monoliths
One API can depend on
another API or implementation
can depend on another API,
but implementations can’t
directly depend on
each other.
22
Majestic monoliths
23
Majestic monoliths: Data virtualization
24
Majestic monoliths: The Citadel
25
Majestic monoliths: Scaling
26
Majestic monoliths: Messaging
27
How To Decide On Module Boundaries
28
DDD@Design Modeling Process
Source: https://github.com/ddd-crew/ddd-starter-modelling-process
29
Event Storming
30
How about data ?
31
Data Isolation Strategies
❏ Ensure each module accesses its own tables
❏ No sharing of tables between modules
❏ Joins only between tables which in same module
❏ Maintain referential integrity and transactions across modules
32
Hello, any dotnet sample?
33
Modular Monoliths with dotnet
A modular monolith is still a monolith, but the term monolith refers more to the
hosting/runtime model. Each service/part is located in its own module (.NET project)
and is therefore decoupled from other modules
https://abp.io/
https://github.com/thinktecture-labs/aspnetcore-modular-monolith
34
Make Everything Internal
35
Controller Auto-Detection
36
Routing to Module Controllers
To prevent name clashes between controllers in different modules, we should prefix all
routes to modules.
37
Startup per Module
To allow registration of custom services in a module, we should provide a startup file per
module. This can be done by defining an IStartup interface that can be implemented in a
module.
38
Startup per Module
An example implementation of IStartup might look like this. (like bootstrapper)
39
Module Registration
This extension will also invoke the startup of the module.
40
Lessons Learned
❏ Everything is trade-off.
❏ Modular / Majestic Monoliths can move as fast as or faster than Microservices
❏ Monolith first approach is win, Thank me later.
❏ Modules reduce complexity and provide abstractions so that systems are easier
to understand
❏ We are reading code and trying to understand it %95 of our time.
❏ Spend more time defining Module boundaries
❏ Consider merging “chatty” modules
❏ Database Sharding may be a good first step
❏ Carefully plan how you will share data between modules
❏ Modules should be determined with the help of Domain Driven Design
❏ Discover core domain & subdomains
❏ Defining the boundaries
❏ Context Mapping
41
Questions ?
@alper_hankendi
github.com/alperhankendi

More Related Content

What's hot

A year with event sourcing and CQRS
A year with event sourcing and CQRSA year with event sourcing and CQRS
A year with event sourcing and CQRSSteve Pember
 
stupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdfstupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdfDaniloQueirozMota
 
Open infradays 2019_msa_k8s
Open infradays 2019_msa_k8sOpen infradays 2019_msa_k8s
Open infradays 2019_msa_k8sHyoungjun Kim
 
Service Mesh - Observability
Service Mesh - ObservabilityService Mesh - Observability
Service Mesh - ObservabilityAraf Karsh Hamid
 
Spring Cloud Workshop
Spring Cloud WorkshopSpring Cloud Workshop
Spring Cloud WorkshopYongSung Yoon
 
Kubernetes presentation
Kubernetes presentationKubernetes presentation
Kubernetes presentationGauranG Bajpai
 
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법Open Source Consulting
 
Apache Camel v3, Camel K and Camel Quarkus
Apache Camel v3, Camel K and Camel QuarkusApache Camel v3, Camel K and Camel Quarkus
Apache Camel v3, Camel K and Camel QuarkusClaus Ibsen
 
[Spring Camp 2018] 11번가 Spring Cloud 기반 MSA로의 전환 : 지난 1년간의 이야기
[Spring Camp 2018] 11번가 Spring Cloud 기반 MSA로의 전환 : 지난 1년간의 이야기[Spring Camp 2018] 11번가 Spring Cloud 기반 MSA로의 전환 : 지난 1년간의 이야기
[Spring Camp 2018] 11번가 Spring Cloud 기반 MSA로의 전환 : 지난 1년간의 이야기YongSung Yoon
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice ArchitectureNguyen Tung
 
Kubernetes - Security Journey
Kubernetes - Security JourneyKubernetes - Security Journey
Kubernetes - Security JourneyJerry Jalava
 
Api gateway in microservices
Api gateway in microservicesApi gateway in microservices
Api gateway in microservicesKunal Hire
 
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...Chris Richardson
 
4. 대용량 아키텍쳐 설계 패턴
4. 대용량 아키텍쳐 설계 패턴4. 대용량 아키텍쳐 설계 패턴
4. 대용량 아키텍쳐 설계 패턴Terry Cho
 
Amazon CloudWatch - Observability and Monitoring
Amazon CloudWatch - Observability and MonitoringAmazon CloudWatch - Observability and Monitoring
Amazon CloudWatch - Observability and MonitoringRick Hwang
 
Amazon EKS로 간단한 웹 애플리케이션 구축하기 - 김주영 (AWS) :: AWS Community Day Online 2021
Amazon EKS로 간단한 웹 애플리케이션 구축하기 - 김주영 (AWS) :: AWS Community Day Online 2021Amazon EKS로 간단한 웹 애플리케이션 구축하기 - 김주영 (AWS) :: AWS Community Day Online 2021
Amazon EKS로 간단한 웹 애플리케이션 구축하기 - 김주영 (AWS) :: AWS Community Day Online 2021AWSKRUG - AWS한국사용자모임
 
Introduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate WorkshopIntroduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate WorkshopAjeet Singh Raina
 

What's hot (20)

A year with event sourcing and CQRS
A year with event sourcing and CQRSA year with event sourcing and CQRS
A year with event sourcing and CQRS
 
stupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdfstupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdf
 
Open infradays 2019_msa_k8s
Open infradays 2019_msa_k8sOpen infradays 2019_msa_k8s
Open infradays 2019_msa_k8s
 
Service Mesh - Observability
Service Mesh - ObservabilityService Mesh - Observability
Service Mesh - Observability
 
Container Networking Deep Dive
Container Networking Deep DiveContainer Networking Deep Dive
Container Networking Deep Dive
 
Gitlab CI/CD
Gitlab CI/CDGitlab CI/CD
Gitlab CI/CD
 
Spring Cloud Workshop
Spring Cloud WorkshopSpring Cloud Workshop
Spring Cloud Workshop
 
Kubernetes presentation
Kubernetes presentationKubernetes presentation
Kubernetes presentation
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
 
Apache Camel v3, Camel K and Camel Quarkus
Apache Camel v3, Camel K and Camel QuarkusApache Camel v3, Camel K and Camel Quarkus
Apache Camel v3, Camel K and Camel Quarkus
 
[Spring Camp 2018] 11번가 Spring Cloud 기반 MSA로의 전환 : 지난 1년간의 이야기
[Spring Camp 2018] 11번가 Spring Cloud 기반 MSA로의 전환 : 지난 1년간의 이야기[Spring Camp 2018] 11번가 Spring Cloud 기반 MSA로의 전환 : 지난 1년간의 이야기
[Spring Camp 2018] 11번가 Spring Cloud 기반 MSA로의 전환 : 지난 1년간의 이야기
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Kubernetes - Security Journey
Kubernetes - Security JourneyKubernetes - Security Journey
Kubernetes - Security Journey
 
Api gateway in microservices
Api gateway in microservicesApi gateway in microservices
Api gateway in microservices
 
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
 
4. 대용량 아키텍쳐 설계 패턴
4. 대용량 아키텍쳐 설계 패턴4. 대용량 아키텍쳐 설계 패턴
4. 대용량 아키텍쳐 설계 패턴
 
Amazon CloudWatch - Observability and Monitoring
Amazon CloudWatch - Observability and MonitoringAmazon CloudWatch - Observability and Monitoring
Amazon CloudWatch - Observability and Monitoring
 
Amazon EKS로 간단한 웹 애플리케이션 구축하기 - 김주영 (AWS) :: AWS Community Day Online 2021
Amazon EKS로 간단한 웹 애플리케이션 구축하기 - 김주영 (AWS) :: AWS Community Day Online 2021Amazon EKS로 간단한 웹 애플리케이션 구축하기 - 김주영 (AWS) :: AWS Community Day Online 2021
Amazon EKS로 간단한 웹 애플리케이션 구축하기 - 김주영 (AWS) :: AWS Community Day Online 2021
 
Introduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate WorkshopIntroduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate Workshop
 

Similar to Return of the monolith

Journey from Monolith to a Modularized Application - Approach and Key Learnin...
Journey from Monolith to a Modularized Application - Approach and Key Learnin...Journey from Monolith to a Modularized Application - Approach and Key Learnin...
Journey from Monolith to a Modularized Application - Approach and Key Learnin...mfrancis
 
Isn't the Monolith Just Enough?
Isn't the Monolith Just Enough?Isn't the Monolith Just Enough?
Isn't the Monolith Just Enough?pflueras
 
its all about the domain honey! Experiences from 15 years of Domain-Driven De...
its all about the domain honey! Experiences from 15 years of Domain-Driven De...its all about the domain honey! Experiences from 15 years of Domain-Driven De...
its all about the domain honey! Experiences from 15 years of Domain-Driven De...Carola Lilienthal
 
Acing architecture
Acing architectureAcing architecture
Acing architectureColin Lee
 
Microservices - Yet another buzzword
Microservices - Yet another buzzwordMicroservices - Yet another buzzword
Microservices - Yet another buzzwordOvidiu Dimulescu
 
Beware the monolith
Beware the monolithBeware the monolith
Beware the monolithDee Wilcox
 
Modular Architectures: What they are why do they matter now.
Modular Architectures: What they are why do they matter now.Modular Architectures: What they are why do they matter now.
Modular Architectures: What they are why do they matter now.Param Rengaiah
 
Architecture for mere mortals
Architecture for mere mortalsArchitecture for mere mortals
Architecture for mere mortalsColin Lee
 
Design of a BIOLOID Scorpion Report
Design of a BIOLOID Scorpion ReportDesign of a BIOLOID Scorpion Report
Design of a BIOLOID Scorpion ReportBruno Chung
 
Software engineering the genesis
Software engineering  the genesisSoftware engineering  the genesis
Software engineering the genesisPawel Szulc
 
Managing the Earthquake: Surviving Major Database Architecture Changes (rev.2...
Managing the Earthquake: Surviving Major Database Architecture Changes (rev.2...Managing the Earthquake: Surviving Major Database Architecture Changes (rev.2...
Managing the Earthquake: Surviving Major Database Architecture Changes (rev.2...Michael Rosenblum
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices Bozhidar Bozhanov
 
From Monolithic to Microservices in 45 Minutes
From Monolithic to Microservices in 45 MinutesFrom Monolithic to Microservices in 45 Minutes
From Monolithic to Microservices in 45 MinutesMongoDB
 
Why Software Drives Us Crazy
Why Software Drives Us CrazyWhy Software Drives Us Crazy
Why Software Drives Us CrazyTechWell
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to MicroservicesYury Kisliak
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMiki Lombardi
 
Reactive Microservice Architecture with Groovy and Grails
Reactive Microservice Architecture with Groovy and GrailsReactive Microservice Architecture with Groovy and Grails
Reactive Microservice Architecture with Groovy and GrailsSteve Pember
 
Responsible Microservices
Responsible MicroservicesResponsible Microservices
Responsible MicroservicesVMware Tanzu
 

Similar to Return of the monolith (20)

Journey from Monolith to a Modularized Application - Approach and Key Learnin...
Journey from Monolith to a Modularized Application - Approach and Key Learnin...Journey from Monolith to a Modularized Application - Approach and Key Learnin...
Journey from Monolith to a Modularized Application - Approach and Key Learnin...
 
Isn't the Monolith Just Enough?
Isn't the Monolith Just Enough?Isn't the Monolith Just Enough?
Isn't the Monolith Just Enough?
 
its all about the domain honey! Experiences from 15 years of Domain-Driven De...
its all about the domain honey! Experiences from 15 years of Domain-Driven De...its all about the domain honey! Experiences from 15 years of Domain-Driven De...
its all about the domain honey! Experiences from 15 years of Domain-Driven De...
 
Acing architecture
Acing architectureAcing architecture
Acing architecture
 
Microservices - Yet another buzzword
Microservices - Yet another buzzwordMicroservices - Yet another buzzword
Microservices - Yet another buzzword
 
Beware the monolith
Beware the monolithBeware the monolith
Beware the monolith
 
Breaking the monolith
Breaking the monolithBreaking the monolith
Breaking the monolith
 
Modular Architectures: What they are why do they matter now.
Modular Architectures: What they are why do they matter now.Modular Architectures: What they are why do they matter now.
Modular Architectures: What they are why do they matter now.
 
Architecture for mere mortals
Architecture for mere mortalsArchitecture for mere mortals
Architecture for mere mortals
 
Design of a BIOLOID Scorpion Report
Design of a BIOLOID Scorpion ReportDesign of a BIOLOID Scorpion Report
Design of a BIOLOID Scorpion Report
 
Software engineering the genesis
Software engineering  the genesisSoftware engineering  the genesis
Software engineering the genesis
 
Managing the Earthquake: Surviving Major Database Architecture Changes (rev.2...
Managing the Earthquake: Surviving Major Database Architecture Changes (rev.2...Managing the Earthquake: Surviving Major Database Architecture Changes (rev.2...
Managing the Earthquake: Surviving Major Database Architecture Changes (rev.2...
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices
 
Let's talk about... Microservices
Let's talk about... MicroservicesLet's talk about... Microservices
Let's talk about... Microservices
 
From Monolithic to Microservices in 45 Minutes
From Monolithic to Microservices in 45 MinutesFrom Monolithic to Microservices in 45 Minutes
From Monolithic to Microservices in 45 Minutes
 
Why Software Drives Us Crazy
Why Software Drives Us CrazyWhy Software Drives Us Crazy
Why Software Drives Us Crazy
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
 
Reactive Microservice Architecture with Groovy and Grails
Reactive Microservice Architecture with Groovy and GrailsReactive Microservice Architecture with Groovy and Grails
Reactive Microservice Architecture with Groovy and Grails
 
Responsible Microservices
Responsible MicroservicesResponsible Microservices
Responsible Microservices
 

Recently uploaded

Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 

Recently uploaded (20)

Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 

Return of the monolith

  • 1. Return of the Monolith (Episode VI) @alper_hankendi github.com/alperhankendi
  • 2. 2 Good and Bad Monolith Neal Ford stated in his book Building Evolutionary Architectures: “ If you can’t build a monolith, what makes you think microservices are the answer ” Microservice premium(Blog article) by M.Fowler: “ Don't even consider microservices unless you have a system that's too complex to manage as a monolith. ” - In fact, a physical monolith is typically the right thing to do. Pure evil is monolithic thinking.
  • 7. 7 Good and Bad Monolith Neal Ford stated in his book Building Evolutionary Architectures: “ If you can’t build a monolith, what makes you think microservices are the answer ” Microservice premium(Blog article) by M.Fowler: “ Don't even consider microservices unless you have a system that's too complex to manage as a monolith. ” - In fact, a physical monolith is typically the right thing to do. Pure evil is monolithic thinking. - The disturbing question is: Why is monolith synonymous with a bad design for some and yet the right thing to do for others
  • 8. 8 Two Kinds of Monolith Physical Monolith A physical block of software, typically running as a single process. A physical monolith system is developed and built as a single binary(artifact), deployed all at once and falling in its entirely. Resources; database are often shared, communication is local. A physical monolith is not anti-pattern. It is a good thing to start with as it is easy to build,deploy and operate.
  • 9. 9 Two Kinds of Monolith Logical Monolith a.k.a Big ball of mud Logically monolithic codebases lack boundaries, everything is coupled to everything and no visible architecture is to be found. Logical monoliths is unmaintainable on a scale and complexity grows exponentially. Logical monoliths are evil and dangerous constructs that cause high complexity and tight coupling of building blocks making development expensive and free error.
  • 10. 10 By doing things right Modular Monolith The opposite of a logical monolith is a modular monolith. Codebase business capabilities are worked out by services with explicit logical boundaries. A Modular monolith is probably the best architectural approach for most applications. It is easy to extend,maintain and other reasons.
  • 11. 11 By doing things very wrong Distributed Monolith A logically,but not physically, monolithic systems is named a distributed monolith. Distributed monoliths have all the drawbacks of distributed systems with almost none of the benefits. With dealing with the big ball of mud is a pain but distributed monoliths are a real disaster. Systems often end up as distributed monoliths while adapting the microservices approach incorrectly.
  • 12. 12 Types of systems by physical and logical architecture If you have problem with your monolithic system, the problem most likely its logically monolithic design. The physical of the monolith is usually a secondary problem, easy to solve after the proper SOA design has been applied. One the logical monolith is resolved,You’re very close to apply microservice architecture.
  • 13. 13 Good & Bad Design
  • 15. 15 Context is king Each of our decisions are made in a given context. The same decision made in one context can bring great result, while in another context can cause devastating failure. Simon Brown in the book Software Architecture for Developers describes Architectural Drivers; “ Regardless of the process that you follow (traditional and plan-driven vs lightweight and adaptive), there’s a set of common things that really drive, influence and shape the resulting software architecture. ” src:https://www.neverletdown.net/2014/10/architectural-drivers.html
  • 16. 16 Drivers categorization src:https://www.neverletdown.net/2014/10/architectural-drivers.html The main categories are; - Functional Requirements: what and how problems does the system solve. - Quality Attributes: a set of attributes that determine the quality of architecture like maintainability or scalability - Technical Constraints: technology standards, patterns, tools limitations, team experience - Business Constraints: Organization,budget, tight timeline (a.k.a deadlines)
  • 17. 17 There is no one “right” solution The Software architecture is a continuous choice between one driver and another. There is no Silver Bullet. The shape of the architecture of your system is influenced by many factors and everything depends on your context.
  • 18. 1 8 The Model Code Gap Your architecture models and your source code will not show the same things. The difference between them is the model-code gap. The gap between executable code and the abstractions we use to discuss systems is something many developers don’t realize and aren’t familiar with. https://www.cs.toronto.edu/~gelahi/Ref/Reflexion%20models.pdf
  • 21. 21 Majestic Monoliths One API can depend on another API or implementation can depend on another API, but implementations can’t directly depend on each other.
  • 23. 23 Majestic monoliths: Data virtualization
  • 27. 27 How To Decide On Module Boundaries
  • 28. 28 DDD@Design Modeling Process Source: https://github.com/ddd-crew/ddd-starter-modelling-process
  • 31. 31 Data Isolation Strategies ❏ Ensure each module accesses its own tables ❏ No sharing of tables between modules ❏ Joins only between tables which in same module ❏ Maintain referential integrity and transactions across modules
  • 33. 33 Modular Monoliths with dotnet A modular monolith is still a monolith, but the term monolith refers more to the hosting/runtime model. Each service/part is located in its own module (.NET project) and is therefore decoupled from other modules https://abp.io/ https://github.com/thinktecture-labs/aspnetcore-modular-monolith
  • 36. 36 Routing to Module Controllers To prevent name clashes between controllers in different modules, we should prefix all routes to modules.
  • 37. 37 Startup per Module To allow registration of custom services in a module, we should provide a startup file per module. This can be done by defining an IStartup interface that can be implemented in a module.
  • 38. 38 Startup per Module An example implementation of IStartup might look like this. (like bootstrapper)
  • 39. 39 Module Registration This extension will also invoke the startup of the module.
  • 40. 40 Lessons Learned ❏ Everything is trade-off. ❏ Modular / Majestic Monoliths can move as fast as or faster than Microservices ❏ Monolith first approach is win, Thank me later. ❏ Modules reduce complexity and provide abstractions so that systems are easier to understand ❏ We are reading code and trying to understand it %95 of our time. ❏ Spend more time defining Module boundaries ❏ Consider merging “chatty” modules ❏ Database Sharding may be a good first step ❏ Carefully plan how you will share data between modules ❏ Modules should be determined with the help of Domain Driven Design ❏ Discover core domain & subdomains ❏ Defining the boundaries ❏ Context Mapping