SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Downloaden Sie, um offline zu lesen
Lessons Learned from Migrating Legacy
Enterprise Applications to Microservices
Ross Zhang (@ross_zhang)
Jun Li (@jeffreyjunli)
SpringOne Platform 2016
Disclaimer
All the opinions and views expressed in this presentation and talk are strictly
those of the presenter and they do not necessarily reflect those of the
institution to which he is affiliated.
Agenda
● Our Journey
● Pain Points
● Puzzle Pieces to Migrate to Microservices
● Lessons Learned
● Future Work
● Q & A
● Glossary
All icon and image copyrights are reserved by original owners
Our Journey
1996
Smalltalk &
RPG program
2006
Java EE, EJB2,
SOAP, Struts,
Wicket, JSP,
Hibernate
2011
Spring 3, Spring
MVC, Spring
Security, JSP...
2013 2014 2015 2016
Spring
Boot
0.5.0
Spring
Boot
1.0.0
Spring
Boot
Spring Boot,
Spring
Cloud, PCF
Smalltalk
Application
Green
Screen app
SOAP
AS400
(20 years old)
Application Server
EAR - Enterprise Archive
MQ
Caching
Security
Load
balancing
Logging
JNDIEAR - Enterprise Archive
EAR - Enterprise Archive
Migration Journey
Pain Points
● Development
● Deployment
● Operations
Development Pain Points
Dev env takes
too long to
set up
Jar hell
Framework
configurations
Deployment Pain Points
Slow Unstable Downtime
Operation Pain Points
No
application
health check
No log
aggregation
or analysis
Microservices
The term "Microservice Architecture" has sprung up over the last few years
to describe a particular way of designing software applications as suites of
independently deployable services. While there is no precise definition of this
architectural style, there are certain common characteristics around
organization around business capability, automated deployment, intelligence
in the endpoints, and decentralized control of languages and data.
-
- Martin Fowler (http://martinfowler.com/articles/microservices.html)
Migrating to Microservices Puzzle #0
Problem: application server
What we tried:
● Vagrant, Docker
● Standalone Tomcat
Solution: Embedded Tomcat
Result:
● Local set up: 5 hours -> 0 second
● Deploy: 5 minutes -> 1 minute
Migrating to Microservices Puzzle #1
Problem: lots of boilerplate framework configurations
Solution: Spring Boot
Migrating to Microservices Puzzle #2
Problem: Dependency management
Migrating to Microservices Puzzle #2
Solution: Spring IO Platform
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.spring.platform</groupId>
<artifactId>platform-bom</artifactId>
<version>1.1.1.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Migrating to Microservices Puzzle #3
Problem: Application health check and monitoring
● Issue: murder mystery to your application
○ Brute force restart
● Issue: one production app depends on dev environment
Solution: Spring Boot Actuator + extension endpoint
● /health combined with Sensu so that operations can react immediately
● /info links deployment artifact with CI build pipeline so that we know how it was built,
when it was built, and how it was tested
● /dependencies
{
{
"maven.artifact" : "com.sample.authorization.ws",
"maven.artifact.version" : "1.6.489-SNAPSHOT",
"git.branch" : "master",
"git.commit.id" : "5155e6314ec891fa0094d4fc708c551a2184f132",
"build.number" : "489",
"build.url" : "http://bamboo/browse/AUT-BUIL-489"
}
}
{
"dependencies": [{
"serviceName": "User Info WS",
"version": "4.0.0",
"endpoint": "http://domainname.com/user-info-ws"
}, {
"serviceName": "Encryption WS",
"version": "3.1.0",
"endpoint": "http://domainname.com/encryption-ws"
}, {
"serviceName": "Order WS",
"version": "1.1.0-SNAPSHOT",
"endpoint": "http://domainname.com/order-ws"
}, {
"Database": "DB2 for AS/400",
"Url": "jdbc:as400://dev-db",
"Username": "dbuser",
"Tables": "{tbl_user, tbl_org, tbl_order, tbl_reference}"
}]
}
Migrating to Microservices Puzzle #4
Problems:
● Isolated configurations, without security
● Hard to trace request and response
We Tried: Spring Cloud
Make a
change
Check in
master
Compile,
unit test,
integration
test on CI
server
Deploy to
Staging
Interactive
tests
Deploy to
production
with script
2013
Migrating to Microservices Puzzle #5
Make a
change
Check in
master
Compile,
unit test,
integration
test on CI
server
Deploy to
Staging
Interactive
tests
One click
deploy to
production
Automated
Infrastructure test in Chef
2015
Migrating to Microservices Puzzle #5
Make a
change
Check in
master
Compile,
unit test,
integration
test on CI
server
Deploy to
Staging
Interactive
tests
One click
deploy to
production
In PCF
Automated
Infrastructure test in
Pivotal Cloud Foundry
2016 and beyond
Migrating to Microservices Puzzle #5
Migrating to Microservices Puzzle #6
For each new service, we have to create:
● 3+ git repositories
● 1 CI build plan
● 2 CI deployment plans (dev and prod)
● Many more code, tests, README, CHANGELOG, YML, RAML, POM...
Spring Bloomr
├──
├──
├──
├──
├──
├──
│ ...
├──
│ ├──
│ └──
│ ├──
│ │ └──
│ │ └──
│ │ └──
│ │ └──
│ │ ├──
│ │ │ ├──
│ │ │ ├──
│ │ │ └──
│ │ ├──
│ │ │ ├──
│ │ │ └──
│ │ └──
│ │ ├──
│ │ └──
│ └──
│ ...
└──
├──
├──
│ └──
└──
├──
│ └──
│ └──
│ └──
│ └──
│ └──
│ ├──
│ └──
└──
└──
└──
└──
└──
└──
├──
└──
49 directories, 32 files!
Dev QA PM BusinessOperation
Departments
Projects
DevOps
Organizational Structure Changes
Spring Boot is the baseline!
Lessons Learned
Lessons Learned
Test automation as much as possible
● Unit test
● Integration test
● End-to-end test
Lessons Learned
Health and monitoring is super important because
● Operation people get notified immediately if something goes wrong
● When combined with log aggregation and analysis, troubleshooting becomes easier for
developers
● Think about how to define a healthy application
● Secure your Spring Boot Actuator endpoints
Future Work
● Log aggregation
● Service discovery and client load balancing
● A/B Testing
Q&A
● Bamboo: https://www.atlassian.com/software/bamboo
● Chef: https://www.chef.io/chef/
● Docker: https://www.docker.com
● Elasticsearch: https://www.elastic.co/products/elasticsearch
● Eureka: https://cloud.spring.io/spring-cloud-netflix/
● Kibana: https://www.elastic.co/products/kibana
● Logstash: https://www.elastic.co/products/logstash
● Pivotal Cloud Foundry https://pivotal.io/platform
● Raml: http://raml.org
● Ribbon: https://github.com/Netflix/ribbon
● Spring Cloud Config: https://cloud.spring.io/spring-cloud-config/
● Spring Cloud Sleuth: https://cloud.spring.io/spring-cloud-sleuth/
● Spring IO Platform: https://spring.io/platform
● Sensu: https://sensuapp.org
● Swagger: http://swagger.io
● Vagrant: https://www.vagrantup.com
● Yaml: http://yaml.org
● Zipkin: http://zipkin.io
Glossary

Weitere ähnliche Inhalte

Was ist angesagt?

Performance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorks
Performance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorksPerformance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorks
Performance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorks
Thoughtworks
 

Was ist angesagt? (20)

Continuous Delivery at Netflix, and beyond
Continuous Delivery at Netflix, and beyondContinuous Delivery at Netflix, and beyond
Continuous Delivery at Netflix, and beyond
 
Continuous Deployment Strategies
Continuous Deployment StrategiesContinuous Deployment Strategies
Continuous Deployment Strategies
 
AWS Summit - Trends in Advanced Monitoring for AWS environments
AWS Summit - Trends in Advanced Monitoring for AWS environmentsAWS Summit - Trends in Advanced Monitoring for AWS environments
AWS Summit - Trends in Advanced Monitoring for AWS environments
 
Introduction to Puppet Enterprise 2016.4
Introduction to Puppet Enterprise 2016.4Introduction to Puppet Enterprise 2016.4
Introduction to Puppet Enterprise 2016.4
 
Continuous delivery applied (RJUG)
Continuous delivery applied (RJUG)Continuous delivery applied (RJUG)
Continuous delivery applied (RJUG)
 
Introduction to Puppet Enterprise
Introduction to Puppet EnterpriseIntroduction to Puppet Enterprise
Introduction to Puppet Enterprise
 
How to explain DevOps to your mom
How to explain DevOps to your momHow to explain DevOps to your mom
How to explain DevOps to your mom
 
Controlled Evolution with Puppet and AWS
Controlled Evolution with Puppet and AWSControlled Evolution with Puppet and AWS
Controlled Evolution with Puppet and AWS
 
Introduction to Puppet Enterprise 2016.5
Introduction to Puppet Enterprise 2016.5Introduction to Puppet Enterprise 2016.5
Introduction to Puppet Enterprise 2016.5
 
Monitoring the #DevOps way
Monitoring the #DevOps wayMonitoring the #DevOps way
Monitoring the #DevOps way
 
Continuous Delivery in the Cloud with Bitbucket Pipelines
Continuous Delivery in the Cloud with Bitbucket PipelinesContinuous Delivery in the Cloud with Bitbucket Pipelines
Continuous Delivery in the Cloud with Bitbucket Pipelines
 
What's New in Puppet Enterprise 2016.4
What's New in Puppet Enterprise 2016.4What's New in Puppet Enterprise 2016.4
What's New in Puppet Enterprise 2016.4
 
AI-Powered DevOps: Injecting Speed & Quality Across Verizon’s Cloud Pipelines
AI-Powered DevOps: Injecting Speed & Quality Across Verizon’s Cloud PipelinesAI-Powered DevOps: Injecting Speed & Quality Across Verizon’s Cloud Pipelines
AI-Powered DevOps: Injecting Speed & Quality Across Verizon’s Cloud Pipelines
 
Performance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorks
Performance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorksPerformance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorks
Performance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorks
 
Popular Git Workflows You Haven't Heard About
Popular Git Workflows You Haven't Heard AboutPopular Git Workflows You Haven't Heard About
Popular Git Workflows You Haven't Heard About
 
Build and deploy to the cloud using NetflixOSS (Gradle Summit 2016)
Build and deploy to the cloud using NetflixOSS (Gradle Summit 2016)Build and deploy to the cloud using NetflixOSS (Gradle Summit 2016)
Build and deploy to the cloud using NetflixOSS (Gradle Summit 2016)
 
Monitoring as a Self-Service in Atlassian DevOps Toolchain
Monitoring as a Self-Service in Atlassian DevOps ToolchainMonitoring as a Self-Service in Atlassian DevOps Toolchain
Monitoring as a Self-Service in Atlassian DevOps Toolchain
 
12 Factor, or Cloud Native Apps - What EXACTLY Does that Mean for Spring Deve...
12 Factor, or Cloud Native Apps - What EXACTLY Does that Mean for Spring Deve...12 Factor, or Cloud Native Apps - What EXACTLY Does that Mean for Spring Deve...
12 Factor, or Cloud Native Apps - What EXACTLY Does that Mean for Spring Deve...
 
cdSummit Austin - Jez Humble: CD Architecture
cdSummit Austin - Jez Humble: CD ArchitecturecdSummit Austin - Jez Humble: CD Architecture
cdSummit Austin - Jez Humble: CD Architecture
 
DevOps Pipelines and Metrics Driven Feedback Loops
DevOps Pipelines and Metrics Driven Feedback LoopsDevOps Pipelines and Metrics Driven Feedback Loops
DevOps Pipelines and Metrics Driven Feedback Loops
 

Andere mochten auch

Why Docker
Why DockerWhy Docker
Why Docker
dotCloud
 

Andere mochten auch (18)

The Journey from Monolith to Microservices: a Guided Adventure
The Journey from Monolith to Microservices: a Guided AdventureThe Journey from Monolith to Microservices: a Guided Adventure
The Journey from Monolith to Microservices: a Guided Adventure
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices
 
Why Docker
Why DockerWhy Docker
Why Docker
 
Migrate existing web services and build native microservices in bluemix
Migrate existing web services and build native microservices in bluemixMigrate existing web services and build native microservices in bluemix
Migrate existing web services and build native microservices in bluemix
 
Micro Services - Small is Beautiful
Micro Services - Small is BeautifulMicro Services - Small is Beautiful
Micro Services - Small is Beautiful
 
Triangle Node Meetup : APIs in Minutes with Node.js
Triangle Node Meetup :  APIs in Minutes with Node.jsTriangle Node Meetup :  APIs in Minutes with Node.js
Triangle Node Meetup : APIs in Minutes with Node.js
 
Lessons Learned on Uber's Journey into Microservices
Lessons Learned on Uber's Journey into MicroservicesLessons Learned on Uber's Journey into Microservices
Lessons Learned on Uber's Journey into Microservices
 
Transforming the Monolith at 20M tph
Transforming the Monolith at 20M tphTransforming the Monolith at 20M tph
Transforming the Monolith at 20M tph
 
Intel IT Open Cloud - What's under the Hood and How do we Drive it?
Intel IT Open Cloud - What's under the Hood and How do we Drive it?Intel IT Open Cloud - What's under the Hood and How do we Drive it?
Intel IT Open Cloud - What's under the Hood and How do we Drive it?
 
Microservices: Organizing Large Teams for Rapid Delivery
Microservices: Organizing Large Teams for Rapid DeliveryMicroservices: Organizing Large Teams for Rapid Delivery
Microservices: Organizing Large Teams for Rapid Delivery
 
Building a Foundation for Global Digital Marketing
Building a Foundation for Global Digital MarketingBuilding a Foundation for Global Digital Marketing
Building a Foundation for Global Digital Marketing
 
Applying a Developer-Centric Approach to API Design from API Architect Ronnie...
Applying a Developer-Centric Approach to API Design from API Architect Ronnie...Applying a Developer-Centric Approach to API Design from API Architect Ronnie...
Applying a Developer-Centric Approach to API Design from API Architect Ronnie...
 
Anti Corruption Layers
Anti Corruption LayersAnti Corruption Layers
Anti Corruption Layers
 
Managing a Microservices Development Team (And advanced Microservice concerns)
Managing a Microservices Development Team (And advanced Microservice concerns)Managing a Microservices Development Team (And advanced Microservice concerns)
Managing a Microservices Development Team (And advanced Microservice concerns)
 
DevOps Friendly Doc Publishing for APIs & Microservices
DevOps Friendly Doc Publishing for APIs & MicroservicesDevOps Friendly Doc Publishing for APIs & Microservices
DevOps Friendly Doc Publishing for APIs & Microservices
 
Securing application deployments in multi-tenant CI/CD environments
Securing application deployments in multi-tenant CI/CD environmentsSecuring application deployments in multi-tenant CI/CD environments
Securing application deployments in multi-tenant CI/CD environments
 
Why we need container in Software
Why we need container in SoftwareWhy we need container in Software
Why we need container in Software
 
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
 

Ähnlich wie Lessons Learned from Migrating Legacy Enterprise Applications to Microservices

Ähnlich wie Lessons Learned from Migrating Legacy Enterprise Applications to Microservices (20)

Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
 
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
 
Alexey Kupriyanenko "Release Early, Often, Stable"
Alexey Kupriyanenko "Release Early, Often, Stable"Alexey Kupriyanenko "Release Early, Often, Stable"
Alexey Kupriyanenko "Release Early, Often, Stable"
 
Continuous Build To Continuous Release - Experience
Continuous Build To Continuous Release - ExperienceContinuous Build To Continuous Release - Experience
Continuous Build To Continuous Release - Experience
 
Automating the Quality
Automating the QualityAutomating the Quality
Automating the Quality
 
Pipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as CodePipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as Code
 
CI from scratch with Jenkins (EN)
CI from scratch with Jenkins (EN)CI from scratch with Jenkins (EN)
CI from scratch with Jenkins (EN)
 
Advanced deployment scenarios
Advanced deployment scenariosAdvanced deployment scenarios
Advanced deployment scenarios
 
Jenkinsconf Presentation - Advance jenkins management with multiple projects.
Jenkinsconf Presentation - Advance jenkins management with multiple projects.Jenkinsconf Presentation - Advance jenkins management with multiple projects.
Jenkinsconf Presentation - Advance jenkins management with multiple projects.
 
Evolving toward devops through transaction centric monitoring
Evolving toward devops through transaction centric monitoringEvolving toward devops through transaction centric monitoring
Evolving toward devops through transaction centric monitoring
 
When Web Services Go Bad
When Web Services Go BadWhen Web Services Go Bad
When Web Services Go Bad
 
Preparing for Neo - Singapore OutSystems User Group October 2022 Meetup
Preparing for Neo - Singapore OutSystems User Group October 2022 MeetupPreparing for Neo - Singapore OutSystems User Group October 2022 Meetup
Preparing for Neo - Singapore OutSystems User Group October 2022 Meetup
 
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
 
Mobile Virtualization Management
Mobile Virtualization ManagementMobile Virtualization Management
Mobile Virtualization Management
 
Raising ux bar with offline first design
Raising ux bar with offline first designRaising ux bar with offline first design
Raising ux bar with offline first design
 
Securing Pivotal Cloud Foundry by Regularly Rebuilding
Securing Pivotal Cloud Foundry by Regularly RebuildingSecuring Pivotal Cloud Foundry by Regularly Rebuilding
Securing Pivotal Cloud Foundry by Regularly Rebuilding
 
Principles and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at EtsyPrinciples and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at Etsy
 
Pain Driven Development by Alexandr Sugak
Pain Driven Development by Alexandr SugakPain Driven Development by Alexandr Sugak
Pain Driven Development by Alexandr Sugak
 
AWS re:Invent 2013 - MBL303 Gaming Ops - Running High-performance Ops for Mob...
AWS re:Invent 2013 - MBL303 Gaming Ops - Running High-performance Ops for Mob...AWS re:Invent 2013 - MBL303 Gaming Ops - Running High-performance Ops for Mob...
AWS re:Invent 2013 - MBL303 Gaming Ops - Running High-performance Ops for Mob...
 
Short Introduction of software engineering for bioinformatics
Short Introduction of software engineering for bioinformatics Short Introduction of software engineering for bioinformatics
Short Introduction of software engineering for bioinformatics
 

Mehr von VMware Tanzu

Mehr von VMware Tanzu (20)

What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About It
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - French
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
 
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsSpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

Lessons Learned from Migrating Legacy Enterprise Applications to Microservices

  • 1. Lessons Learned from Migrating Legacy Enterprise Applications to Microservices Ross Zhang (@ross_zhang) Jun Li (@jeffreyjunli) SpringOne Platform 2016
  • 2. Disclaimer All the opinions and views expressed in this presentation and talk are strictly those of the presenter and they do not necessarily reflect those of the institution to which he is affiliated.
  • 3. Agenda ● Our Journey ● Pain Points ● Puzzle Pieces to Migrate to Microservices ● Lessons Learned ● Future Work ● Q & A ● Glossary
  • 4. All icon and image copyrights are reserved by original owners Our Journey 1996 Smalltalk & RPG program 2006 Java EE, EJB2, SOAP, Struts, Wicket, JSP, Hibernate 2011 Spring 3, Spring MVC, Spring Security, JSP... 2013 2014 2015 2016 Spring Boot 0.5.0 Spring Boot 1.0.0 Spring Boot Spring Boot, Spring Cloud, PCF
  • 5. Smalltalk Application Green Screen app SOAP AS400 (20 years old) Application Server EAR - Enterprise Archive MQ Caching Security Load balancing Logging JNDIEAR - Enterprise Archive EAR - Enterprise Archive Migration Journey
  • 6. Pain Points ● Development ● Deployment ● Operations
  • 7. Development Pain Points Dev env takes too long to set up Jar hell Framework configurations
  • 8. Deployment Pain Points Slow Unstable Downtime
  • 9. Operation Pain Points No application health check No log aggregation or analysis
  • 10. Microservices The term "Microservice Architecture" has sprung up over the last few years to describe a particular way of designing software applications as suites of independently deployable services. While there is no precise definition of this architectural style, there are certain common characteristics around organization around business capability, automated deployment, intelligence in the endpoints, and decentralized control of languages and data. - - Martin Fowler (http://martinfowler.com/articles/microservices.html)
  • 11. Migrating to Microservices Puzzle #0 Problem: application server What we tried: ● Vagrant, Docker ● Standalone Tomcat Solution: Embedded Tomcat Result: ● Local set up: 5 hours -> 0 second ● Deploy: 5 minutes -> 1 minute
  • 12. Migrating to Microservices Puzzle #1 Problem: lots of boilerplate framework configurations Solution: Spring Boot
  • 13. Migrating to Microservices Puzzle #2 Problem: Dependency management
  • 14.
  • 15. Migrating to Microservices Puzzle #2 Solution: Spring IO Platform <dependencyManagement> <dependencies> <dependency> <groupId>io.spring.platform</groupId> <artifactId>platform-bom</artifactId> <version>1.1.1.RELEASE</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>
  • 16. Migrating to Microservices Puzzle #3 Problem: Application health check and monitoring ● Issue: murder mystery to your application ○ Brute force restart ● Issue: one production app depends on dev environment Solution: Spring Boot Actuator + extension endpoint ● /health combined with Sensu so that operations can react immediately ● /info links deployment artifact with CI build pipeline so that we know how it was built, when it was built, and how it was tested ● /dependencies
  • 17. { { "maven.artifact" : "com.sample.authorization.ws", "maven.artifact.version" : "1.6.489-SNAPSHOT", "git.branch" : "master", "git.commit.id" : "5155e6314ec891fa0094d4fc708c551a2184f132", "build.number" : "489", "build.url" : "http://bamboo/browse/AUT-BUIL-489" } }
  • 18. { "dependencies": [{ "serviceName": "User Info WS", "version": "4.0.0", "endpoint": "http://domainname.com/user-info-ws" }, { "serviceName": "Encryption WS", "version": "3.1.0", "endpoint": "http://domainname.com/encryption-ws" }, { "serviceName": "Order WS", "version": "1.1.0-SNAPSHOT", "endpoint": "http://domainname.com/order-ws" }, { "Database": "DB2 for AS/400", "Url": "jdbc:as400://dev-db", "Username": "dbuser", "Tables": "{tbl_user, tbl_org, tbl_order, tbl_reference}" }] }
  • 19. Migrating to Microservices Puzzle #4 Problems: ● Isolated configurations, without security ● Hard to trace request and response We Tried: Spring Cloud
  • 20. Make a change Check in master Compile, unit test, integration test on CI server Deploy to Staging Interactive tests Deploy to production with script 2013 Migrating to Microservices Puzzle #5
  • 21. Make a change Check in master Compile, unit test, integration test on CI server Deploy to Staging Interactive tests One click deploy to production Automated Infrastructure test in Chef 2015 Migrating to Microservices Puzzle #5
  • 22. Make a change Check in master Compile, unit test, integration test on CI server Deploy to Staging Interactive tests One click deploy to production In PCF Automated Infrastructure test in Pivotal Cloud Foundry 2016 and beyond Migrating to Microservices Puzzle #5
  • 23. Migrating to Microservices Puzzle #6 For each new service, we have to create: ● 3+ git repositories ● 1 CI build plan ● 2 CI deployment plans (dev and prod) ● Many more code, tests, README, CHANGELOG, YML, RAML, POM...
  • 25.
  • 26.
  • 27.
  • 28. ├── ├── ├── ├── ├── ├── │ ... ├── │ ├── │ └── │ ├── │ │ └── │ │ └── │ │ └── │ │ └── │ │ ├── │ │ │ ├── │ │ │ ├── │ │ │ └── │ │ ├── │ │ │ ├── │ │ │ └── │ │ └── │ │ ├── │ │ └── │ └── │ ... └── ├── ├── │ └── └── ├── │ └── │ └── │ └── │ └── │ └── │ ├── │ └── └── └── └── └── └── └── ├── └── 49 directories, 32 files!
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34. Dev QA PM BusinessOperation Departments Projects DevOps Organizational Structure Changes
  • 35. Spring Boot is the baseline! Lessons Learned
  • 36. Lessons Learned Test automation as much as possible ● Unit test ● Integration test ● End-to-end test
  • 37. Lessons Learned Health and monitoring is super important because ● Operation people get notified immediately if something goes wrong ● When combined with log aggregation and analysis, troubleshooting becomes easier for developers ● Think about how to define a healthy application ● Secure your Spring Boot Actuator endpoints
  • 38. Future Work ● Log aggregation ● Service discovery and client load balancing ● A/B Testing
  • 39. Q&A
  • 40. ● Bamboo: https://www.atlassian.com/software/bamboo ● Chef: https://www.chef.io/chef/ ● Docker: https://www.docker.com ● Elasticsearch: https://www.elastic.co/products/elasticsearch ● Eureka: https://cloud.spring.io/spring-cloud-netflix/ ● Kibana: https://www.elastic.co/products/kibana ● Logstash: https://www.elastic.co/products/logstash ● Pivotal Cloud Foundry https://pivotal.io/platform ● Raml: http://raml.org ● Ribbon: https://github.com/Netflix/ribbon ● Spring Cloud Config: https://cloud.spring.io/spring-cloud-config/ ● Spring Cloud Sleuth: https://cloud.spring.io/spring-cloud-sleuth/ ● Spring IO Platform: https://spring.io/platform ● Sensu: https://sensuapp.org ● Swagger: http://swagger.io ● Vagrant: https://www.vagrantup.com ● Yaml: http://yaml.org ● Zipkin: http://zipkin.io Glossary