SlideShare a Scribd company logo
1 of 54
Download to read offline
Live Long and Prosper
to Monolith
Alex Soto
@alexsotob
Prague, 18-19 October 2018
@alexsotob2
Alex Soto
Red Hat Engineer
www.lordofthejars.com
@alexsotob
Who Am I?
@alexsotob3
https://www.manning.com/books/testing-java-microservices
@alexsotob4
Questions
@alexsotob5
@alexsotob6
@alexsotob7
… due to the given burdens of cost and organisational maturity,
microservices will likely never reach the Adopt phase“ Rebecca Parsons - CTO at ThoughtWorks
@alexsotob8
@alexsotob9
Isolation of Code
@alexsotob10
Isolation of Code
review
api
impl
detail
api
impl
game
api
impl
public
exposes only what is required
favour low-coupling
private
highly cohesive
reduces our memory footprint
IMPL
API
Code Asset, Java 9 Modules
@alexsotob11
Isolation of Code
Java 9 - Modules
module-info.java
@alexsotob12
Isolation of Data
@alexsotob13
Isolation of Data
game schema
Game
Detail
detail schema
Reviewreview schema
Module == Schema
Joins inside Schema
Referential Integrity across Schemas
Global transactions
@alexsotob14
Isolation of Data
game schema
Game
Detail
detail schema
Reviewreview schema
.sql
.sql
.sql
.sql
.sql
?
?
?
@alexsotob15
Isolation of Data
@alexsotob16
Isolation of Data
DB
V2__Update.sql
V1__Initial.sql
SCHEMA_VERSION
@alexsotob17
Isolation of Data
Flyway f = new Flyway();
f.setDataSource();
f.migrate();
mvn flyway:migrate
<configuration>
<url>..</url>
…
</configuration>
<flyway:migrate url=“” user=“”/>
flyway migrate -url=… -user=…
gradle flywayMigrate
flyway {
url=“..”
user=“..
}
@alexsotob18
Reactive Extensions
@alexsotob19
Reactive Java
Creates Stream
Sends data
Where to Run
Combiner
How to combine
Final Run
@alexsotob20
Network
@alexsotob21
Circuit Breaker Pattern
@alexsotob22
Circuit Breaker Pattern
Closed
Open
Half
Open
success
error
[under threshold]
fail
[threshold reached]
success
reset timeoutfail
@alexsotob23
Circuit Breaker
Defines CB
Wrapped function
Recovery
@alexsotob24
DEMO
@alexsotob25
@alexsotob26
@alexsotob27
Your code has
NO BUSINESS VALUE
until it’s deployed
@alexsotob28
@alexsotob29
OPS PMO DBASECBIZ DEV QA
@alexsotob30
@alexsotob31
Your Stack Matters
Server Hardware
Operating System
Application Server
your.war
Java Virtual Machine
Custom Configuration
Linux Kernel Version & Distribution
Java 1.7.0_67
Tomcat, Wildfly, Jetty
JDBC driver, users
@alexsotob32
DevOps Challenges for Multiple Containers
▪ How to scale?
▪ How to avoid port conflicts?
▪ How to manage them on
multiple hosts?
▪ What happens if a host has
trouble?
▪ How to keep them running?
▪ How to update them?
▪ Where are my containers?
Node
Node Node
Node Node
Logger
Node
@alexsotob33
ssh docker run
ssh docker run
ssh docker run
@alexsotob34
@alexsotob35
▪ Greek for “Helmsman,” also the root of the word
“Governor” (from latin: gubernator)
▪ Container orchestrator
▪ Supports multiple cloud and bare-metal
environments
▪ Inspired by Google’s experience with containers
▪ Open source, written in Go
▪ Manage applications, not machines
Meet Kubernetes
@alexsotob36
Kubernetes Cluster
Ops
Dev
Master
api
etcd
scheduler
controllers
Node
Node Node
Node Node
Logger
Node
@alexsotob37
Infrastructure
@alexsotob38
Deploying in Cluster
Always two instances of the image
Docker image to run
Port
@alexsotob39
Deploying in Cluster
Reverse Proxy Router
Number of instances LB
@alexsotob40
Cloud Native Application
@alexsotob41
Infrastructure
sticky session
Shopping Cart User A
@alexsotob42
In-Memory Data Grid
In-Memory DataGrid
Shopping Cart User A Shopping Cart User A
@alexsotob43
Release as Unicorns
@alexsotob44
Release as Unicorns
Build Dockerfile DeployBuild Container Testing in Production Release
s2i, OpenShift, Fabric8, Istio
Teiid, Debezium (Test Prod)
@alexsotob45
Let’s Wind Down
@alexsotob46
Advantages of monolith
> Local Calls
> All parts always up
> Easy to debug
> Easy to test
> Refactor without running surprises
> You see the real world every time
> Easy to deploy (coordination)
> Polyglot Languages, DB
@alexsotob47
Digital Darwinism
Self-Service,
On-Demand,
Elastic,
Infrastructure
as
Code
(Cloud)
Re-Org to
DevOps
Automation
Puppet, Chef,
Ansible

