SlideShare a Scribd company logo
MONOLITHS TO MICROSERVICES: APP
TRANSFORMATION
Hands-on Technical Workshop
Ram Maddali
Senior Architect
@RamMaddali
rmaddali@redhat.com
Anand Akella
Senior Architect
aakella@redhat.com
PART 3: MONOLITHS TO
MICROSERVICES WITH JAVA EE AND
SPRING BOOT
MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB3
WHY MONOLITH TO MICROSERVICES
Break things down (organizations, teams,
IT systems, etc) down into smaller pieces
for greater parallelization and autonomy
and focus on reducing time to value.
MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB
http://martinfowler.com/bliki/MonolithFirst.html
Monolith First?
http://martinfowler.com/bliki/MonolithFirst.html
MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB66
THE BIGGER PICTURE: THE PATH TO CLOUD-
NATIVE APPS
A DIGITAL DARWINISM
SELF-SERVICE
ON-DEMAND
INFRA
RE-ORG TO
DEVOPS
AUTOMATION
CONTINUOUS
DELIVERY
ADVANCED
DEPLOYMENT
TECHNIQUES
MICROSERVICES
FAST
MONOLITH
MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB7
● In this lab, you will begin to ‘strangle’ the coolstore monolith by implementing its services as
external microservices, split along business boundaries
● Once implemented, traffic destined to the original monolith’s services will be redirected (via
OpenShift software-defined routing) to the new services
STRANGLING THE MONOLITH
Node.js
Web
WildFly Swarm
Inventory
Vert.x
Cart
Runtime
Service
Runtime
Service
Vert.x
Orders
Spring Boot
Catalog
JBoss EAP
HTML Javascript Web
CartCatalogInventory
Promo Ratings Orders
Data Access
MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB8
STRANGLING THE MONOLITH
● Strangling - incrementally replacing
functionality in app with something better
(cheaper, faster, easier to maintain).
● As functionality is replaced, “dead” parts of
monolith can be removed/retired.
● You can also wait for all functionality to be
replaced before retiring anything!
● You can optionally include new functionality
during strangulation to make it more
attractive to business stakeholders. Time
MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB
MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB
RHOAR PRODUCT ARCHITECTURE
RHOAR RUNTIMES
(Container images, Maven Artifacts, Serverless)
MICROPROFIL
E / JAVA EE
OPENSHIFT SERVICES
REACTIVE
(vert.x)
JAVASCRIPT SERVLET APPS
OpenShift.io
(Developer
SaaS)
Generators
IDE
etc.
Management
APM
Metrics
Service
Discovery
Config.
Logging
Health
Check
Load
Balancing
CI/CDSSOMessaging IMDG API Mgmt
OPENWHISK
SERVICE MESH
Istio Pilot Istio Mixer Istio Auth
Envoy Proxy Envoy Proxy Envoy Proxy Envoy Proxy
Service
Catalog
== Future
MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB
TOMCAT SIMPLICITY
JAVASCRIPT FLEXIBILITY
SERVLET APPS
REACTIVE SYSTEMS
JAVA MICROSERVICES
ENTERPRISE JAVA
SPRING
MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB
• Microservices for Developers using Spring Framework
• An opinionated approach to building Spring applications
• Historical alternative to Java EE
• Getting started experience
• Spring MVC / DI / Boot most popular
MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB
Spring in RHOAR
• It’s the same Spring you know and love
• Tested and Verified by Red Hat QE
– Spring Boot, Spring Cloud Kubernetes, Ribbon, Hystrix
• Red Hat components fully supported
– Tomcat, Hibernate, CXF, SSO (Keycloak), Messaging (AMQ), …
• Native Kubernetes/OpenShift integration (Spring Cloud)
• Service Discovery via k8s (DNS), Ribbon
• Spring Config via ConfigMap
• Developer Tooling (launch.openshift.io, starters)
• Additional planned support for
– Transactions (Naryana), Messaging (Rabbit MQ -> AMQ), more
● Health Checks (actuator)
● Externalized Config (spring-cloud-kubernetes)
● Client-side discovery / load balancing (Eureka/Kubernetes)
● Circuit Breaking / Bulkheading (Hystrix)
● Logging / Monitoring / Tracing / Metrics
● Secure deployments with Keycloak
● API Documentation (Swagger)
Cloud Native Support in Spring
WILDFLY SWARM
My Svc
Java EE microservices
● Leverage Java EE expertise
● Open standard
● Microservices focus
● Optimized for OpenShift
● Super lightweight
● Tooling for Developers
● MicroProfile Implementation
My
Svc
JAX-
RS
$ java -jar my_microservice.jar
● A tangible unit providing a specific piece of functionality
● Embodied in a maven artifact
● To support the compositional aspect in WF Swarm
● Provides the “runtime” capabilities
● Means to add API dependencies (e.g. JAX-RS)
● Means to configure the system
○ With reasonable defaults
● Means to discover other components (topology)
● Means to alter deployments (e.g. keycloak)
● Can be auto-detected or explicitly declared
WildFly Swarm “pieces” - Fractions
● Health Checks
● Externalized Config
● Client-side discovery / load balancing
● Circuit Breaking / Bulkheading
● Logging / Monitoring / Tracing / Metrics
● Secure deployments with Keycloak
● MicroProfile
● API Documentation
Cloud Native Support in WildFly Swarm
Build microsevices
● Embeddable (Fat Jar)
● Lightweight
● Modular & extensible
● Built from WildFly
(Trusted and Reliable)
Supported Specifications
Java EE 7 Web Profile MicroProfile 1.0
Tested and Verified
Hystrix Ribbon MySQL Oracle DB
Metrics
Additional Supported Fractions
Health
Configuration
Topology
Monitor
Keycloak
Upstream (Unsupported)
Flyway
Logstash
Fluentd
Swagger
JMS
Vert.x Integration
Consul
Spring
Jolokia
Infinispan
jGroups
WildFly Swarm and RHOAR
●Defines open source Java microservices specifications
● Industry Collaboration - Red Hat, IBM, Payara, Tomitribe, London Java Community,
SouJava, Oracle, Hazelcast, Fujitsu, SmartBear...
●WildFly Swarm is Red Hat’s implementation
● Minimum footprint for Enterprise Java cloud-native services (v1.3) :
JSON-P 1.0
Health Check
1.0
CDI 1.2 JAX-RS 2.0
JWT
Propagation 1.0
Fault
Tolerance 1.0
Metrics 1.0
Config 1.1 OpenTracing 1.0
OpenAPI 1.0
RestClient 1.0
New in 1.3:
LAB: MONOLITHS TO MICROSERVICES
WITH JAVA EE AND SPRING BOOT
GOAL FOR LAB
In this lab you will learn:
● How Red Hat OpenShift and Red Hat OpenShift Application
Runtimes (RHOAR) help jumpstart app modernization
● Benefits and challenges of microservices
● How to transform existing monolithic applications to
microservices using strangler pattern and 12-factor app
patterns.
● Use modern app dev frameworks like WildFly Swarm and
Spring Boot to implement microservice applications on
OpenShift
CURRENT STATE - THE MONOLITH
OpenShift
coolstore-dev
Coolstore
monolith
Coolstore
database
(dev)
Coolstore
Binary
coolstore-prod
Coolstore
monolith
Coolstore
database
(prod)
Pipeline
Promotion
Debugger
mvn package
LAB: MONOLITHS TO MICROSERVICES WITH
JAVA EE AND SPRING BOOT
SCENARIO 4 TRANSFORMING AN EXISTING MONOLITH (PART 1)
SCENARIO 5 TRANSFORMING AN EXISTING MONOLITH (PART 2)
+
WRAP-UP AND DISCUSSION
RESULT OF LAB
In this lab you learned how to:
● Implement a Java EE microservice using WildFly Swarm
● Implement a Java EE microservice using Spring Boot
● Develop container-based testing
● Add microservice concerns like Health checks, externalized
configuration and circuit breaking
● Use the strangler pattern to slowly migrate functionality
from monolith to microservices
DESIRED RESULT OF
LAB
OpenShift
coolstore-prod
Coolstore
monolith
Coolstore
database
(prod)
inventory
Inventory
microservice
Inventory
database
catalog
Catalog
microservice
Catalog
database
UI
THANK YOU
plus.google.com/+RedHat
linkedin.com/company/red-hat
youtube.com/user/RedHatVideos
facebook.com/redhatinc
twitter.com/RedHatNews

