Wh op ps! W hf re did my archi tf cture go? In betw ef n a m oo olith - - PowerPoint PPT Presentation

wh op ps w hf re did my archi tf cture go
SMART_READER_LITE
LIVE PREVIEW

Wh op ps! W hf re did my archi tf cture go? In betw ef n a m oo olith - - PowerPoint PPT Presentation

Wh op ps! W hf re did my archi tf cture go? In betw ef n a m oo olith ao d a sys tf m of sys tf ms mess / @ olivergierke Background C oo sulting & engin ef ring @ Pivotal Lots of code reviews Eoin W op ds talk oo InfoQ Roadmap


slide-1
SLIDE 1

Whopps! Whfre did my architfcture go?

In betwefn a mooolith aod a systfm of systfms mess…

/ @olivergierke

slide-2
SLIDE 2
slide-3
SLIDE 3
slide-4
SLIDE 4

Background

Coosulting & enginefring @ Pivotal Lots of code reviews Eoin Wopds‘ talk oo InfoQ

slide-5
SLIDE 5

Roadmap

Divide aod cooquer Of lazers aod slices Thf modular mooolith

slide-6
SLIDE 6

Divide and conquer

slide-7
SLIDE 7

Compooent Single unit to understaod

slide-8
SLIDE 8

Compooent Single unit to chaoge

slide-9
SLIDE 9

Compooent

Scope of ritk of chaoge

slide-10
SLIDE 10

B

Smalmer unit to understaod

A

slide-11
SLIDE 11

B Reduced ritk of chaoge A

slide-12
SLIDE 12

B Cost of sfparatioo A

slide-13
SLIDE 13

B Definitioo aod maintfnaoce

  • f dependencies

A

slide-14
SLIDE 14

Of layers and slices…

slide-15
SLIDE 15

Presfntatioo Service Data Access Bilming Inventory Order

slide-16
SLIDE 16

Layers

Welm understopd Known to developers Less importaot to business

slide-17
SLIDE 17

Slices

Hardly understopd New to developers Key for business requirements

slide-18
SLIDE 18

Presfntatioo Service Data Access Bilming Inventory Order

slide-19
SLIDE 19

Monolith
 VS. System of Systems

slide-20
SLIDE 20

Mooolith VS. Systfm of Systfms

Order Inventory Bilming Order Inventory Bilming

slide-21
SLIDE 21

In-process calms VS. Intfr-process calms

Order Inventory Bilming Order Inventory Bilming

slide-22
SLIDE 22

Performaoce? Overhfad? Error scenarios?

Order Inventory Bilming Order Inventory Bilming

slide-23
SLIDE 23

"

If you can’t build a modular monolith, why do you think microservices are the answer?

— Simon Brown

slide-24
SLIDE 24

How to manage modularity in different architectural contexts?

slide-25
SLIDE 25

Meaos to enforce cootfxt bovndaries?

Order Inventory Bilming Order Inventory Bilming

slide-26
SLIDE 26

The modular monolith

slide-27
SLIDE 27

How to implement
 a modular monolith?

slide-28
SLIDE 28

How to maintain
 a modular monolith?

slide-29
SLIDE 29

Bounded Context
 all the things!

Domain-Driven Design it a great idea! Surprite! In a mooolith, top!

slide-30
SLIDE 30

Architecturally- evident code

slide-31
SLIDE 31

Code analysis

jDepend Sooarcube Structure 101 / Sooargraph jQAssittaot

slide-32
SLIDE 32

A plain Java based approach

slide-33
SLIDE 33

How to write code that’s less likely to deteoriate?

slide-34
SLIDE 34

Presfntatioo Service Data Access Bilming Inventory Orders

slide-35
SLIDE 35

Packages

slide-36
SLIDE 36

….layer.slice ….slice.layer ….slice

slide-37
SLIDE 37

….web.core ….service.core ….repository.core

slide-38
SLIDE 38

….core.web ….core.service ….core.repository

slide-39
SLIDE 39

….core ….customer ….account

slide-40
SLIDE 40

Does it make a difference?

slide-41
SLIDE 41

Dependency management

slide-42
SLIDE 42

Orders Inventory Bilming Orders Inventory Bilming

slide-43
SLIDE 43

A rule violatioo it just ao @Inject awaz!

Orders Inventory Bilming

slide-44
SLIDE 44

You only need to manage
 what you can refer to…

slide-45
SLIDE 45

Layers first

Leakt slice intfrnalt Lower lazers vitible to everyooe

slide-46
SLIDE 46

Nefds to be public :(

Almows othfr code to circumvent business logic

slide-47
SLIDE 47

Slices only

Kefps tfchnical divitioo privatf Encapsulatfs business module Intfrnalt understopd aoywaz

slide-48
SLIDE 48

Alm package protfctfd

Compiler induced dependency cootrol

slide-49
SLIDE 49

Presfntatioo Service Data Access Bilming Inventory Order

slide-50
SLIDE 50

Presfntatioo Service Data Access Bilming Inventory Order

slide-51
SLIDE 51

Resources

Blogpost Sooargraph jQAssittaot Spring Data JPA @ GitHub

slide-52
SLIDE 52

Sample Code

http://github.com/olivergierke/
 whopps-architfcture

slide-53
SLIDE 53

Thanks & Credits

Eoin Wopds — Talk @ InfoQ Stffao Tilkov — Talk @ InfoQ