SlideShare a Scribd company logo
asalazar@advlatam.com
@betoSalazar
Nowadays Architecture Trends,
from Monolith to Microservices and Serverless
Alberto Salazar,
CTO Advance Latam,
Java Champion
Auth0 Ambassador
Oracle Groundbreaker Ambassador
8th March 2019
Alberto Salazar
@betoSalazar
www.advlatam.com
www.cloudbanco.com
www.ecuadorjug.org www.javaday.ec
● Author
● Speaker
● Community
● Java Champion
● Groundbreaker
● Auth0 Ambassador
● Chief Advance Latam
How I get experience?
@betoSalazar
The monolith is our legacy ?
Source: 97 Things Every Software Architect Should Know
@betoSalazar
The monolith is our legacy ?
The journey
● Overview Monolith - Microservices - Serverless
● Monolith in real life
● Microservices really?
● Third party services and Serverless
● Tips, tricks, pros, cons & code
asalazar@advlatam.com
@betoSalazar
Architecture Trends
Overview Monolith - Microservices - Serverless
Monolith = Legacy ?
@betoSalazar
Application Server
MONOLITH (EAR | WAR | JAR)
Servlets
EJBs
JPA
Balancer
Monolith = Legacy ?
@betoSalazar
Application Server
MONOLITH (EAR | WAR | JAR)
Servlets
EJBs
JPA
Balancer
Customer Payments Loans
Funds
Transfer
N…1 N…
Monolith = Legacy ?
@betoSalazar
Application Server
MONOLITH (EAR |
WAR | JAR)
Servlets
EJBs
JPA
Balancer
MONOLITH (EAR |
WAR | JAR)
Servlets
EJBs
JPA
MONOLITH (EAR |
WAR | JAR)
Servlets
EJBs
JPA
MONOLITH (EAR |
WAR | JAR)
Servlets
EJBs
JPA
MONOLITH (EAR |
WAR | JAR)
Servlets
EJBs
JPA
MONOLITH (EAR |
WAR | JAR)
Servlets
EJBs
JPA
MONOLITH (EAR |
WAR | JAR)
Servlets
EJBs
JPA
MONOLITH (EAR |
WAR | JAR)
Servlets
EJBs
JPA
MONOLITH (EAR |
WAR | JAR)
Servlets
EJBs
JPA
Monolith = Legacy ?
@betoSalazar
Application Server
Microservicios
(EAR | WAR |
JAR)
Servlets
EJBs
JPA
Application Server
Microservicios
(EAR | WAR |
JAR)
Servlets
EJBs
JPA
Application Server
Microservicios
(EAR | WAR |
JAR)
Servlets
EJBs
JPA
Application Server
Microservicios
(EAR | WAR |
JAR)
Servlets
EJBs
JPA
Application Server
Microservicios
(EAR | WAR |
JAR)
Servlets
EJBs
JPA
Application Server
Microservicios
(EAR | WAR |
JAR)
Servlets
EJBs
JPA
Application Server
Microservicios
(EAR | WAR |
JAR)
Servlets
EJBs
JPA
Monolith = Legacy ?
Characteristics
! Attachment to the environment(language, platform & OS)
! Single logical executable, deploy everything at once or nothing at all
! Bottlenecks and Failure of part == failure of whole
! Take months even years getting into production
! Centralized authority slows the delivery process (DBA, OPS, QA)
! Coordinated releases are hard, because brings many changes
together from different teams
@betoSalazar
The Monolith vs Microservices
How it looks
http://microservices.io/patterns/monolithic.html http://microservices.io/patterns/microservices.html
@betoSalazar
Microservices
Characteristics
! Deployable, executable & scaled independently
! Smaller code modules are easier to understand
! High cohesion, low coupling
! Failure is isolated (Fail one part of the system)
! Independent Teams (decide their own
architecture)
! Polyglot “Plus”
https://martinfowler.com/articles/microservices.html
https://martinfowler.com/bliki/MicroservicePrerequisites.html
@betoSalazar
Serverless
Serverless
! Developers code business logic as functions
! Forgetting everything about the servers
provisioning and scaling concerns where the
logic will be executed
! Ephimeral
! Vendor lock-in is a myth
! Multicloud, get the best from each one (AWS,
Oracle Cloud, Google Cloud, AWS, Azure, etc)
! Troubleshooting is hard
@betoSalazar
Monolith vs Microservices vs Serverless
Monolith Microservices Serverless
asalazar@advlatam.com
@betoSalazar
The Monolith in real life
Around 2000s
Monolith: How it looks
What is the problem ?What is the problem ?
Around 2000s
What is the problem ?What is the problem ?
@betoSalazar
Grow the code and the team
What is the problem ?What is the problem ?
@betoSalazar
Modular really ?
Monolith: How it looks -> A huge EAR file
@betoSalazar
More than 10 Years of code
OMG
@betoSalazar
@betoSalazar
The experience
Transactions Scale all or nothing
Fail all or nothing
Cost of maintenance
Coordinate releases
Trace and log
Only one tech stack
Nowadays Architecture Trends
asalazar@advlatam.com
@betoSalazar
Microservices really ?
Microservices really ?
The plan of move forward (Microservices -> cloud -> serverless ?)
Everybody are talking about the result (microservices architectural style)
but just a few are showing the painpath
@betoSalazar
The Monolith to Microservices
How it looks
http://microservices.io/patterns/monolithic.html http://microservices.io/patterns/microservices.html
@betoSalazar
Microservices really ?
@betoSalazar
Microservices our experience
@betoSalazar
!Split and establish interfaces (Test)
!Reuse business logic (Test)
!Move in parts the frontend (Evolve)
!Rewrite or refactor the backend (Test)
!Cultural evolution (CI - CD - DevOps)
JEE application server (JBoss or WL or WAS)
thebanking.ear
banking-web.war
banking-js.jar
backoffice-web.war
accounts.jar
loans.jar
customers.jar
The Monolith to Microservices
The Monolith
1 to n modules
1 to n modules
Http
Web
Server
@betoSalazar
JEE application server (JBoss or WL or WAS)
banking-web.ear
backoffice-web.ear
accounts.ear
loans.ear
customers.ear
The Monolith to Microservices
The Monolith
1 to n modules
Http
Web
Server
@betoSalazar
JEE application server
The Monolith
Database
JEE application server
theApp.ear
MODULE1.war
MODULE1-JS.jar
MODULE2.war
MODULE3.war
css.war
MODULE4.war
businesslogic.jar
businesslogic.jar
businesslogic.jar
businesslogic.jar
@betoSalazar
The Monolith to MicroservicesThe Monolith to Microservices
Split the frontend from the backend
JSF Controller Code
Call the Facade
The path -> Split the frontend from the backend
@betoSalazar
Split the frontend from the backend
Facade Code
Call the Business
Logic
@betoSalazar
The Monolith to MicroservicesThe Monolith to Microservices
The communication
JEE application server
theApp-backend.ear
businesslogi
businesslogi
businesslogibusinesslogic.jar
JEE application server
theApp.ear
MODULE1.war
MODULE1-JS.jar
MODULE2.war
MODULE3.war
css.war
MODULE4.war
Database
Message
Queue
Apache ActiveMQ
RabbitMQ
Apache Kafka……
http://activemq.apache.org
https://www.rabbitmq.com
https://kafka.apache.org
producer.jar
http://camel.apache.org/mdc-logging.html
http://camel.apache.org/eip.html
consumer.jar
@betoSalazar
The Monolith to MicroservicesThe Monolith to Microservices
Split the frontend from the backend
Call the Processor
@betoSalazar
The Monolith to MicroservicesThe Monolith to Microservices
Split the frontend from the backend
Camel Processor Code
Call the Facade
@betoSalazar
The Monolith to MicroservicesThe Monolith to Microservices
JEE application server
theApp.ear
MODULE1.war
MODULE1-JS.jar
MODULE2.war
MODULE3.war
css.war
MODULE4.war
Database
Message
Queue
producer.jar
JEE application server
theApp-backend.ear
businesslogic.jar
consumer.jar
JEE application server
theApp-backend.ear
businesslogic.jar
consumer.jar
JEE application server
theApp-backend.ear
businesslogic.jar
consumer.jar
JEE application server
theApp-backend.ear
businesslogic.jar
consumer.jar
JEE application server
theApp-backend.ear
businesslogic.jar
consumer.jar
Split the backend
@betoSalazar
The Monolith to MicroservicesThe Monolith to Microservices
Split the backend
https://projects.spring.io/spring-boot/
https://microprofile.io/
https://vertx.io/
https://www.docker.com/
https://github.com/fabric8io/docker-maven-plugin
https://github.com/spotify/docker-maven-plugin
Spring boot
install just
what you need
in a Docker
Container
Osgi container
engine-orchestrator.jar
Osgi container
dynamic-camel-routes.jar
fat jar
batch.jar
fat jar
services.jar
fat jar
business-module1.jar
fat jar
business-module-n.jar
Service
some api
Service
some api
Service
some api
Service
some api
Service
some api
Service
some api
businesslogic.jar
consumer.jar
businesslogic.jar
consumer.jar
businesslogic.jar
consumer.jar
businesslogic.jar
consumer.jar
businesslogic.jar
consumer.jar
businesslogic.jar
consumer.jar
@betoSalazar
The Monolith to Microservices
Logging, trace & Monitoring
http://www.baeldung.com/mdc-in-log4j-2-logback
https://www.elastic.co/products/elasticsearch
https://www.elastic.co/products/logstash
https://www.elastic.co/products/kibana
logstash
1) Use Mapped Diagnostic Context (MDC)
Enrich log files
2) Introduce a correlationId
3) Collect the logs
4) Search by rest API or use Kibana
Osgi container
engine-orchestrator.jar
Osgi container
dynamic-camel-routes.jar
fat jar
batch.jar
fat jar
services.jar
fat jar
business-module1.jar
fat jar
business-module-n.jar
Service
some api
Service
some api
Service
some api
Service
some api
Service
some api
Service
some api
businesslogic.jar
consumer.jar
businesslogic.jar
consumer.jar
businesslogic.jar
consumer.jar
businesslogic.jar
consumer.jar
businesslogic.jar
consumer.jar
businesslogic.jar
consumer.jar
Monolith to Microservices -> Split the frontend from the backend
@betoSalazar
JEE application server
theApp-backend.ear
businesslogic.jar
consumer.jar
JEE application server
theApp-backend.ear
businesslogic.jar
consumer.jar
JEE application server
theApp-backend.ear
businesslogic.jar
consumer.jar
JEE application server
theApp.ear
MODULE1.war
MODULE1-JS.jar
MODULE2.war
MODULE3.war
css.war
MODULE4.war
Database
Message
Queue
producer.jar
JEE application server
theApp-backend.ear
businesslogic.jar
consumer.jar
JEE application server
theApp-backend.ear
businesslogic.jar
consumer.jarRest API
rest-client.jar
Rest-api-layer
Rest-api-layer
Rest-api-layer
Rest-api-layer
Rest-api-layer
Monolith to Microservices -> Split the frontend from the backend
@betoSalazar
Microservices
Domain based services
@betoSalazar
Microservices or Modules or Microliths
We already split our monolith or we are on it
https://jwt.io/
https://nodejs.org/es/
https://facebook.github.io/react/
https://angular.io/
https://facebook.github.io/react-native/
fat jar
api-gateway.jar
Services
api rest
POST bank.com/api/v1/accouts
POST bank.com/api/v1/accouts
logstash
Login
Angular nodejs
Transaction
Angular nodejs
Module n
Angular nodejs
Osgi container
engine-orchestrator.jar
Osgi container
dynamic-camel-routes.jar
fat jar
batch.jar
fat jar
services.jar
fat jar
business-module1.jar
fat jar
business-module-n.jar
Service
some api
Service
some api
Service
some api
Service
some api
Service
some api
Service
some api
businesslogic.jar
Rest-api-layer
businesslogic.jar
Rest-api-layer
businesslogic.jar
Rest-api-layer
businesslogic.jar
Rest-api-layer
businesslogic.jar
Rest-api-layer
businesslogic.jar
Rest-api-layer
JWT
JSON WEB TOKEN
&
Authorization Server
Containers - Orchestrators - Cloud Istio: Service Mesh
Containers (Docker) ->
Manage the same code + environment in diferente stages
Orchestrators (Kubernetes, Docker Swarm, Mesos) ->
We need to orchestrated our containers
Cloud (eg. Oracle Cloud, Google Cloud, AWS, Azure, Bluemix)
@betoSalazar
The cost of communication over the
network is not trivial.
@betoSalazar
The experience
It’s hard to trace the thread of execution in a
distributed system.
@betoSalazar
The experience
Eventual consistency ?
@betoSalazar
The experience
The cost of development goes up.
@betoSalazar
The experience
Do you depend on a Monolith ?
Provably we will have Bottlenecks
@betoSalazar
Do you have an automation pipeline process ?
DELIVERY PIPELINE
CI / CD
CODE BUILD TEST DEPLOY
CODE ANALYZE (Quality and security)
If your answer is not, do it before
microservices
@betoSalazar
@betoSalazar
The experience
Lose TransactionsScaling
Fail in parts
More tech stack
Trace and logging
Polyglot
Easy to understand
Lose Single data repo
asalazar@advlatam.com
@betoSalazar
Serverless
FaaS, Backend as Services
Third party services
Serverless
Serverless
! Developers code business logic as functions
! Forgetting everything about the servers
provisioning and scaling concerns where the
logic will be executed
! Ephimeral
! Vendor lock-in is a myth
! Multicloud, get the best from each one (AWS,
Oracle Cloud, Google Cloud, AWS, Azure, etc)
! Troubleshooting is hard
@betoSalazar
https://cloud.spring.io/spring-cloud-function/
Spring Cloud Functions
FaaS
! Promote the implementation of business logic
via functions
! Adapters for
• AWS Lambda,
• Microsoft Azure,
• Apache OpenWhisk
• and possibly other "serverless"
service providers.
@betoSalazar
The cost consideration
@betoSalazar
! Around 262000 requests for 1 USD
• Request / function = 0.000000313 USD + 0.0000035 USD for the API
Gateway fees
• Around 100ms of time for every invocationAWS Lambda, and above the
minimum 128MB memory
!
@betoSalazar
The experience
Infra ready(serverless) Troubleshooting is hard
If it successful take
care about the Cost
Cold start time
I can create a set of
Microservices as
Functions
Failed fast
asalazar@advlatam.com
@betoSalazar
The Reality - Tips, tricks, pros , cons
The big picture
Osgi container
engine-orchestrator.jar
Osgi container
dynamic-camel-routes.jar
fat jar
batch.jar
fat jar
services.jar
fat jar
business-module1.jar
fat jar
business-module-n.jar
Service
some api
Service
some api
Service
some api
Service
some api
Service
some api
Service
some api
businesslogic.jar
Rest-api-layer
businesslogic.jar
Rest-api-layer
businesslogic.jar
Rest-api-layer
businesslogic.jar
Rest-api-layer
businesslogic.jar
Rest-api-layer
businesslogic.jar
Rest-api-layer
fat jar
api-gateway.jar
Services
api rest
@betoSalazar
The big picture
Osgi container
engine-orchestrator.jar
Osgi container
dynamic-camel-routes.jar
fat jar
batch.jar
fat jar
services.jar
fat jar
business-module1.jar
fat jar
business-module-n.jar
Service
some api
Service
some api
Service
some api
Service
some api
Service
some api
Service
some api
businesslogic.jar
Rest-api-layer
businesslogic.jar
Rest-api-layer
businesslogic.jar
Rest-api-layer
businesslogic.jar
Rest-api-layer
businesslogic.jar
Rest-api-layer
businesslogic.jar
Rest-api-layer
fat jar
api-gateway.jar
Services
api rest
API Gateway Lambda
Lambda
@betoSalazar
Serverless Security
! A user can log in with social network credentials like Facebook, Google
! Returns JWT tokens contain the logged in user
! Use the JSON Web Tokens JWT to validate if a user makes request to a REST Endpoints
! Forget about infrastructure (that’s why we are going serverless, after all) as much as possible;
! Use Auth0 and basically forget about the security details that are behind it.
https://auth0.com
@betoSalazar
Serverless Security
https://auth0.com
@betoSalazar
Reactive systems
Project Reactor
! non-blocking applications
! 10's of millions of messages per second
! Scaling-Out to overcome latency and slow
microservices
https://projectreactor.io
https://projectreactor.io/docs/core/release/reference/
Spring Webflux
https://docs.spring.io/spring/docs/current/spring-framework-reference/web-reactive.html#spring-webflux
! non-blocking HTTP runtimes to the Reactive
Streams API
@betoSalazar
Reactive systems deploy on Oracle Application Container Cloud
@betoSalazar
asalazar@advlatam.com
@betoSalazar
Demo &
Code blueprints:
https://github.com/lasalazarr/secure-serverless
https://github.com/lasalazarr/guide-monolithic-to-microservices
asalazar@advlatam.com
@betoSalazar
Summary
The conclusion
Nowadays Architecture Trends
! Nowadays we are dealing with a Distributed
Complex Architecture
! Secure your endpoints is a rule
! The system and services have to deal with:
• network communications,
• failures,
• rebalances,
• splits and refactor
! Our legacy system are only legacy because
they’ve been successful enough to last this long
The conclusion
Recommendations
If you can fit your team around a table you maybe don’t need microservices
yet
Hybrid approach and employing monolithic architecture styles when needed
Care about logs, monitoring and always use a CORRELATIONID and MDC (Mapped Diagnostic Context)
Experiment your architecture with small pieces of code and requirements.
Several applications with monolithic architecture is a good fit and there is no need to
change or refactor that architecture
Security - JWT json web token, Json Web Signature, Json Web Encryption
Recommendations
To manage changes review the Architectural Clash http://architecturalclash.org
-> In strategy to developed a new way to assess the level of resilience of our frontend
and mobile applications: the Architectural Clash.
Automate the deployment and delivery process -> CI & CD -> DEVOPS Culture
Design for failover, Service load balancing and automatic scaling, data Separation,
Integrity, Performance
If you have monolith dependencies, you probably will have performance issues
The conclusion
Always think about: • Low coupling
• High Cohesion
• SOLID Principales
• CQRS Command Query Responsibility Segregation
asalazar@advlatam.com
@betoSalazar
THANK YOU
Auth0 Ambassadors.
Helping the developer community make the internet
safer.