and/or
Kubernetes
CI & CD
Deployment
Pipeline
Advanced
Deployment
Techniques
Microservices
@alexsotob48
https://www.slideshare.net/dbryant_uk/oreilly-sacon-ny-2018-continuous-delivery-patterns-for-contemporary-architecture/2
You In The Near Future
@alexsotob49
@alexsotob50
Stats service
User Service
Awards Service
Question Service
Advertise Service
Question Service
@alexsotob51
NO, it is a monolith
https://www.infoq.com/news/2015/06/scaling-stack-overflow
@alexsotob52
@alexsotob53
@alexsotob asotobue@redhat.com

More Related Content

Similar to Long Live and Prosper To Monolith

Similar to Long Live and Prosper To Monolith (20)

Live Long and Prosper to Monolith
Live Long and Prosper to MonolithLive Long and Prosper to Monolith
Live Long and Prosper to Monolith
 
What monolith can learn from microservices?
What monolith can learn from microservices?What monolith can learn from microservices?
What monolith can learn from microservices?
 
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETESKUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES
 
Sail in the Cloud - An intro to Istio
Sail in the Cloud  - An intro to IstioSail in the Cloud  - An intro to Istio
Sail in the Cloud - An intro to Istio
 
Microservices testing and automation
Microservices testing and automationMicroservices testing and automation
Microservices testing and automation
 
KubeBoot - Spring Boot deployment on Kubernetes
KubeBoot - Spring Boot deployment on KubernetesKubeBoot - Spring Boot deployment on Kubernetes
KubeBoot - Spring Boot deployment on Kubernetes
 
Alex Pshul: What We Learned by Testing Execution of 300K Messages/Min in a Se...
Alex Pshul: What We Learned by Testing Execution of 300K Messages/Min in a Se...Alex Pshul: What We Learned by Testing Execution of 300K Messages/Min in a Se...
Alex Pshul: What We Learned by Testing Execution of 300K Messages/Min in a Se...
 
Chaos Engineering Kubernetes
Chaos Engineering KubernetesChaos Engineering Kubernetes
Chaos Engineering Kubernetes
 
Oracle Developer Tour Latam Nowadays Architecture Trends, from Monolith to Mi...
Oracle Developer Tour Latam Nowadays Architecture Trends, from Monolith to Mi...Oracle Developer Tour Latam Nowadays Architecture Trends, from Monolith to Mi...
Oracle Developer Tour Latam Nowadays Architecture Trends, from Monolith to Mi...
 
Cloud, Containers, Kubernetes (YOW Melbourne 2018)
Cloud, Containers, Kubernetes (YOW Melbourne 2018)Cloud, Containers, Kubernetes (YOW Melbourne 2018)
Cloud, Containers, Kubernetes (YOW Melbourne 2018)
 
Istio service mesh & pragmatic microservices architecture
Istio service mesh & pragmatic microservices architectureIstio service mesh & pragmatic microservices architecture
Istio service mesh & pragmatic microservices architecture
 
Istio Service Mesh & pragmatic microservices architecture
Istio Service Mesh & pragmatic microservices architectureIstio Service Mesh & pragmatic microservices architecture
Istio Service Mesh & pragmatic microservices architecture
 
Cloud, Containers, Kubernetes (YOW Sydney 2018)
Cloud, Containers, Kubernetes (YOW Sydney 2018)Cloud, Containers, Kubernetes (YOW Sydney 2018)
Cloud, Containers, Kubernetes (YOW Sydney 2018)
 
Cloud, Containers, Kubernetes (YOW Brisbane 2018)
Cloud, Containers, Kubernetes (YOW Brisbane 2018)Cloud, Containers, Kubernetes (YOW Brisbane 2018)
Cloud, Containers, Kubernetes (YOW Brisbane 2018)
 
Zero Downtime Deployment in Microservices era
Zero Downtime Deployment in Microservices eraZero Downtime Deployment in Microservices era
Zero Downtime Deployment in Microservices era
 
