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
760
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
Spring Modulith – A Deep Dive
olivergierke
7
1.8k
Spring for the Architecturally Curious Developer
olivergierke
5
1.6k
Spring Boot 3 & Spring Framework 6
olivergierke
4
1.8k
Architecturally-evident Java Applications with jMolecules
olivergierke
8
2.4k
A Deep Dive into Spring Application Events
olivergierke
12
2.9k
Building Better Monoliths – Modulithic Applications with Spring Boot
olivergierke
4
820
Spring HATEOAS – Hypermedia APIs with Spring
olivergierke
1
560
Building Better Monoliths – Modulithic Applications with Spring Boot
olivergierke
6
3.8k
REST Beyond the Obvious – API Design for Ever Evolving Systems
olivergierke
5
1.1k
Other Decks in Programming
See All in Programming
スキーマ駆動開発による品質とスピードの両立 - 私達は何故、スキーマを書くのか
kentaroutakeda
0
170
使ってみよう Azure AI Document Intelligence
kosmosebi
2
300
PHP8.3の機能を振り返る / Review of PHP 8.3 features
seike460
PRO
1
110
Goのmultiple errorsについて (2024年4月版)
syumai
3
640
ゆるい個人開発のススメ
kuroppe1819
10
990
入門 AWS Amplify Gen2 / Introduction to AWS Amplify Gen2
genkiogasawara
1
330
Fragment Composition of GraphQL
quramy
4
780
[技育CAMPアカデミア]アイディアを形に!【超入門】スマホアプリ開発〜リリースまでの流れをご紹介
teamlab
PRO
0
360
見た目から始める生産性向上
ikumatadokoro
7
830
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
730
PHPの次期バージョンはこの時期どうなっているのか - Internalsの開発体制について - PHPカンファレンス小田原
youkidearitai
PRO
1
190
2 週間で Twitter Bot を作ってみた
contour_gara
0
330
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
175
21k
GraphQLの誤解/rethinking-graphql
sonatard
50
9.2k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
Designing for humans not robots
tammielis
248
25k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
241
1.2M
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
78
42k
The Cult of Friendly URLs
andyhume
74
5.7k
Principles of Awesome APIs and How to Build Them.
keavy
121
16k
[RailsConf 2023] Rails as a piece of cake
palkan
23
3.9k
Rebuilding a faster, lazier Slack
samanthasiow
73
8.2k
Happy Clients
brianwarren
92
6.4k
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