More Related Content

PDF
ES~Conference Mexico Nowadays Architecture Trends, from Monolith to Microserv...
PDF
Jbcnconf Nowadays Architecture Trends, from Monolith to Microservices and Ser...
PDF
Jconf Colombia Nowadays Architecture Trends, from Monolith to Microservices a...
PDF
Groundbreakers tour Nowadays Architecture Trends, from Monolith to Microservi...
PDF
2018 MONOLITICH TO MICROSERVICES - Conferencia Javeros colombia
PDF
Oracle Code Javaday Sao Paulo Monolith_to Microservices
PDF
Oracle Code One San Francisco - Monolith to microservices
PDF
Voxxed days cluj-napoca Nowadays architecture trends alberto_salazarv2
ES~Conference Mexico Nowadays Architecture Trends, from Monolith to Microserv...
Jbcnconf Nowadays Architecture Trends, from Monolith to Microservices and Ser...
Jconf Colombia Nowadays Architecture Trends, from Monolith to Microservices a...
Groundbreakers tour Nowadays Architecture Trends, from Monolith to Microservi...
2018 MONOLITICH TO MICROSERVICES - Conferencia Javeros colombia
Oracle Code Javaday Sao Paulo Monolith_to Microservices
Oracle Code One San Francisco - Monolith to microservices
Voxxed days cluj-napoca Nowadays architecture trends alberto_salazarv2

