Monolithic
Application
is
one git repo
with 99%
code base
of project
Slide 10
Slide 10 text
What is a Huge
Monolith?
Slide 11
Slide 11 text
How I can
understand
my Monolith
is Huge
or no?
Slide 12
Slide 12 text
Let’s Estimate it!
Slide 13
Slide 13 text
Monolith Estimation:
by commits count
Slide 14
Slide 14 text
Monolith Estimation:
by commits count
Slide 15
Slide 15 text
Cons:
Strategy: merge or rebase?
Monolith Estimation:
by commits count
Slide 16
Slide 16 text
Cons:
Strategy: merge or rebase?
Atomic commits or one commit per
feature (Pull request)?
Monolith Estimation:
by commits count
Slide 17
Slide 17 text
No content
Slide 18
Slide 18 text
No content
Slide 19
Slide 19 text
Monolith Estimation:
by count lines of code
Slide 20
Slide 20 text
No content
Slide 21
Slide 21 text
Monolith Estimation:
by count lines of code
Pros:
Amount of commits does not influence
on count of code lines
Slide 22
Slide 22 text
Monolith Estimation:
by count lines of code
Pros:
Amount of commits does not influence
on count of code lines
Cons:
There is no connection to REAL
production
Slide 23
Slide 23 text
No content
Slide 24
Slide 24 text
What is it in real and what
it seems to be
Slide 25
Slide 25 text
Monolith Estimation:
by DataBase size?
Slide 26
Slide 26 text
No content
Slide 27
Slide 27 text
What does
"Large Database”
mean?
Slide 28
Slide 28 text
The size of the database for a regular
web application can be considered as
“Web Big Data” when the backup of this
database cannot be restored to the
developer computer.
Funny Law
of “Web BigData”
Slide 29
Slide 29 text
No content
Slide 30
Slide 30 text
Huge
Monolith:
A lot of commits +
A lot of code lines +
Deep Production
Slide 31
Slide 31 text
Your Project Team
Slide 32
Slide 32 text
Rails Project Architecture
Shark Head
Slide 33
Slide 33 text
Rails Project Architecture
Shark Head
Elephant Body
+
Slide 34
Slide 34 text
Rails Project Architecture
Shark Head
Elephant Body
+
Tiger and Rhino
Legs
+
Slide 35
Slide 35 text
Rails Project Architecture
Shark Head
Elephant Body
+
Tiger and Rhino
Legs
+
AND
BLASTERS
Normal
• Rails 4
Healthy
• Rails 5+
• Rails 4 -> Rails 5 in process
Legacy
• Rails 3 and lower
Monolith Healthy Level:
by Rails version
Slide 57
Slide 57 text
Normal
• 2.3+
Healthy
• Last stable
Legacy
• 1.9* - What wrong with you, guys? >_<
Monolith Healthy Level:
by Ruby version
Slide 58
Slide 58 text
Why we should update
Ruby?
Slide 59
Slide 59 text
Because yield_self is
powerful feature?
Slide 60
Slide 60 text
Security Vulnerabilities
Slide 61
Slide 61 text
Healthy
• Use bundler-audit
Legacy
• Don’t use bundler-audit
Monolith Healthy Level:
by gems version
Slide 62
Slide 62 text
All Evil Martians projects
use “bundler-audit”
Slide 63
Slide 63 text
All Evil Martians projects
use “bundler-audit”
and “nsp check”
Slide 64
Slide 64 text
Monolith Healthy Level:
by Architecture
Slide 65
Slide 65 text
Healthy
• It is easy to make changes
• You have permanent refactor for an old
code
Legacy
• You use Rails way (sorry, DHH)
• You have a bunch of different patterns
Monolith Healthy Level:
by Architecture
Slide 66
Slide 66 text
Houston, we have a
problem (c)
Slide 67
Slide 67 text
Problem =
Cause + Solution
Slide 68
Slide 68 text
Solution
Cause
I need to use
some
framework…
e.g. Trailblazer!
Rails MVC is
sucks
Slide 69
Slide 69 text
#TODO
My opinion about
Trailblaizer
Slide 70
Slide 70 text
No content
Slide 71
Slide 71 text
No content
Slide 72
Slide 72 text
No content
Slide 73
Slide 73 text
No content
Slide 74
Slide 74 text
Saint P NickConf
Slide 75
Slide 75 text
Solution
Cause
Rails MVC is
sucks
Use MCC!
M - Model
C - Cells
C - Controller
Slide 76
Slide 76 text
class UsersController < ApplicationController
def show
user = User.find(params[:id])
render_app_cell(Users::Cell::Show, user: user)
end
end
MC(ells)C Example
Slide 77
Slide 77 text
class UsersController < ApplicationController
def show
user = User.find(params[:id])
render_app_cell(Users::Cell::Show, user: user)
end
end
class ApplicationController < ActionController::Base
def render_app_cell(*args)
render html: cell(*args), layout: 'application'
end
end
MC(ells)C Example
Slide 78
Slide 78 text
HANAMI
Slide 79
Slide 79 text
Talk about Elixir at the
Ruby Conference
Slide 80
Slide 80 text
Solution
Cause
I can use ROM!
ActiveRecord
is sucks
Slide 81
Slide 81 text
I
Slide 82
Slide 82 text
I
ROM
Slide 83
Slide 83 text
Talk twice about Elixir at the
Ruby Conference
ROM.rb ~ Ecto
Slide 84
Slide 84 text
Solution
Cause
I can use ROM!
If you can work
with complex
solutions
ActiveRecord
is sucks
Slide 85
Slide 85 text
Solution
Cause
Microservices!
Monolithic
architecture
It’s all sucks
Slide 86
Slide 86 text
Monolithic
Microservices
vs
Slide 87
Slide 87 text
Monolithic
Microservices
!=
Slide 88
Slide 88 text
Monolithic
Microservices
>
Slide 89
Slide 89 text
Monolithic
Microservices
>
Slide 90
Slide 90 text
Solution
Cause
Microservices!
Good choice!
Monolithic
architecture
It’s all sucks