SlideShare a Scribd company logo
1 of 54
Download to read offline
From Monolith To Micro-service and back

The Self Contained System
(Joan R)
Microservices: The Right Way (Daniel Woods)
(Scott Patt studio)
• C4J
• Senior Java Web Developer, Java Coach, Architect
• JSR-375
• Java EE Security API Expert group member
• Java EE Believer
@rdebusscher
@Atbash_EE
http://jsfcorner.blogspot.be
http://javaeesquad.blogspot.be
https://www.atbash.be
W H O A M I
RUDY DE BUSSCHER
• "Architecture"
• Monolith
• Micro-service
• Self Contained System
• Guidelines
• Deployment
A G E N D A
M O N O L I T H V S M I C R O - S E R V I C E
• "Architecture"
• Monolith
Characteristics
Demo
• Micro-service
• Self Contained System
• Guidelines
• Deployment
A G E N D A
M O N O L I T H V S M I C R O S E R V I C E
M O N O L I T H
• WHAT?
• Single code base
• Compiled together
• Single artefact
M O N O L I T H ( P R O )
• Easy up and running
• Easier integration
• Uniformity (like UI but also code)
• Consistency
M O N O L I T H ( C O N T R A )
• Insult like "legacy"
• Team communication issues
• Slow delivery
• Issues block deployment
• Resource consumption cannot be spread.
• Difficult to maintain for larger codebases
• > 50 000 or > 100 000 LOC ?
" B E T T E R " A L T E R N A T I V E S
MICRO-SERVICES
• Successful Examples
• Netflix, Amazon, Zalando, Ebay, ...
E T S Y
• Online shop for hand-made / vintage products
• 150 engineers, 50 deploys a day
USING A SINGLE MONOLITH
There is no such thing as a "silver bullet"
W H A T I S B E S T ?
• Monolith
• Micro-service
• Some other thing
• IT DEPENDS
• "Architecture"
• Monolith
Characteristics
Demo
• Micro-service
• Self Contained System
• Guidelines
• Deployment
A G E N D A
M O N O L I T H V S M I C R O S E R V I C E
ORDER FLOW
Demo
CLASSIC MODELS