Similar to Devnexus - Nowadays Architecture Trends, from Monolith to Microservices and Serverless (20)

PDF
Oracle code bogota-Handle the Complexity of Migrate to Microservices from Mon...
PDF
Oracle Code Javaday Sao Paulo Nowadays Architecture Trends, from Monolith to ...
PDF
Oracle Developer Tour Latam Nowadays Architecture Trends, from Monolith to Mi...
PDF
#JavadayEcuador Monolith to Microservices
PPTX
Understanding Microservices
PDF
Rocking the microservice world with Helidon-LAOUCTour2023.pdf
PDF
Cloudify your applications: microservices and beyond
PDF
Will Microservices Die.pdf
PPTX
The Core of Microservice Architecture(First Approach)
PDF
Changing application demands: What developers need to know
PPTX
From the Monolith to Microservices - CraftConf 2015
PPTX
Concurrency at Scale: Evolution to Micro-Services
PPTX
Elastically scalable architectures with microservices. The end of the monolith?
PPTX
Introduction to microservices
PDF
Microservices for java architects it-symposium-2015-09-15
PPTX
Microservices and OSGi: Better together?
PDF
Microservice Architecture
PDF
Microservices The Good, the Bad, and the Ugly
PDF
Microservices for java architects coders-conf-2015-05-15
PDF
How to grow your own Microservice?
Oracle code bogota-Handle the Complexity of Migrate to Microservices from Mon...
Oracle Code Javaday Sao Paulo Nowadays Architecture Trends, from Monolith to ...
Oracle Developer Tour Latam Nowadays Architecture Trends, from Monolith to Mi...
#JavadayEcuador Monolith to Microservices
Understanding Microservices
Rocking the microservice world with Helidon-LAOUCTour2023.pdf
Cloudify your applications: microservices and beyond
Will Microservices Die.pdf
The Core of Microservice Architecture(First Approach)
Changing application demands: What developers need to know
From the Monolith to Microservices - CraftConf 2015
Concurrency at Scale: Evolution to Micro-Services
Elastically scalable architectures with microservices. The end of the monolith?
Introduction to microservices
Microservices for java architects it-symposium-2015-09-15
Microservices and OSGi: Better together?
Microservice Architecture
Microservices The Good, the Bad, and the Ugly
Microservices for java architects coders-conf-2015-05-15
How to grow your own Microservice?
Ad