TechXLR8 - XLR8 your cloud with Docker and Serverless FaaS
TechXLR8 - XLR8 your cloud with Docker and Serverless FaaSTechXLR8 - XLR8 your cloud with Docker and Serverless FaaS
TechXLR8 - XLR8 your cloud with Docker and Serverless FaaS
 
Kubernetes Native Java
Kubernetes Native JavaKubernetes Native Java
Kubernetes Native Java
 
Oracle Code Javaday Sao Paulo Nowadays Architecture Trends, from Monolith to ...
Oracle Code Javaday Sao Paulo Nowadays Architecture Trends, from Monolith to ...Oracle Code Javaday Sao Paulo Nowadays Architecture Trends, from Monolith to ...
Oracle Code Javaday Sao Paulo Nowadays Architecture Trends, from Monolith to ...
 
Zenko & MetalK8s @ Dublin Docker Meetup, June 2018
Zenko & MetalK8s @ Dublin Docker Meetup, June 2018Zenko & MetalK8s @ Dublin Docker Meetup, June 2018
Zenko & MetalK8s @ Dublin Docker Meetup, June 2018
 
Day 2 Kubernetes - Tools for Operability (HashiConf)
Day 2 Kubernetes - Tools for Operability (HashiConf)Day 2 Kubernetes - Tools for Operability (HashiConf)
Day 2 Kubernetes - Tools for Operability (HashiConf)
 

More from Alex Soto

More from Alex Soto (20)

Reactive Programming for Real Use Cases
Reactive Programming for Real Use CasesReactive Programming for Real Use Cases
Reactive Programming for Real Use Cases
 
Chaos Engineering Kubernetes
Chaos Engineering KubernetesChaos Engineering Kubernetes
Chaos Engineering Kubernetes
 
Testing in Production: From DevTestOops to DevTestOps
Testing in Production: From DevTestOops to DevTestOpsTesting in Production: From DevTestOops to DevTestOps
Testing in Production: From DevTestOops to DevTestOps
 
Supersonic Subatomic Java
Supersonic Subatomic JavaSupersonic Subatomic Java
Supersonic Subatomic Java
 
From DevTestOops to DevTestOps
From DevTestOops to DevTestOpsFrom DevTestOops to DevTestOps
From DevTestOops to DevTestOps
 
Service Mesh Patterns
Service Mesh PatternsService Mesh Patterns
Service Mesh Patterns
 
Supersonic, Subatomic Java
Supersonic, Subatomic JavaSupersonic, Subatomic Java
Supersonic, Subatomic Java
 
Zero Downtime Deployment in Microservices era
Zero Downtime Deployment in Microservices eraZero Downtime Deployment in Microservices era
Zero Downtime Deployment in Microservices era
 
Sail in the cloud - An intro to Istio commit
Sail in the cloud - An intro to Istio commitSail in the cloud - An intro to Istio commit
Sail in the cloud - An intro to Istio commit
 
Testing XXIst Century
Testing XXIst CenturyTesting XXIst Century
Testing XXIst Century
 
Arquillian Constellation
Arquillian ConstellationArquillian Constellation
Arquillian Constellation
 
Testing for Unicorns
Testing for UnicornsTesting for Unicorns
Testing for Unicorns
 
Testing in the 21st Century (ExpoQA)
Testing in the 21st Century (ExpoQA)Testing in the 21st Century (ExpoQA)
Testing in the 21st Century (ExpoQA)
 
10 Testing libraries any Java developer should know
10 Testing libraries any Java developer should know10 Testing libraries any Java developer should know
10 Testing libraries any Java developer should know
 
Testing Java Microservices Workshop
Testing Java Microservices WorkshopTesting Java Microservices Workshop
Testing Java Microservices Workshop
 
Testing in the 21st Century
Testing in the 21st CenturyTesting in the 21st Century
Testing in the 21st Century
 
TEST SMARTER AND GAIN SOME TIME BACK
TEST SMARTER AND GAIN SOME TIME BACKTEST SMARTER AND GAIN SOME TIME BACK
TEST SMARTER AND GAIN SOME TIME BACK
 
Deploy And Release at Kubernetes Era
Deploy And Release at Kubernetes EraDeploy And Release at Kubernetes Era
Deploy And Release at Kubernetes Era
 
Sail In The Cloud
Sail In The CloudSail In The Cloud
Sail In The Cloud
 
Testing in the 21st Century
Testing in the 21st CenturyTesting in the 21st Century
Testing in the 21st Century
 

Recently uploaded

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Recently uploaded (20)

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 

Long Live and Prosper To Monolith