SHOP
• "Architecture"
• Monolith
• Micro-service
Characteristics
Pitfalls
• Self Contained System
• Guidelines
• Deployment
A G E N D A
M O N O L I T H V S M I C R O S E R V I C E
M I C R O - S E R V I C E
• WHAT?
• Software applications as a suite of
independently deployable, small, modular
services and communicates through a well-
defined, lightweight mechanism to serve a
business goal.
B U S I N E S S G O A L
• SRP
• Each micro-service
• Single responsibility
• Around a business or technical domain
• BAD - DDD
• Boundary Aware Design (BAD) -> Not used
• Domain Driven Design (DDD)
S M A L L
• How small is small?
• Pizza team?
• As much as it takes for a Single Responsibility
• If some micro services are too small
• nano-services (anti-pattern) "single method services."
• group them into larger micro-service.
I N D E P E N D E N T L Y
I N D E P E N D E N T L Y
C O M M U N I C A T I O N
• REST style with JSON data over HTTP.
• Independently, means prepare for failure
• What happens when a micro-service is down?
• Fails also => monolith situation!
• Cache! (see further on)
• "Architecture"
• Monolith
• Micro-service
Characteristics
Pitfalls
• Self Contained System
• Guidelines
• Deployment
A G E N D A
M O N O L I T H V S M I C R O S E R V I C E
F A L L A C I E S O F D I S T R I B U T E D
C O M P U T I N G
1. The network is reliable.
2. Latency is zero.
3. Bandwidth is infinite.
4. The network is secure.
5. Topology doesn't change.
6. There is one administrator.
7. Transport cost is zero.
8. The network is homogeneous.
FAILURES
SLOWER / CACHING
CONVERSIONS
SECURITY
T R A N S A C T I O N A L
• What if "unit of work" span Multiple micro-
services?
• Business rollback / Compensating transaction
• Eventual consistency
D I S C O V E R Y
• Where is micro-service I need?
• Where is the Central messaging system?
• Hardcoded through config files
• Discovery tools (Consul, Zookeeper, etc, ...)
A S Y N C H R O N O U S
• Async servlet
• Not on same thread
• Async "actions"
• UI puts message on central bus.
S P A M O N O L I T H
• "Architecture"
• Monolith
• Micro-service
• Self Contained System
• Characteristics
• Demo
• Guidelines
• Deployment
A G E N D A
M O N O L I T H V S M I C R O S E R V I C E
S E L F C O N T A I N E D S Y S T E M
• Combines Monolith and Micro-service
characteristics.
• More a micro services then a monolith.
• Tackles some pitfalls of other systems.
• No Silver bullet.
S C S C H A R A C T E R I S T I C S
• Each SCS is an autonomous web application.
• Each SCS must include UI, Logic and Data
• Optional Service API
• Inter SCS communication, 3th parties
• Asynchronous communication where possible.
• No shared code / logic
• Each SCS is owned by one team.
S C S C H A R A C T E R I S T I C S
S C S P R O
• Better maintainability.
• SRP - but on all levels (UI, Logic, Data)
• Fewer units
• Avoid SPA monolith
S C S B E S T P R A C T I C E S
• No direct communication
• Use of Service bus
• Asynchronous 'Actions'
• JSON data over REST.
• Caching data other SCS locally
• Domain driven design
• "Architecture"
• Monolith
• Micro-service
• Self Contained System
• Characteristics
• Demo
• Guidelines
• Deployment
A G E N D A
M O N O L I T H V S M I C R O S E R V I C E
• "Architecture"
• Monolith
• Micro-service
• Self Contained System
• Guidelines
• Deployment
A G E N D A
M O N O L I T H V S M I C R O S E R V I C E
G U I D E L I N E S ( 1 )
• All applications starts small
• Work in iterative manner
• Small -> monolith is easier
• Package structure! -> easier split up later
• Refactor later
G U I D E L I N E S ( 2 )
• Good failure handling essential
• Services keep on running
• Logging / notifications of failure
• Automatic
G U I D E L I N E S ( 3 )
• Data ownership
• Only 1 Service owner of certain Data
• Use event to inform changes
• Event sourcing
• or more in general, data cache
• Each Service needs a cache of the data required to
work.
G U I D E L I N E S ( 4 )
• Continous Delivery
• A must for Micro-services / SCS
• Too many deployments
• Too many artefacts
• CD -> Automatic testing needed
• "Architecture"
• Monolith
• Micro-service
• Self Contained System
• Guidelines
• Deployment
• Thin / fat
• WildFly / WildFly Swarm
A G E N D A
M O N O L I T H V S M I C R O - S E R V I C E
H O W T O D E P L O Y ?
• Classic way with application server?
• App servers have, unfairly, a bad name.
• Fat jar?
App Code
App Dependencies
App Runtime
SKINNY
THIN
HOLLOW
FAT
F A T J A R
• Easier handling (single file)
• Tailored for you app
• A lot a bytes to transfer for a single change
• Slow (especially creation, transfer)
• Difficult to "layer" them in containers for ex
Docker.
T H I N / S K I N N Y W A R
• Just your code.
• Faster handling (network, container layers, ...)
• Infrastructure (server) needs be pre configured.
• Difficult to optimise for single app (if multiple)
W H I C H O N E ?
• Dependents on your company culture
• Both are equivalent
• "Architecture"
• Monolith
• Micro-service
• Self Contained System
• Guidelines
• Deployment
• Thin / fat
• WildFly / WildFly Swarm
A G E N D A
M O N O L I T H V S M I C R O - S E R V I C E
W I L D F L Y S W A R M
• FAT jar of WildFly and your WAR
• Only required server modules added
• Smaller
• Independent from your code
• No WildFly swarm import statements.
Demo
WILDFLY SWARM
A L T E R N A T I V E S
• Payara micro
• TomEE embedded
• WebSphere Liberty
Q & A

More Related Content

Similar to From Monolith to micro-services and back : The Self Contained Systems

Microservices: The Best Practices
Microservices: The Best PracticesMicroservices: The Best Practices
Microservices: The Best PracticesPavel Mička
 
Service Architectures At Scale - QCon London 2015
Service Architectures At Scale - QCon London 2015Service Architectures At Scale - QCon London 2015
Service Architectures At Scale - QCon London 2015Randy Shoup
 
Service Architectures at Scale
Service Architectures at ScaleService Architectures at Scale
Service Architectures at ScaleRandy Shoup
 