Recently uploaded (20)

PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
System and Network Administration Chapter 2
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Introduction to Artificial Intelligence
Softaken Excel to vCard Converter Software.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
How Creative Agencies Leverage Project Management Software.pdf
PTS Company Brochure 2025 (1).pdf.......
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Adobe Illustrator 28.6 Crack My Vision of Vector Design
System and Network Administration Chapter 2
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Wondershare Filmora 15 Crack With Activation Key [2025
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Odoo POS Development Services by CandidRoot Solutions
Design an Analysis of Algorithms II-SECS-1021-03
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
wealthsignaloriginal-com-DS-text-... (1).pdf
Introduction to Artificial Intelligence
Ad

Devnexus - Nowadays Architecture Trends, from Monolith to Microservices and Serverless

  • 1. asalazar@advlatam.com @betoSalazar Nowadays Architecture Trends, from Monolith to Microservices and Serverless Alberto Salazar, CTO Advance Latam, Java Champion Auth0 Ambassador Oracle Groundbreaker Ambassador 8th March 2019
  • 2. Alberto Salazar @betoSalazar www.advlatam.com www.cloudbanco.com www.ecuadorjug.org www.javaday.ec ● Author ● Speaker ● Community ● Java Champion ● Groundbreaker ● Auth0 Ambassador ● Chief Advance Latam
  • 3. How I get experience? @betoSalazar
  • 4. The monolith is our legacy ?
  • 5. Source: 97 Things Every Software Architect Should Know @betoSalazar The monolith is our legacy ?
  • 6. The journey ● Overview Monolith - Microservices - Serverless ● Monolith in real life ● Microservices really? ● Third party services and Serverless ● Tips, tricks, pros, cons & code
  • 8. Monolith = Legacy ? @betoSalazar Application Server MONOLITH (EAR | WAR | JAR) Servlets EJBs JPA Balancer
  • 9. Monolith = Legacy ? @betoSalazar Application Server MONOLITH (EAR | WAR | JAR) Servlets EJBs JPA Balancer Customer Payments Loans Funds Transfer N…1 N…
  • 10. Monolith = Legacy ? @betoSalazar Application Server MONOLITH (EAR | WAR | JAR) Servlets EJBs JPA Balancer MONOLITH (EAR | WAR | JAR) Servlets EJBs JPA MONOLITH (EAR | WAR | JAR) Servlets EJBs JPA MONOLITH (EAR | WAR | JAR) Servlets EJBs JPA MONOLITH (EAR | WAR | JAR) Servlets EJBs JPA MONOLITH (EAR | WAR | JAR) Servlets EJBs JPA MONOLITH (EAR | WAR | JAR) Servlets EJBs JPA MONOLITH (EAR | WAR | JAR) Servlets EJBs JPA MONOLITH (EAR | WAR | JAR) Servlets EJBs JPA
  • 11. Monolith = Legacy ? @betoSalazar Application Server Microservicios (EAR | WAR | JAR) Servlets EJBs JPA Application Server Microservicios (EAR | WAR | JAR) Servlets EJBs JPA Application Server Microservicios (EAR | WAR | JAR) Servlets EJBs JPA Application Server Microservicios (EAR | WAR | JAR) Servlets EJBs JPA Application Server Microservicios (EAR | WAR | JAR) Servlets EJBs JPA Application Server Microservicios (EAR | WAR | JAR) Servlets EJBs JPA Application Server Microservicios (EAR | WAR | JAR) Servlets EJBs JPA
  • 12. Monolith = Legacy ? Characteristics ! Attachment to the environment(language, platform & OS) ! Single logical executable, deploy everything at once or nothing at all ! Bottlenecks and Failure of part == failure of whole ! Take months even years getting into production ! Centralized authority slows the delivery process (DBA, OPS, QA) ! Coordinated releases are hard, because brings many changes together from different teams @betoSalazar
  • 13. The Monolith vs Microservices How it looks http://microservices.io/patterns/monolithic.html http://microservices.io/patterns/microservices.html @betoSalazar
  • 14. Microservices Characteristics ! Deployable, executable & scaled independently ! Smaller code modules are easier to understand ! High cohesion, low coupling ! Failure is isolated (Fail one part of the system) ! Independent Teams (decide their own architecture) ! Polyglot “Plus” https://martinfowler.com/articles/microservices.html https://martinfowler.com/bliki/MicroservicePrerequisites.html @betoSalazar
  • 15. Serverless Serverless ! Developers code business logic as functions ! Forgetting everything about the servers provisioning and scaling concerns where the logic will be executed ! Ephimeral ! Vendor lock-in is a myth ! Multicloud, get the best from each one (AWS, Oracle Cloud, Google Cloud, AWS, Azure, etc) ! Troubleshooting is hard @betoSalazar
  • 16. Monolith vs Microservices vs Serverless Monolith Microservices Serverless
  • 19. What is the problem ?What is the problem ? Around 2000s
  • 20. What is the problem ?What is the problem ? @betoSalazar Grow the code and the team
  • 21. What is the problem ?What is the problem ? @betoSalazar Modular really ?
  • 22. Monolith: How it looks -> A huge EAR file @betoSalazar
  • 23. More than 10 Years of code OMG @betoSalazar
  • 24. @betoSalazar The experience Transactions Scale all or nothing Fail all or nothing Cost of maintenance Coordinate releases Trace and log Only one tech stack
  • 27. Microservices really ? The plan of move forward (Microservices -> cloud -> serverless ?) Everybody are talking about the result (microservices architectural style) but just a few are showing the painpath @betoSalazar
  • 28. The Monolith to Microservices How it looks http://microservices.io/patterns/monolithic.html http://microservices.io/patterns/microservices.html @betoSalazar
  • 30. Microservices our experience @betoSalazar !Split and establish interfaces (Test) !Reuse business logic (Test) !Move in parts the frontend (Evolve) !Rewrite or refactor the backend (Test) !Cultural evolution (CI - CD - DevOps)
  • 31. JEE application server (JBoss or WL or WAS) thebanking.ear banking-web.war banking-js.jar backoffice-web.war accounts.jar loans.jar customers.jar The Monolith to Microservices The Monolith 1 to n modules 1 to n modules Http Web Server @betoSalazar
  • 32. JEE application server (JBoss or WL or WAS) banking-web.ear backoffice-web.ear accounts.ear loans.ear customers.ear The Monolith to Microservices The Monolith 1 to n modules Http Web Server @betoSalazar
  • 33. JEE application server The Monolith Database JEE application server theApp.ear MODULE1.war MODULE1-JS.jar MODULE2.war MODULE3.war css.war MODULE4.war businesslogic.jar businesslogic.jar businesslogic.jar businesslogic.jar @betoSalazar The Monolith to MicroservicesThe Monolith to Microservices
  • 34. Split the frontend from the backend JSF Controller Code Call the Facade The path -> Split the frontend from the backend @betoSalazar
  • 35. Split the frontend from the backend Facade Code Call the Business Logic @betoSalazar The Monolith to MicroservicesThe Monolith to Microservices
  • 36. The communication JEE application server theApp-backend.ear businesslogi businesslogi businesslogibusinesslogic.jar JEE application server theApp.ear MODULE1.war MODULE1-JS.jar MODULE2.war MODULE3.war css.war MODULE4.war Database Message Queue Apache ActiveMQ RabbitMQ Apache Kafka…… http://activemq.apache.org https://www.rabbitmq.com https://kafka.apache.org producer.jar http://camel.apache.org/mdc-logging.html http://camel.apache.org/eip.html consumer.jar @betoSalazar The Monolith to MicroservicesThe Monolith to Microservices
  • 37. Split the frontend from the backend Call the Processor @betoSalazar The Monolith to MicroservicesThe Monolith to Microservices
  • 38. Split the frontend from the backend Camel Processor Code Call the Facade @betoSalazar The Monolith to MicroservicesThe Monolith to Microservices
  • 39. JEE application server theApp.ear MODULE1.war MODULE1-JS.jar MODULE2.war MODULE3.war css.war MODULE4.war Database Message Queue producer.jar JEE application server theApp-backend.ear businesslogic.jar consumer.jar JEE application server theApp-backend.ear businesslogic.jar consumer.jar JEE application server theApp-backend.ear businesslogic.jar consumer.jar JEE application server theApp-backend.ear businesslogic.jar consumer.jar JEE application server theApp-backend.ear businesslogic.jar consumer.jar Split the backend @betoSalazar The Monolith to MicroservicesThe Monolith to Microservices
  • 40. Split the backend https://projects.spring.io/spring-boot/ https://microprofile.io/ https://vertx.io/ https://www.docker.com/ https://github.com/fabric8io/docker-maven-plugin https://github.com/spotify/docker-maven-plugin Spring boot install just what you need in a Docker Container Osgi container engine-orchestrator.jar Osgi container dynamic-camel-routes.jar fat jar batch.jar fat jar services.jar fat jar business-module1.jar fat jar business-module-n.jar Service some api Service some api Service some api Service some api Service some api Service some api businesslogic.jar consumer.jar businesslogic.jar consumer.jar businesslogic.jar consumer.jar businesslogic.jar consumer.jar businesslogic.jar consumer.jar businesslogic.jar consumer.jar @betoSalazar The Monolith to Microservices
  • 41. Logging, trace & Monitoring http://www.baeldung.com/mdc-in-log4j-2-logback https://www.elastic.co/products/elasticsearch https://www.elastic.co/products/logstash https://www.elastic.co/products/kibana logstash 1) Use Mapped Diagnostic Context (MDC) Enrich log files 2) Introduce a correlationId 3) Collect the logs 4) Search by rest API or use Kibana Osgi container engine-orchestrator.jar Osgi container dynamic-camel-routes.jar fat jar batch.jar fat jar services.jar fat jar business-module1.jar fat jar business-module-n.jar Service some api Service some api Service some api Service some api Service some api Service some api businesslogic.jar consumer.jar businesslogic.jar consumer.jar businesslogic.jar consumer.jar businesslogic.jar consumer.jar businesslogic.jar consumer.jar businesslogic.jar consumer.jar Monolith to Microservices -> Split the frontend from the backend @betoSalazar
  • 42. JEE application server theApp-backend.ear businesslogic.jar consumer.jar JEE application server theApp-backend.ear businesslogic.jar consumer.jar JEE application server theApp-backend.ear businesslogic.jar consumer.jar JEE application server theApp.ear MODULE1.war MODULE1-JS.jar MODULE2.war MODULE3.war css.war MODULE4.war Database Message Queue producer.jar JEE application server theApp-backend.ear businesslogic.jar consumer.jar JEE application server theApp-backend.ear businesslogic.jar consumer.jarRest API rest-client.jar Rest-api-layer Rest-api-layer Rest-api-layer Rest-api-layer Rest-api-layer Monolith to Microservices -> Split the frontend from the backend @betoSalazar
  • 44. Microservices or Modules or Microliths We already split our monolith or we are on it https://jwt.io/ https://nodejs.org/es/ https://facebook.github.io/react/ https://angular.io/ https://facebook.github.io/react-native/ fat jar api-gateway.jar Services api rest POST bank.com/api/v1/accouts POST bank.com/api/v1/accouts logstash Login Angular nodejs Transaction Angular nodejs Module n Angular nodejs Osgi container engine-orchestrator.jar Osgi container dynamic-camel-routes.jar fat jar batch.jar fat jar services.jar fat jar business-module1.jar fat jar business-module-n.jar Service some api Service some api Service some api Service some api Service some api Service some api businesslogic.jar Rest-api-layer businesslogic.jar Rest-api-layer businesslogic.jar Rest-api-layer businesslogic.jar Rest-api-layer businesslogic.jar Rest-api-layer businesslogic.jar Rest-api-layer JWT JSON WEB TOKEN & Authorization Server
  • 45. Containers - Orchestrators - Cloud Istio: Service Mesh Containers (Docker) -> Manage the same code + environment in diferente stages Orchestrators (Kubernetes, Docker Swarm, Mesos) -> We need to orchestrated our containers Cloud (eg. Oracle Cloud, Google Cloud, AWS, Azure, Bluemix) @betoSalazar
  • 46. The cost of communication over the network is not trivial. @betoSalazar The experience
  • 47. It’s hard to trace the thread of execution in a distributed system. @betoSalazar The experience
  • 49. The experience The cost of development goes up. @betoSalazar
  • 50. The experience Do you depend on a Monolith ? Provably we will have Bottlenecks @betoSalazar
  • 51. Do you have an automation pipeline process ? DELIVERY PIPELINE CI / CD CODE BUILD TEST DEPLOY CODE ANALYZE (Quality and security) If your answer is not, do it before microservices @betoSalazar
  • 52. @betoSalazar The experience Lose TransactionsScaling Fail in parts More tech stack Trace and logging Polyglot Easy to understand Lose Single data repo
  • 54. Serverless Serverless ! Developers code business logic as functions ! Forgetting everything about the servers provisioning and scaling concerns where the logic will be executed ! Ephimeral ! Vendor lock-in is a myth ! Multicloud, get the best from each one (AWS, Oracle Cloud, Google Cloud, AWS, Azure, etc) ! Troubleshooting is hard @betoSalazar
  • 55. https://cloud.spring.io/spring-cloud-function/ Spring Cloud Functions FaaS ! Promote the implementation of business logic via functions ! Adapters for • AWS Lambda, • Microsoft Azure, • Apache OpenWhisk • and possibly other "serverless" service providers. @betoSalazar
  • 56. The cost consideration @betoSalazar ! Around 262000 requests for 1 USD • Request / function = 0.000000313 USD + 0.0000035 USD for the API Gateway fees • Around 100ms of time for every invocationAWS Lambda, and above the minimum 128MB memory !
  • 57. @betoSalazar The experience Infra ready(serverless) Troubleshooting is hard If it successful take care about the Cost Cold start time I can create a set of Microservices as Functions Failed fast
  • 59. The big picture Osgi container engine-orchestrator.jar Osgi container dynamic-camel-routes.jar fat jar batch.jar fat jar services.jar fat jar business-module1.jar fat jar business-module-n.jar Service some api Service some api Service some api Service some api Service some api Service some api businesslogic.jar Rest-api-layer businesslogic.jar Rest-api-layer businesslogic.jar Rest-api-layer businesslogic.jar Rest-api-layer businesslogic.jar Rest-api-layer businesslogic.jar Rest-api-layer fat jar api-gateway.jar Services api rest @betoSalazar
  • 60. The big picture Osgi container engine-orchestrator.jar Osgi container dynamic-camel-routes.jar fat jar batch.jar fat jar services.jar fat jar business-module1.jar fat jar business-module-n.jar Service some api Service some api Service some api Service some api Service some api Service some api businesslogic.jar Rest-api-layer businesslogic.jar Rest-api-layer businesslogic.jar Rest-api-layer businesslogic.jar Rest-api-layer businesslogic.jar Rest-api-layer businesslogic.jar Rest-api-layer fat jar api-gateway.jar Services api rest API Gateway Lambda Lambda @betoSalazar
  • 61. Serverless Security ! A user can log in with social network credentials like Facebook, Google ! Returns JWT tokens contain the logged in user ! Use the JSON Web Tokens JWT to validate if a user makes request to a REST Endpoints ! Forget about infrastructure (that’s why we are going serverless, after all) as much as possible; ! Use Auth0 and basically forget about the security details that are behind it. https://auth0.com @betoSalazar
  • 63. Reactive systems Project Reactor ! non-blocking applications ! 10's of millions of messages per second ! Scaling-Out to overcome latency and slow microservices https://projectreactor.io https://projectreactor.io/docs/core/release/reference/ Spring Webflux https://docs.spring.io/spring/docs/current/spring-framework-reference/web-reactive.html#spring-webflux ! non-blocking HTTP runtimes to the Reactive Streams API @betoSalazar
  • 64. Reactive systems deploy on Oracle Application Container Cloud @betoSalazar
  • 67. The conclusion Nowadays Architecture Trends ! Nowadays we are dealing with a Distributed Complex Architecture ! Secure your endpoints is a rule ! The system and services have to deal with: • network communications, • failures, • rebalances, • splits and refactor ! Our legacy system are only legacy because they’ve been successful enough to last this long
  • 68. The conclusion Recommendations If you can fit your team around a table you maybe don’t need microservices yet Hybrid approach and employing monolithic architecture styles when needed Care about logs, monitoring and always use a CORRELATIONID and MDC (Mapped Diagnostic Context) Experiment your architecture with small pieces of code and requirements. Several applications with monolithic architecture is a good fit and there is no need to change or refactor that architecture Security - JWT json web token, Json Web Signature, Json Web Encryption
  • 69. Recommendations To manage changes review the Architectural Clash http://architecturalclash.org -> In strategy to developed a new way to assess the level of resilience of our frontend and mobile applications: the Architectural Clash. Automate the deployment and delivery process -> CI & CD -> DEVOPS Culture Design for failover, Service load balancing and automatic scaling, data Separation, Integrity, Performance If you have monolith dependencies, you probably will have performance issues The conclusion Always think about: • Low coupling • High Cohesion • SOLID Principales • CQRS Command Query Responsibility Segregation
  • 70. asalazar@advlatam.com @betoSalazar THANK YOU Auth0 Ambassadors. Helping the developer community make the internet safer.