✔
✔ (customizing)
✔ , 5
✔ (Amazon Web Service)
legacy.php {
HTML
+= CSS
+= JAVASCRIPT
+= PHP
+= SQL
}
STRANGLER FACADE
LEGACY
MODERN
STRANGLER FACADE
MODERN
LEGACY
MODERN
STRANGLER FACADE




Backend
Frontend
Embedded servlet containers(undertow.io)
jOOQ 3.xSpring MVC 4.x
Spring Boot 1.5.x, Spring Framework 4.x, Spring Cloud AWS 1.2.x

BackendAWS Elastic Beanstalk / JVM(Java 1.8)
Presentation Application
Business (Domain)
Data Access

Backend
Frontend







Backend
Frontend
RPC Stub RPC Server
SHARED
LIBRARY
HTTP Client HTTP Server
- (RESOURCE) - URI
- (Verb) - HTTP Method
- (Representations)
TWELVE-FACTOR APP METHODOLOGY
.
.
.
.
, , .
(Codebase): .
(Dependencies): .
(Config): .
(Backing services): .
, , (Build, Release, Run): , .
(Processes): .
(Port binding): .
(Concurrency): .
(Disposability): .
/ (Dev/Prod parity): , .
(Logs): .
(Admin Process): (admin/management) .
Backend
Frontend



function getUsableMileage(){
if (FeatureToggle::create()->isEnable(FeatureToggle::USE_BE_MILEAGE)) {
// Backend
}
//
return $usable_mileage;
}
https://martinfowler.com/articles/feature-toggles.html


API GATEWAY
Backend
Frontend



Eureka Client
(service discovery)
Ribbon
(load balancer)
Zuul Proxy
(edge service)
Eureka Server
Hystrix Dashboard,
Turbine
Hystrix

(circuit breaker)
http://woowabros.github.io/experience/2017/08/21/hystrix-tunning.html
http://woowabros.github.io/experience/2018/06/07/vue-story-of-baminchan.html

API GATEWAY
Backend
Frontend
. .
legacy.php {
require_once '/common/config.php';
require '/common/init.php';
include 'header';
include 'view';
include 'footer';
}
Frontend

API GATEWAY

API GATEWAY

API GATEWAY
babel(ES6), sass, webpack
Node.js v8.x
http-proxy, requestExpress.js, Handlebars
Vue.js v2.x axios
gradle, babel(ES6), sass, webpack
Java 1.8, Node.js v8.x
Spring Cloud NetflixSpring MVC, Thymeleaf
Vue.js v2.x axios
Spring Boot 1.5.x
babel(ES6), sass, webpack
Node.js v8.x
http-proxy, requestExpress.js, Handlebars
Vue.js v2.x axios
gradle, babel(ES6), sass, webpack
Java 1.8, Node.js v8.x
Spring Cloud NetflixSpring MVC, Thymeleaf
Vue.js v2.x axios
Spring Boot 1.5.x
babel(ES6), sass, webpack
Node.js v8.x
http-proxy, requestExpress.js, Handlebars
Vue.js v2.x axios
gradle, babel(ES6), sass, webpack
Java 1.8, Node.js v8.x
Spring Cloud NetflixSpring MVC, Thymeleaf
Vue.js v2.x axios
Spring Boot 1.5.x
https://github.com/arawn/continual-improve-legacy-web
ORDER
SYSTEM
[ WEB ]

USER-SERVICE
API GATEWAY
PRODUCT
SYSTEM
SCM
SYSTEM
EXTERNAL
SYSTEMS




MDM
SYSTEM[ WEB ]

BACK-OFFICE
ORDER
SYSTEM
[ WEB ]

USER-SERVICE
API GATEWAY
PRODUCT
SYSTEM
SCM
SYSTEM
EXTERNAL
SYSTEMS




MDM
SYSTEM[ WEB ]

BACK-OFFICE
ORDER
SYSTEM
PRODUCT
SYSTEM
SCM
SYSTEM
EXTERNAL
SYSTEMS




MDM
SYSTEM
local.baeminchan.com
dev.baeminchan.com
test.baeminchan.com
staging.baeminchan.com
production.baeminchan.com
local.baeminchan.com
dev.baeminchan.com
test.baeminchan.com
staging.baeminchan.com
production.baeminchan.com
Application
Code
https://12factor.net/config
└── resources
├── application.yml #
├── application-local.yml #
├── application-dev.yml #
├── application-test.yml #
├── application-staging.yml #
├── application-production.yml #
└── application-ec2.yml # AWS EC2
> java -jar application.jar --spring.profiles.active=dev,ec2
+ OS environment variables (AWS Elastic Beanstalk) {
export DB_USERNAME="order_service"
export DB_PASSWORD="7%wo9;ttArRYMfYp"
}
https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html
AWS Elastic Beanstalk
{ WEB UI }
AWS EC2
{ SSH }
AWS LAMBDA
{ WEB UI }
WEB
APP
BATCH
APP
SERVERLESS
APP
https://projects.spring.io/spring-cloud/
SERVICE#1 Config Server

SERVICE#2
SERVICE#3
Config Repository
Config Client
Config Client
Config Client
SERVICE#1 Config Server

Config Repository
Config Client
└── resources
├── application.yml # Spring Boot
└── bootstrap.yml # Spring Cloud
> service#1.jar
spring:
application.name: application
cloud.config.uri: https://config.arawn.io
Service discovery and configuration management with Apache Zookeeper.
Service discovery and configuration management with Hashicorp Consul.
Centralized external configuration management backed by a git repository. The
configuration resources map directly to Spring `Environment` but could be used
by non-Spring applications if desired.
Consul Server
(Cluster)
Consul Server
(Cluster)
SERVICE#1 Consul Server
(Cluster)

SERVICE#2
SERVICE#3
Git Repository
Consul Client
Consul Client
Consul Template
Jenkins
application.yml
https://www.consul.io
DNS
(load
balancer)
https://github.com/hashicorp/consul-template
Consul Server
(Cluster)
Consul Server
(Cluster)
SERVICE#1 Consul Server
(Cluster)

SERVICE#2
SERVICE#3
Git Repository
Consul Client
Consul Client
Consul Template
Jenkins
application.yml
DNS
(load
balancer)
datasource:
username: '{cipher}65794a6492kfc627782d59534d4845355167'
password: '{cipher}6575f2d938928525976712e6d7a679616641'
AWS
Key Management Service
AWS LAMBDA
Consul Server
(Cluster)
SERVICE#1

Git Repository
Consul Client Jenkins
application.yml
DNS
(load
balancer)
ORDER
SYSTEMUSER SERVICE
API GW
PRODUCT
SYSTEM
SCM
SYSTEM
EXTERNAL
SYSTEMS


MDM
SYSTEMBACK-OFFICE
SCM
SYSTEM
ORDER
SYSTEMUSER SERVICE
API GW
PRODUCT
SYSTEM
SCM
SYSTEM
EXTERNAL
SYSTEMS


MDM
SYSTEMBACK-OFFICE
SCM
SYSTEM
✔ (strangler patterns)
✔ (strangler application)
✔ Refactoring a Monolith into Microservices
✔ API
✔ Pattern: API Gateway / Backend for Front-End
✔ Netflix Zuul : Importance of Reverse Proxy in Microservices Architecture
✔ Cloud Native Java
✔ The Twelve-Factor app (12 )

점진적인 레거시 웹 애플리케이션 개선 과정