DCEU 18: From Monolith to Microservices
DCEU 18: From Monolith to MicroservicesDCEU 18: From Monolith to Microservices
DCEU 18: From Monolith to MicroservicesDocker, Inc.
 
Concurrency at Scale: Evolution to Micro-Services
Concurrency at Scale:  Evolution to Micro-ServicesConcurrency at Scale:  Evolution to Micro-Services
Concurrency at Scale: Evolution to Micro-ServicesRandy Shoup
 
Iot cloud service v2.0
Iot cloud service v2.0Iot cloud service v2.0
Iot cloud service v2.0Vinod Wilson
 
The Economies of Scaling Software
The Economies of Scaling SoftwareThe Economies of Scaling Software
The Economies of Scaling SoftwareAbdelmonaim Remani
 
The economies of scaling software - Abdel Remani
The economies of scaling software - Abdel RemaniThe economies of scaling software - Abdel Remani
The economies of scaling software - Abdel Remanijaxconf
 
Digital Transformation with Kubernetes, Containers, and Microservices
Digital Transformation with Kubernetes, Containers, and MicroservicesDigital Transformation with Kubernetes, Containers, and Microservices
Digital Transformation with Kubernetes, Containers, and MicroservicesLightbend
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice ArchitectureEngin Yoeyen
 
Architecture - December 2013 - Avinash Ramineni, Shekhar Veumuri
Architecture   - December 2013 - Avinash Ramineni, Shekhar VeumuriArchitecture   - December 2013 - Avinash Ramineni, Shekhar Veumuri
Architecture - December 2013 - Avinash Ramineni, Shekhar Veumuriclairvoyantllc
 
Microservices: Yes or not?
Microservices: Yes or not?Microservices: Yes or not?
Microservices: Yes or not?Eduard Tomàs
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to MicroservicesMahmoudZidan41
 
Devoxx PL 2018 - Microservices in action at the Dutch National Police
Devoxx PL 2018 - Microservices in action at the Dutch National PoliceDevoxx PL 2018 - Microservices in action at the Dutch National Police
Devoxx PL 2018 - Microservices in action at the Dutch National PoliceBert Jan Schrijver
 
Microservices, Kubernetes, and Application Modernization Done Right
Microservices, Kubernetes, and Application Modernization Done RightMicroservices, Kubernetes, and Application Modernization Done Right
Microservices, Kubernetes, and Application Modernization Done RightLightbend
 
How to grow your own Microservice?
How to grow your own Microservice?How to grow your own Microservice?
How to grow your own Microservice?Dmitry Buzdin
 
Software Architecture as Systems Dissolve
Software Architecture as Systems DissolveSoftware Architecture as Systems Dissolve
Software Architecture as Systems DissolveEoin Woods
 
Take your CFML Legacy Apps to Modernization
Take your CFML Legacy Apps to ModernizationTake your CFML Legacy Apps to Modernization
Take your CFML Legacy Apps to ModernizationOrtus Solutions, Corp
 

Similar to From Monolith to micro-services and back : The Self Contained Systems (20)

Microservices: The Best Practices
Microservices: The Best PracticesMicroservices: The Best Practices
Microservices: The Best Practices
 
Service Architectures At Scale - QCon London 2015
Service Architectures At Scale - QCon London 2015Service Architectures At Scale - QCon London 2015
Service Architectures At Scale - QCon London 2015
 
Service Architectures at Scale
Service Architectures at ScaleService Architectures at Scale
Service Architectures at Scale
 
DCEU 18: From Monolith to Microservices
DCEU 18: From Monolith to MicroservicesDCEU 18: From Monolith to Microservices
DCEU 18: From Monolith to Microservices
 
Concurrency at Scale: Evolution to Micro-Services
Concurrency at Scale:  Evolution to Micro-ServicesConcurrency at Scale:  Evolution to Micro-Services
Concurrency at Scale: Evolution to Micro-Services
 
Microservice intro
Microservice introMicroservice intro
Microservice intro
 
Iot cloud service v2.0
Iot cloud service v2.0Iot cloud service v2.0
Iot cloud service v2.0
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
The Economies of Scaling Software
The Economies of Scaling SoftwareThe Economies of Scaling Software
The Economies of Scaling Software
 
The economies of scaling software - Abdel Remani
The economies of scaling software - Abdel RemaniThe economies of scaling software - Abdel Remani
The economies of scaling software - Abdel Remani
 
