Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Whoops! Where did my architecture go?
Search
Oliver Drotbohm
October 13, 2016
Programming
2
770
Whoops! Where did my architecture go?
Slides of the talk I gave at GOTO London, 2016.
Oliver Drotbohm
October 13, 2016
Tweet
Share
More Decks by Oliver Drotbohm
See All by Oliver Drotbohm
It Takes Two to Tango – Designing Module Interactions in Modulithic Spring Applications
olivergierke
4
450
Bottom-Up Architecture – Bridging the Achitecture Code Gap
olivergierke
4
730
Spring Modulith – A Deep Dive
olivergierke
7
3.8k
Spring for the Architecturally Curious Developer
olivergierke
5
1.7k
Spring Boot 3 & Spring Framework 6
olivergierke
4
1.9k
Architecturally-evident Java Applications with jMolecules
olivergierke
8
2.7k
A Deep Dive into Spring Application Events
olivergierke
12
3.1k
Building Better Monoliths – Modulithic Applications with Spring Boot
olivergierke
4
870
Spring HATEOAS – Hypermedia APIs with Spring
olivergierke
1
650
Other Decks in Programming
See All in Programming
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
Jakarta EE meets AI
ivargrimstad
0
530
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
290
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.7k
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.5k
C++でシェーダを書く
fadis
6
4.1k
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
CSC509 Lecture 12
javiergs
PRO
0
160
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
693
190k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
The World Runs on Bad Software
bkeepers
PRO
65
11k
GraphQLとの向き合い方2022年版
quramy
43
13k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
What's new in Ruby 2.0
geeforr
343
31k
Rails Girls Zürich Keynote
gr2m
94
13k
Transcript
Whoops! Where did my architecture go? In between a monolith
and a system of systems mess… / @olivergierke
None
None
Background Consulting & engineering @ Pivotal Lots of code reviews
Eoin Woods‘ talk on InfoQ
Roadmap Divide and conquer Of layers and slices The modular
monolith
Divide and conquer
Component Single unit to understand
Component Single unit to change
Component Scope of risk of change
B Smaller unit to understand A
B Reduced risk of change A
B Cost of separation A
B Definition and maintenance of dependencies A
Of layers and slices…
Presentation Service Data Access Billing Inventory Order
Layers Well understood Known to developers Less important to business
Slices Hardly understood New to developers Key for business requirements
Presentation Service Data Access Billing Inventory Order
Monolith VS. System of Systems
Monolith VS. System of Systems Order Inventory Billing Order Inventory
Billing
In-process calls VS. Inter-process calls Order Inventory Billing Order Inventory
Billing
Performance? Overhead? Error scenarios? Order Inventory Billing Order Inventory Billing
" If you can’t build a modular monolith, why do
you think microservices are the answer? — Simon Brown
How to manage modularity in different architectural contexts?
Means to enforce context boundaries? Order Inventory Billing Order Inventory
Billing
The modular monolith
How to implement a modular monolith?
How to maintain a modular monolith?
Bounded Context all the things! Domain-Driven Design is a great
idea! Surprise! In a monolith, too!
Architecturally- evident code
Code analysis jDepend Sonarcube Structure 101 / Sonargraph jQAssistant
A plain Java based approach
How to write code that’s less likely to deteoriate?
Presentation Service Data Access Billing Inventory Orders
Packages
….layer.slice ….slice.layer ….slice
….web.core ….service.core ….repository.core
….core.web ….core.service ….core.repository
….core ….customer ….account
Does it make a difference?
Dependency management
Orders Inventory Billing Orders Inventory Billing
A rule violation is just an @Inject away! Orders Inventory
Billing
You only need to manage what you can refer to…
Layers first Leaks slice internals Lower layers visible to everyone
Needs to be public :( Allows other code to circumvent
business logic
Slices only Keeps technical division private Encapsulates business module Internals
understood anyway
All package protected Compiler induced dependency control
Presentation Service Data Access Billing Inventory Order
Presentation Service Data Access Billing Inventory Order
Resources Blogpost Sonargraph jQAssistant Spring Data JPA @ GitHub
Sample Code http://github.com/olivergierke/ whoops-architecture
Thanks & Credits Eoin Woods — Talk @ InfoQ Stefan
Tilkov — Talk @ InfoQ