More Related Content

PPTX
Moving existing apps to the cloud
PPTX
Developer Intro to OpenShift
PDF
Building streaming applications using a managed Kafka service | DevNation Tec...
PPTX
Monoliths to Microservices: App Transformation - Jacksonville Workshop Slides
PDF
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
PDF
Operatorhub.io and your Kubernetes cluster | DevNation Tech Talk
PPTX
OpenShift Introduction
PDF
Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...
Moving existing apps to the cloud
Developer Intro to OpenShift
Building streaming applications using a managed Kafka service | DevNation Tec...
Monoliths to Microservices: App Transformation - Jacksonville Workshop Slides
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
Operatorhub.io and your Kubernetes cluster | DevNation Tech Talk
OpenShift Introduction
Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...

What's hot (20)

PDF
Kubernetes: The evolution of distributed systems | DevNation Tech Talk
PDF
Serverless stream processing of Debezium data change events with Knative | De...
PPTX
Introduction to openshift
PDF
Kangaroot open shift best practices - straight from the battlefield
PPTX
Migrating from oracle soa suite to microservices on kubernetes
PPTX
Spring Boot on Kubernetes/OpenShift
PDF
Open shift 4 infra deep dive
PDF
Crafting Kubernetes Operators
PDF
Level-up your gaming telemetry using Kafka Streams | DevNation Tech Talk
PDF
8 - OpenShift - A look at a container platform: what's in the box
PDF
9 - Making Sense of Containers in the Microsoft Cloud
PDF
Multi-cloud Kubernetes BCDR with Velero
PDF
How Confluent Completes the Event Streaming Platform (Addison Huddy & Dan Ros...
PPTX
Getting Started with Kafka on k8s
PDF
Profiling Java inside containers with ContainerJFR | DevNation Tech Talk
PDF
OpenShift In a Nutshell - Episode 02 - Architecture
PPTX
Webinar: End-to-End CI/CD with GitLab and DC/OS
PDF
Secure your Quarkus applications | DevNation Tech Talk
PDF
SpringBoot and Spring Cloud Service for MSA
PPTX
OpenShift Application Development | DO288 | Red Hat OpenShift
Kubernetes: The evolution of distributed systems | DevNation Tech Talk
Serverless stream processing of Debezium data change events with Knative | De...
Introduction to openshift
Kangaroot open shift best practices - straight from the battlefield
Migrating from oracle soa suite to microservices on kubernetes
Spring Boot on Kubernetes/OpenShift
Open shift 4 infra deep dive
Crafting Kubernetes Operators
Level-up your gaming telemetry using Kafka Streams | DevNation Tech Talk
8 - OpenShift - A look at a container platform: what's in the box
9 - Making Sense of Containers in the Microsoft Cloud
Multi-cloud Kubernetes BCDR with Velero
How Confluent Completes the Event Streaming Platform (Addison Huddy & Dan Ros...
Getting Started with Kafka on k8s
Profiling Java inside containers with ContainerJFR | DevNation Tech Talk
OpenShift In a Nutshell - Episode 02 - Architecture
Webinar: End-to-End CI/CD with GitLab and DC/OS
Secure your Quarkus applications | DevNation Tech Talk
SpringBoot and Spring Cloud Service for MSA
OpenShift Application Development | DO288 | Red Hat OpenShift
Ad

Similar to Monoliths to Microservices with Jave EE and Spring Boot (20)

PDF
03 monoliths to microservices with java ee and spring boot
PPTX
App Mod 03: Monoliths to microservices with java ee and spring boot
PDF
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
PPTX
App Mod 01: Moving existing apps to the cloud
PDF
Moving existing apps to the cloud
PDF
Monoliths to microservices workshop
ODP
Developing Microservices using Spring - Beginner's Guide
PDF
Yohanes Widi Sono - Modern Development for Business Agility
PDF
Cloudify your applications: microservices and beyond
PDF
Developing microservices with wildfly swarm and deploying on openshift
PDF
Microservices.pdf
PPTX
Microservices development{Bangalore meetup}
ODP
[4DEV][Łódź] Michał Szynkiewicz - WildFly Swarm: JavaEE w świecie mikroserwisów
PDF
Introduction
PPTX
Monoliths to Microservices: App Transformation - introduction
PDF
Will Microservices Die.pdf
PPTX
Introduction to microservices
PPTX
Microservices, Spring Cloud & Cloud Foundry
PDF
Microservices on a budget meetup
PDF
Microservices for java architects it-symposium-2015-09-15
03 monoliths to microservices with java ee and spring boot
App Mod 03: Monoliths to microservices with java ee and spring boot
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
App Mod 01: Moving existing apps to the cloud
Moving existing apps to the cloud
Monoliths to microservices workshop
Developing Microservices using Spring - Beginner's Guide
Yohanes Widi Sono - Modern Development for Business Agility
Cloudify your applications: microservices and beyond
Developing microservices with wildfly swarm and deploying on openshift
Microservices.pdf
Microservices development{Bangalore meetup}
[4DEV][Łódź] Michał Szynkiewicz - WildFly Swarm: JavaEE w świecie mikroserwisów
Introduction
Monoliths to Microservices: App Transformation - introduction
Will Microservices Die.pdf
Introduction to microservices
Microservices, Spring Cloud & Cloud Foundry
Microservices on a budget meetup
Microservices for java architects it-symposium-2015-09-15
Ad

Recently uploaded (20)

PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPT
Teaching material agriculture food technology
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Machine learning based COVID-19 study performance prediction
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Network Security Unit 5.pdf for BCA BBA.
Building Integrated photovoltaic BIPV_UPV.pdf
Unlocking AI with Model Context Protocol (MCP)
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Teaching material agriculture food technology
Spectral efficient network and resource selection model in 5G networks
Understanding_Digital_Forensics_Presentation.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
cuic standard and advanced reporting.pdf
Review of recent advances in non-invasive hemoglobin estimation
Reach Out and Touch Someone: Haptics and Empathic Computing
Machine learning based COVID-19 study performance prediction
MYSQL Presentation for SQL database connectivity
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Programs and apps: productivity, graphics, security and other tools
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows

Monoliths to Microservices with Jave EE and Spring Boot

  • 1. MONOLITHS TO MICROSERVICES: APP TRANSFORMATION Hands-on Technical Workshop Ram Maddali Senior Architect @RamMaddali rmaddali@redhat.com Anand Akella Senior Architect aakella@redhat.com
  • 2. PART 3: MONOLITHS TO MICROSERVICES WITH JAVA EE AND SPRING BOOT
  • 3. MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB3 WHY MONOLITH TO MICROSERVICES Break things down (organizations, teams, IT systems, etc) down into smaller pieces for greater parallelization and autonomy and focus on reducing time to value.
  • 4. MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB http://martinfowler.com/bliki/MonolithFirst.html Monolith First? http://martinfowler.com/bliki/MonolithFirst.html
  • 5. MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB66 THE BIGGER PICTURE: THE PATH TO CLOUD- NATIVE APPS A DIGITAL DARWINISM SELF-SERVICE ON-DEMAND INFRA RE-ORG TO DEVOPS AUTOMATION CONTINUOUS DELIVERY ADVANCED DEPLOYMENT TECHNIQUES MICROSERVICES FAST MONOLITH
  • 6. MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB7 ● In this lab, you will begin to ‘strangle’ the coolstore monolith by implementing its services as external microservices, split along business boundaries ● Once implemented, traffic destined to the original monolith’s services will be redirected (via OpenShift software-defined routing) to the new services STRANGLING THE MONOLITH Node.js Web WildFly Swarm Inventory Vert.x Cart Runtime Service Runtime Service Vert.x Orders Spring Boot Catalog JBoss EAP HTML Javascript Web CartCatalogInventory Promo Ratings Orders Data Access
  • 7. MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB8 STRANGLING THE MONOLITH ● Strangling - incrementally replacing functionality in app with something better (cheaper, faster, easier to maintain). ● As functionality is replaced, “dead” parts of monolith can be removed/retired. ● You can also wait for all functionality to be replaced before retiring anything! ● You can optionally include new functionality during strangulation to make it more attractive to business stakeholders. Time
  • 8. MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB
  • 9. MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB RHOAR PRODUCT ARCHITECTURE RHOAR RUNTIMES (Container images, Maven Artifacts, Serverless) MICROPROFIL E / JAVA EE OPENSHIFT SERVICES REACTIVE (vert.x) JAVASCRIPT SERVLET APPS OpenShift.io (Developer SaaS) Generators IDE etc. Management APM Metrics Service Discovery Config. Logging Health Check Load Balancing CI/CDSSOMessaging IMDG API Mgmt OPENWHISK SERVICE MESH Istio Pilot Istio Mixer Istio Auth Envoy Proxy Envoy Proxy Envoy Proxy Envoy Proxy Service Catalog == Future
  • 10. MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB TOMCAT SIMPLICITY JAVASCRIPT FLEXIBILITY SERVLET APPS REACTIVE SYSTEMS JAVA MICROSERVICES ENTERPRISE JAVA
  • 12. MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB • Microservices for Developers using Spring Framework • An opinionated approach to building Spring applications • Historical alternative to Java EE • Getting started experience • Spring MVC / DI / Boot most popular
  • 13. MONOLITHS TO MICROSERVICES: APP TRANSFORMATION HANDS-ON LAB Spring in RHOAR • It’s the same Spring you know and love • Tested and Verified by Red Hat QE – Spring Boot, Spring Cloud Kubernetes, Ribbon, Hystrix • Red Hat components fully supported – Tomcat, Hibernate, CXF, SSO (Keycloak), Messaging (AMQ), … • Native Kubernetes/OpenShift integration (Spring Cloud) • Service Discovery via k8s (DNS), Ribbon • Spring Config via ConfigMap • Developer Tooling (launch.openshift.io, starters) • Additional planned support for – Transactions (Naryana), Messaging (Rabbit MQ -> AMQ), more
  • 14. ● Health Checks (actuator) ● Externalized Config (spring-cloud-kubernetes) ● Client-side discovery / load balancing (Eureka/Kubernetes) ● Circuit Breaking / Bulkheading (Hystrix) ● Logging / Monitoring / Tracing / Metrics ● Secure deployments with Keycloak ● API Documentation (Swagger) Cloud Native Support in Spring
  • 16. My Svc Java EE microservices ● Leverage Java EE expertise ● Open standard ● Microservices focus ● Optimized for OpenShift ● Super lightweight ● Tooling for Developers ● MicroProfile Implementation My Svc JAX- RS $ java -jar my_microservice.jar
  • 17. ● A tangible unit providing a specific piece of functionality ● Embodied in a maven artifact ● To support the compositional aspect in WF Swarm ● Provides the “runtime” capabilities ● Means to add API dependencies (e.g. JAX-RS) ● Means to configure the system ○ With reasonable defaults ● Means to discover other components (topology) ● Means to alter deployments (e.g. keycloak) ● Can be auto-detected or explicitly declared WildFly Swarm “pieces” - Fractions
  • 18. ● Health Checks ● Externalized Config ● Client-side discovery / load balancing ● Circuit Breaking / Bulkheading ● Logging / Monitoring / Tracing / Metrics ● Secure deployments with Keycloak ● MicroProfile ● API Documentation Cloud Native Support in WildFly Swarm
  • 19. Build microsevices ● Embeddable (Fat Jar) ● Lightweight ● Modular & extensible ● Built from WildFly (Trusted and Reliable) Supported Specifications Java EE 7 Web Profile MicroProfile 1.0 Tested and Verified Hystrix Ribbon MySQL Oracle DB Metrics Additional Supported Fractions Health Configuration Topology Monitor Keycloak Upstream (Unsupported) Flyway Logstash Fluentd Swagger JMS Vert.x Integration Consul Spring Jolokia Infinispan jGroups WildFly Swarm and RHOAR
  • 20. ●Defines open source Java microservices specifications ● Industry Collaboration - Red Hat, IBM, Payara, Tomitribe, London Java Community, SouJava, Oracle, Hazelcast, Fujitsu, SmartBear... ●WildFly Swarm is Red Hat’s implementation ● Minimum footprint for Enterprise Java cloud-native services (v1.3) : JSON-P 1.0 Health Check 1.0 CDI 1.2 JAX-RS 2.0 JWT Propagation 1.0 Fault Tolerance 1.0 Metrics 1.0 Config 1.1 OpenTracing 1.0 OpenAPI 1.0 RestClient 1.0 New in 1.3:
  • 21. LAB: MONOLITHS TO MICROSERVICES WITH JAVA EE AND SPRING BOOT
  • 22. GOAL FOR LAB In this lab you will learn: ● How Red Hat OpenShift and Red Hat OpenShift Application Runtimes (RHOAR) help jumpstart app modernization ● Benefits and challenges of microservices ● How to transform existing monolithic applications to microservices using strangler pattern and 12-factor app patterns. ● Use modern app dev frameworks like WildFly Swarm and Spring Boot to implement microservice applications on OpenShift
  • 23. CURRENT STATE - THE MONOLITH OpenShift coolstore-dev Coolstore monolith Coolstore database (dev) Coolstore Binary coolstore-prod Coolstore monolith Coolstore database (prod) Pipeline Promotion Debugger mvn package
  • 24. LAB: MONOLITHS TO MICROSERVICES WITH JAVA EE AND SPRING BOOT SCENARIO 4 TRANSFORMING AN EXISTING MONOLITH (PART 1) SCENARIO 5 TRANSFORMING AN EXISTING MONOLITH (PART 2) +
  • 26. RESULT OF LAB In this lab you learned how to: ● Implement a Java EE microservice using WildFly Swarm ● Implement a Java EE microservice using Spring Boot ● Develop container-based testing ● Add microservice concerns like Health checks, externalized configuration and circuit breaking ● Use the strangler pattern to slowly migrate functionality from monolith to microservices

Editor's Notes

  • #18: Next up is WildFly Swarm which is targeted at Java-based microservices applications, but as you may have guessed from the name it also brings in a number of Java EE components from the WildFly ecosystem. This means that if you’re a Java EE developer you can continue to re-use your knowledge as you start to migrate existing applications to benefit from microservices. We say that WildFly Swarm brings just enough of the app server you used in the past to build lightweight and efficiently-packaged java applications, which contain only the bits you need to run as an executable JAR file, or uber-jar, on a container platform like OpenShift. For example, the diagram above shows a small microservice needing only support for RESTful communication using the JAX-RS standard from the Java EE world, so with WildFly Swarm you can build a WildFly Swarm uber-jar containing your service’s business logic along with only that JAX-RS component, and run it using java -jar. So you get a minimal execution footprint and minimal attack surface for those security-minded developers out there. Microservice apps generally need only a small subset of functionality as compared to a traditional monolithic enterprise app, and so last year several vendors including Red Hat collaborated to produce a new specification that that defines such a subset...
  • #19: Fractions support explicit and implicit configuration In many cases you won’t need to configure anything Or configuration can be externalized Fractions can be detected or explicitly declared The most simple case is a <war> project, with just the maven plugin All of Java EE is supported in upstream WildFly Swarm JPA, JAX-RS, EJB, JMS, CDI, … Successfully ran Java EE 7 samples [blog] Successfully ran JBoss EAP 7 Quickstarts [blog]
  • #22: Companies love standardization, as it gives them choice of implementation AND essentially free QA resources as the spec is developed and used across the industry through different implementations. The Microprofile spec is geared toward Java microservices applications, and there are a number of implementations available today. WildFly Swarm is Red Hat’s implementation of this spec, and as you can see includes some functions from the Java EE world like JAX-RS and CDI, but also includes typical functions you’d find in a microservice like health checks, fault tolerance for building resilient apps, externalized configuration support and support for securing microservices through JWT token propogation. If you want to learn more or get involved in the evolution of tis spec, visit microprofile.io.