Digital Transformation with Kubernetes, Containers, and Microservices
Digital Transformation with Kubernetes, Containers, and MicroservicesDigital Transformation with Kubernetes, Containers, and Microservices
Digital Transformation with Kubernetes, Containers, and Microservices
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Architecture - December 2013 - Avinash Ramineni, Shekhar Veumuri
Architecture   - December 2013 - Avinash Ramineni, Shekhar VeumuriArchitecture   - December 2013 - Avinash Ramineni, Shekhar Veumuri
Architecture - December 2013 - Avinash Ramineni, Shekhar Veumuri
 
Microservices: Yes or not?
Microservices: Yes or not?Microservices: Yes or not?
Microservices: Yes or not?
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Devoxx PL 2018 - Microservices in action at the Dutch National Police
Devoxx PL 2018 - Microservices in action at the Dutch National PoliceDevoxx PL 2018 - Microservices in action at the Dutch National Police
Devoxx PL 2018 - Microservices in action at the Dutch National Police
 
Microservices, Kubernetes, and Application Modernization Done Right
Microservices, Kubernetes, and Application Modernization Done RightMicroservices, Kubernetes, and Application Modernization Done Right
Microservices, Kubernetes, and Application Modernization Done Right
 
How to grow your own Microservice?
How to grow your own Microservice?How to grow your own Microservice?
How to grow your own Microservice?
 
Software Architecture as Systems Dissolve
Software Architecture as Systems DissolveSoftware Architecture as Systems Dissolve
Software Architecture as Systems Dissolve
 
Take your CFML Legacy Apps to Modernization
Take your CFML Legacy Apps to ModernizationTake your CFML Legacy Apps to Modernization
Take your CFML Legacy Apps to Modernization
 

More from Rudy De Busscher

jakarta-integration-testing.pdf
jakarta-integration-testing.pdfjakarta-integration-testing.pdf
jakarta-integration-testing.pdfRudy De Busscher
 
core-profile_jakartaOne2022.pdf
core-profile_jakartaOne2022.pdfcore-profile_jakartaOne2022.pdf
core-profile_jakartaOne2022.pdfRudy De Busscher
 
MicroStream-WithoutDatabase.pdf
MicroStream-WithoutDatabase.pdfMicroStream-WithoutDatabase.pdf
MicroStream-WithoutDatabase.pdfRudy De Busscher
 
How Class Data Sharing Can Speed up Your Jakarta EE Application Startup
How Class Data Sharing Can Speed up Your Jakarta EE Application StartupHow Class Data Sharing Can Speed up Your Jakarta EE Application Startup
How Class Data Sharing Can Speed up Your Jakarta EE Application StartupRudy De Busscher
 
Creating a Kubernetes Operator in Java
Creating a Kubernetes Operator in JavaCreating a Kubernetes Operator in Java
Creating a Kubernetes Operator in JavaRudy De Busscher
 
Finally, easy integration testing with Testcontainers
Finally, easy integration testing with TestcontainersFinally, easy integration testing with Testcontainers
Finally, easy integration testing with TestcontainersRudy De Busscher
 
Control and monitor_microservices_with_microprofile
Control and monitor_microservices_with_microprofileControl and monitor_microservices_with_microprofile
Control and monitor_microservices_with_microprofileRudy De Busscher
 
Transactions in micro-services (fall 2019)
Transactions in micro-services (fall 2019)Transactions in micro-services (fall 2019)
Transactions in micro-services (fall 2019)Rudy De Busscher
 
Transactions in micro-services (summer 2019)
Transactions in micro-services (summer 2019)Transactions in micro-services (summer 2019)
Transactions in micro-services (summer 2019)Rudy De Busscher
 
Monitor Micro-service with MicroProfile metrics
Monitor Micro-service with MicroProfile metricsMonitor Micro-service with MicroProfile metrics
Monitor Micro-service with MicroProfile metricsRudy De Busscher
 
Gradual migration to MicroProfile
Gradual migration to MicroProfileGradual migration to MicroProfile
Gradual migration to MicroProfileRudy De Busscher
 
Java EE Security API - JSR375: Getting Started
Java EE Security API - JSR375: Getting Started Java EE Security API - JSR375: Getting Started
Java EE Security API - JSR375: Getting Started Rudy De Busscher
 
What is tackled in the Java EE Security API (Java EE 8)
What is tackled in the Java EE Security API (Java EE 8)What is tackled in the Java EE Security API (Java EE 8)
What is tackled in the Java EE Security API (Java EE 8)Rudy De Busscher
 
Java ee 8 + security overview
Java ee 8 + security overviewJava ee 8 + security overview
Java ee 8 + security overviewRudy De Busscher
 
Extending Arquillian graphene
Extending Arquillian graphene Extending Arquillian graphene
Extending Arquillian graphene Rudy De Busscher
 
Octopus framework; Permission based security framework for Java EE
Octopus framework; Permission based security framework for Java EEOctopus framework; Permission based security framework for Java EE
Octopus framework; Permission based security framework for Java EERudy De Busscher
 

More from Rudy De Busscher (18)

jakarta-integration-testing.pdf
jakarta-integration-testing.pdfjakarta-integration-testing.pdf
jakarta-integration-testing.pdf
 
core-profile_jakartaOne2022.pdf
core-profile_jakartaOne2022.pdfcore-profile_jakartaOne2022.pdf
core-profile_jakartaOne2022.pdf
 
MicroStream-WithoutDatabase.pdf
MicroStream-WithoutDatabase.pdfMicroStream-WithoutDatabase.pdf
MicroStream-WithoutDatabase.pdf
 
Jakarta EE 8 on JDK17
Jakarta EE 8 on JDK17Jakarta EE 8 on JDK17
Jakarta EE 8 on JDK17
 
How Class Data Sharing Can Speed up Your Jakarta EE Application Startup
How Class Data Sharing Can Speed up Your Jakarta EE Application StartupHow Class Data Sharing Can Speed up Your Jakarta EE Application Startup
How Class Data Sharing Can Speed up Your Jakarta EE Application Startup
 
Creating a Kubernetes Operator in Java
Creating a Kubernetes Operator in JavaCreating a Kubernetes Operator in Java
Creating a Kubernetes Operator in Java
 
Finally, easy integration testing with Testcontainers
Finally, easy integration testing with TestcontainersFinally, easy integration testing with Testcontainers
Finally, easy integration testing with Testcontainers
 
Control and monitor_microservices_with_microprofile
Control and monitor_microservices_with_microprofileControl and monitor_microservices_with_microprofile
Control and monitor_microservices_with_microprofile
 
Transactions in micro-services (fall 2019)
Transactions in micro-services (fall 2019)Transactions in micro-services (fall 2019)
Transactions in micro-services (fall 2019)
 
Transactions in micro-services (summer 2019)
Transactions in micro-services (summer 2019)Transactions in micro-services (summer 2019)
Transactions in micro-services (summer 2019)
 
Monitor Micro-service with MicroProfile metrics
Monitor Micro-service with MicroProfile metricsMonitor Micro-service with MicroProfile metrics
Monitor Micro-service with MicroProfile metrics
 
Gradual migration to MicroProfile
Gradual migration to MicroProfileGradual migration to MicroProfile
Gradual migration to MicroProfile
 
Secure JAX-RS
Secure JAX-RSSecure JAX-RS
Secure JAX-RS
 
Java EE Security API - JSR375: Getting Started
Java EE Security API - JSR375: Getting Started Java EE Security API - JSR375: Getting Started
Java EE Security API - JSR375: Getting Started
 
What is tackled in the Java EE Security API (Java EE 8)
What is tackled in the Java EE Security API (Java EE 8)What is tackled in the Java EE Security API (Java EE 8)
What is tackled in the Java EE Security API (Java EE 8)
 
Java ee 8 + security overview
Java ee 8 + security overviewJava ee 8 + security overview
Java ee 8 + security overview
 
Extending Arquillian graphene
Extending Arquillian graphene Extending Arquillian graphene
Extending Arquillian graphene
 
Octopus framework; Permission based security framework for Java EE
Octopus framework; Permission based security framework for Java EEOctopus framework; Permission based security framework for Java EE
Octopus framework; Permission based security framework for Java EE
 

Recently uploaded

Effort Estimation Techniques used in Software Projects
Effort Estimation Techniques used in Software ProjectsEffort Estimation Techniques used in Software Projects
Effort Estimation Techniques used in Software ProjectsDEEPRAJ PATHAK
 
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...kalichargn70th171
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdfAndrey Devyatkin
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfkalichargn70th171
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
Key Steps in Agile Software Delivery Roadmap
Key Steps in Agile Software Delivery RoadmapKey Steps in Agile Software Delivery Roadmap
Key Steps in Agile Software Delivery RoadmapIshara Amarasekera
 
Mastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxMastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxAS Design & AST.
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Advantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxAdvantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxRTS corp
 
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxSasikiranMarri
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 

Recently uploaded (20)

Effort Estimation Techniques used in Software Projects
Effort Estimation Techniques used in Software ProjectsEffort Estimation Techniques used in Software Projects
Effort Estimation Techniques used in Software Projects
 
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
Key Steps in Agile Software Delivery Roadmap
Key Steps in Agile Software Delivery RoadmapKey Steps in Agile Software Delivery Roadmap
Key Steps in Agile Software Delivery Roadmap
 
Mastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxMastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptx
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Advantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxAdvantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptx
 
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 

From Monolith to micro-services and back : The Self Contained Systems

  • 1.
  • 2. From Monolith To Micro-service and back
 The Self Contained System
  • 4. Microservices: The Right Way (Daniel Woods)
  • 6. • C4J • Senior Java Web Developer, Java Coach, Architect • JSR-375 • Java EE Security API Expert group member • Java EE Believer @rdebusscher @Atbash_EE http://jsfcorner.blogspot.be http://javaeesquad.blogspot.be https://www.atbash.be W H O A M I RUDY DE BUSSCHER
  • 7. • "Architecture" • Monolith • Micro-service • Self Contained System • Guidelines • Deployment A G E N D A M O N O L I T H V S M I C R O - S E R V I C E
  • 8. • "Architecture" • Monolith Characteristics Demo • Micro-service • Self Contained System • Guidelines • Deployment A G E N D A M O N O L I T H V S M I C R O S E R V I C E
  • 9. M O N O L I T H • WHAT? • Single code base • Compiled together • Single artefact
  • 10. M O N O L I T H ( P R O ) • Easy up and running • Easier integration • Uniformity (like UI but also code) • Consistency
  • 11. M O N O L I T H ( C O N T R A ) • Insult like "legacy" • Team communication issues • Slow delivery • Issues block deployment • Resource consumption cannot be spread. • Difficult to maintain for larger codebases • > 50 000 or > 100 000 LOC ?
  • 12. " B E T T E R " A L T E R N A T I V E S MICRO-SERVICES • Successful Examples • Netflix, Amazon, Zalando, Ebay, ...
  • 13. E T S Y • Online shop for hand-made / vintage products • 150 engineers, 50 deploys a day USING A SINGLE MONOLITH
  • 14. There is no such thing as a "silver bullet"
  • 15. W H A T I S B E S T ? • Monolith • Micro-service • Some other thing • IT DEPENDS
  • 16. • "Architecture" • Monolith Characteristics Demo • Micro-service • Self Contained System • Guidelines • Deployment A G E N D A M O N O L I T H V S M I C R O S E R V I C E
  • 19. • "Architecture" • Monolith • Micro-service Characteristics Pitfalls • Self Contained System • Guidelines • Deployment A G E N D A M O N O L I T H V S M I C R O S E R V I C E
  • 20. M I C R O - S E R V I C E • WHAT? • Software applications as a suite of independently deployable, small, modular services and communicates through a well- defined, lightweight mechanism to serve a business goal.
  • 21. B U S I N E S S G O A L • SRP • Each micro-service • Single responsibility • Around a business or technical domain • BAD - DDD • Boundary Aware Design (BAD) -> Not used • Domain Driven Design (DDD)
  • 22. S M A L L • How small is small? • Pizza team? • As much as it takes for a Single Responsibility • If some micro services are too small • nano-services (anti-pattern) "single method services." • group them into larger micro-service.
  • 23. I N D E P E N D E N T L Y
  • 24. I N D E P E N D E N T L Y
  • 25. C O M M U N I C A T I O N • REST style with JSON data over HTTP. • Independently, means prepare for failure • What happens when a micro-service is down? • Fails also => monolith situation! • Cache! (see further on)
  • 26. • "Architecture" • Monolith • Micro-service Characteristics Pitfalls • Self Contained System • Guidelines • Deployment A G E N D A M O N O L I T H V S M I C R O S E R V I C E
  • 27. F A L L A C I E S O F D I S T R I B U T E D C O M P U T I N G 1. The network is reliable. 2. Latency is zero. 3. Bandwidth is infinite. 4. The network is secure. 5. Topology doesn't change. 6. There is one administrator. 7. Transport cost is zero. 8. The network is homogeneous. FAILURES SLOWER / CACHING CONVERSIONS SECURITY
  • 28. T R A N S A C T I O N A L • What if "unit of work" span Multiple micro- services? • Business rollback / Compensating transaction • Eventual consistency
  • 29. D I S C O V E R Y • Where is micro-service I need? • Where is the Central messaging system? • Hardcoded through config files • Discovery tools (Consul, Zookeeper, etc, ...)
  • 30. A S Y N C H R O N O U S • Async servlet • Not on same thread • Async "actions" • UI puts message on central bus.
  • 31. S P A M O N O L I T H
  • 32. • "Architecture" • Monolith • Micro-service • Self Contained System • Characteristics • Demo • Guidelines • Deployment A G E N D A M O N O L I T H V S M I C R O S E R V I C E
  • 33. S E L F C O N T A I N E D S Y S T E M • Combines Monolith and Micro-service characteristics. • More a micro services then a monolith. • Tackles some pitfalls of other systems. • No Silver bullet.
  • 34. S C S C H A R A C T E R I S T I C S • Each SCS is an autonomous web application. • Each SCS must include UI, Logic and Data • Optional Service API • Inter SCS communication, 3th parties • Asynchronous communication where possible. • No shared code / logic • Each SCS is owned by one team.
  • 35. S C S C H A R A C T E R I S T I C S
  • 36. S C S P R O • Better maintainability. • SRP - but on all levels (UI, Logic, Data) • Fewer units • Avoid SPA monolith
  • 37. S C S B E S T P R A C T I C E S • No direct communication • Use of Service bus • Asynchronous 'Actions' • JSON data over REST. • Caching data other SCS locally • Domain driven design
  • 38. • "Architecture" • Monolith • Micro-service • Self Contained System • Characteristics • Demo • Guidelines • Deployment A G E N D A M O N O L I T H V S M I C R O S E R V I C E
  • 39. • "Architecture" • Monolith • Micro-service • Self Contained System • Guidelines • Deployment A G E N D A M O N O L I T H V S M I C R O S E R V I C E
  • 40. G U I D E L I N E S ( 1 ) • All applications starts small • Work in iterative manner • Small -> monolith is easier • Package structure! -> easier split up later • Refactor later
  • 41. G U I D E L I N E S ( 2 ) • Good failure handling essential • Services keep on running • Logging / notifications of failure • Automatic
  • 42. G U I D E L I N E S ( 3 ) • Data ownership • Only 1 Service owner of certain Data • Use event to inform changes • Event sourcing • or more in general, data cache • Each Service needs a cache of the data required to work.
  • 43. G U I D E L I N E S ( 4 ) • Continous Delivery • A must for Micro-services / SCS • Too many deployments • Too many artefacts • CD -> Automatic testing needed
  • 44. • "Architecture" • Monolith • Micro-service • Self Contained System • Guidelines • Deployment • Thin / fat • WildFly / WildFly Swarm A G E N D A M O N O L I T H V S M I C R O - S E R V I C E
  • 45. H O W T O D E P L O Y ? • Classic way with application server? • App servers have, unfairly, a bad name. • Fat jar?
  • 46. App Code App Dependencies App Runtime SKINNY THIN HOLLOW FAT
  • 47. F A T J A R • Easier handling (single file) • Tailored for you app • A lot a bytes to transfer for a single change • Slow (especially creation, transfer) • Difficult to "layer" them in containers for ex Docker.
  • 48. T H I N / S K I N N Y W A R • Just your code. • Faster handling (network, container layers, ...) • Infrastructure (server) needs be pre configured. • Difficult to optimise for single app (if multiple)
  • 49. W H I C H O N E ? • Dependents on your company culture • Both are equivalent
  • 50. • "Architecture" • Monolith • Micro-service • Self Contained System • Guidelines • Deployment • Thin / fat • WildFly / WildFly Swarm A G E N D A M O N O L I T H V S M I C R O - S E R V I C E
  • 51. W I L D F L Y S W A R M • FAT jar of WildFly and your WAR • Only required server modules added • Smaller • Independent from your code • No WildFly swarm import statements.
  • 53. A L T E R N A T I V E S • Payara micro • TomEE embedded • WebSphere Liberty
  • 54. Q & A