SlideShare une entreprise Scribd logo
1  sur  104
Télécharger pour lire hors ligne
SPRING CAMP 2017
Gunhee Lee
SCOUTER commiter
비동기 어플리케이션과
모니터링으로 밀당하기
비동기 어플리케이션, 어떻게 모니터링 할 것인가?
- 초초보 ver. -
SPRING CAMP 2017
이건희 ­ 그분은 아닙니다.
Line+ Programmer (& SNOW Corp.)

Scouter APM commiter

KOSSLab 3기 - 오픈소스프론티어
그래서 구글서 검색 안됨
SPRING CAMP 2017
- 어플리케이션 모니터링과 APM
- APM의 구현 원리 (BCI)
- 모니터링을 위한 Context의 전파 (Servlet)
- 비동기 어플리케이션 모니터링의 어려움
- 비동기 어플리케이션과 모니터링으로 밀당하기
이야기 할 것
SPRING CAMP 2017
??
CPU 응답시간 처리량
이건 뭐…
SPRING CAMP 2017
??
CPU 응답시간 처리량
이건 뭔가 좀 이상하다…
SPRING CAMP 2017
시간에 따른 숫자들 - 성능메트릭
-> Visualization
??
SPRING CAMP 2017
이것들은 결과일 뿐…
??
SPRING CAMP 2017
원인을 모를때 우리는 이런 일
들을 하지요…
??
SPRING CAMP 2017
RESTART !
??
다시 껏다 킨다!
SPRING CAMP 2017
그럼 왜 ???
원인이 뭐냐!
??
SPRING CAMP 2017
Application performance management
성능 메트릭 + 원인을 찾기위한 𝛼
APM 이란?
SPRING CAMP 2017
APM
Active Service
응답시간 분포도
(XLog)
Profile
SPRING CAMP 2017
어떻게 성능 정보를 수집하는가?
APM을 구현하는 기술
- cpu, memory
- method 정보
- sql, bind 변수
- 구간별 수행시간
- api 호출 url, 응답시간 …
SPRING CAMP 2017
BCI (Byte code instrumentation)
- bytecode에 직접 변경을 가해

소스코드의 수정없이 원하는 기능을

삽입할 수 있는 방법
APM을 구현하는 기술
Super Power
SPRING CAMP 2017
어렵지 않다.
premain() 만 기억하자!
BCI
SPRING CAMP 2017
premain()
- premain()은 main() 전에 수행된다.
- 여기서 transformer를 통해 class 변경
BCI
- Libraries
- ASM, Javassist, cglib, bytebuddy …
SPRING CAMP 2017
Thread name enhancer
http-bio-7 :
뭔가 모자르다… 

uri ??

Start time ?? 특정 parameter?
BCI 예제 HttpServerlet.service()
SPRING CAMP 2017
Thread name enhancer
https://github.com/gunlee01/thread-name-enhancer
BCI 예제
SPRING CAMP 2017
모니터링을 위한
application Trace Context
SPRING CAMP 2017
Trace Context
- cpu, memory
- method 정보
- sql, bind 변수
- 구간별 수행시간
- api 호출 url, 응답시간 …
SPRING CAMP 2017
methodA() {
(시작시간); // <- BCI
… 원래 코드 …
… call methodB()
(end시간-시작시간) // <- BCI
}
Method의 수행 시간 측정
methodB() {
(시작시간);
… 원래 코드 …
(http call)
(sql)
(end시간-시작시간)
}
TraceContext
SPRING CAMP 2017
Trace Context를 어떻게 전달할 것인가?
SPRING CAMP 2017
Trace Context를 어떻게 전달할 것인가?
static
variable
SPRING CAMP 2017
Trace Context를 어떻게 전달할 것인가?
static
variable
SPRING CAMP 2017
Trace Context를 어떻게 전달할 것인가?
- method의 파라미터로 전달
SPRING CAMP 2017
Servlet Container
Servlet
Dispatcher
Request
Queue
Thread
Pool
Request
요청에서 응답까지 Container가 관리하는
하나의 Thread로 동작
SPRING CAMP 2017
ThreadLocal
This class provides thread-local variables.
하나의 Thread에서 local 변수처럼

접근할 수 있는 무언가가 필요하다 !
Refs : https://docs.oracle.com/javase/7/docs/api/java/lang/ThreadLocal.html
SPRING CAMP 2017
ThreadLocal
This class provides thread-local variables.
ref: http://javacan.tistory.com/entry/ThreadLocalUsage
SPRING CAMP 2017
Simple ThreadLocal
SPRING CAMP 2017
ThreadLocal 의 활용
- Security Context
- Transaction context
- MDC (logging framework)
SPRING CAMP 2017
비동기 어플리케이션과
모니터링으로 밀당하기
SPRING CAMP 2017
Blocking Multi-thread

Servlet application의 문제점 ??
- Thread per request
: Blocking에 의한 Long running thread

: 과도한 Thread 사용 (context switching)

: thread pool 고갈로 인한 문제, cascading failure
SPRING CAMP 2017
Blocking Multi-thread

Servlet application의 문제점 ??
- Thread per request
: Blocking에 의한 Long running thread

: 과도한 Thread 사용 (context switching)

: thread pool 고갈로 인한 문제, cascading failure
그렇다면 장점은?
SPRING CAMP 2017
Blocking Multi-thread

Servlet application의 장점
- 이해하고 디버깅 하기 쉽다.

Thread가 하나의 작업을 처리

Stack은 처리에 대한 정확한 Snapshot (threaddump)

XXXContext의 전달이 쉽다
SPRING CAMP 2017
blocking Servlet application의 장점
쉽고 단순하다.
SPRING CAMP 2017
blocking Servlet application의 장점
비동기 메소드 호출시
SPRING CAMP 2017
blocking Servlet application의 장점
Non bloking IO 라면 흔적도 없다. ㅠㅠ
SPRING CAMP 2017
비동기 시스템 장점이 대단하게 들리겠지만 위 혜택은 운영 비용이 발생합니다.
블록킹 시스템은 이해하고 디버깅하기 쉽고… 쓰레드의 스택은 요청 또는 생성된 작업의 처리
과정에 대한 정확한 스냇샵이 됩니다…
반대로 비동기는 … 이벤트 반복의 스택 트레이스에서는 요청을 따라서 추적하는 것이
아무런 도움이 되지 않습니다. 이벤트와 콜백이 처리될 때 요청을 따라가기가 어렵고, 이러
한 문제를 디버깅하도록 지원하는 도구는 매우 부족합니다.
Netflix tech blog
SPRING CAMP 2017
전반적으로 아키텍처 변경으로 얻을 수 있는 가치는 높았습니다. 커넥션 규모를 늘릴 수 있다
점이 중요한 혜택이었지만 비용이 많이 들었습니다. 우리는 디버깅하고, 개발하고, 테스트하기
훨씬 더 복잡한 시스템을 보유하고 있으며…
Netflix tech blog
SPRING CAMP 2017
Netflix tech blog
http://techblog.netflix.com/2016/09/zuul-2-netflix-journey-to-asynchronous.html
http://chanwookpark.github.io/reactive/netflix/zuul/async/non-blocking/2016/11/21/
zuul2-netflixjourney-to-asynchronous-non-blocking-systems/
SPRING CAMP 2017
비동기 application 모니터링의 목표 !
비동기이던 non-blockign이던
기존 어플리케이션 모니터링에서 제공하던
동일한(혹은 유사한) View로
볼수 있게 하는 것.
SPRING CAMP 2017
Servlet Thread #n
비동기 Servlet (Servlet 3.0+)
Servlet

Thread #m
Worker Thread #n
Request::

StartAsync()
AsyncContext::

start(Runnable)
RunnableDispatch
Request
Response
SPRING CAMP 2017
비동기 처리
another
thread #1
another
thread #2
another
thread #3
SPRING CAMP 2017
이제는 ThreadLocal을 통해
Context를 전파할 수 없다 !!
SPRING CAMP 2017
Good !
InheritableThreadLocal
This class extends ThreadLocal
to provide inheritance of values
from parent thread to child thread.
When a child thread is created,
the child receives initial values …
Refs : https://docs.oracle.com/javase/7/docs/api/java/lang/InheritableThreadLocal.html
SPRING CAMP 2017
InheritableThreadLocal
SPRING CAMP 2017
InheritableThreadLocal
정말 이것으로 가능한가?
SPRING CAMP 2017
Logback manual # MDC
A copy of the mapped diagnostic context 

can not always be inherited by worker threads from the initiating thread.
This is the case when java.util.concurrent.Executors is used for thread
management. … creates a ThreadPoolExecutor and like other thread
pooling code, it has intricate thread creation logic.
In such cases,
… MDC.getCopyOfContextMap() is invoked on the original (master) thread
before submitting a task to the executor.
… When the task runs, as its first action,
it should invoke MDC.setContextMapValues() to associate …
Refs : https://logback.qos.ch/manual/mdc.html#managedThreads
SPRING CAMP 2017
Logback manual# MDC
thread #1 thread #2
Map ctx =
MDC.getCopyOfContextMap()
MDC
.setContextMap(ctx)
SPRING CAMP 2017
Logback manual# MDC
결국. 니 알아서
전달해라.
SPRING CAMP 2017
밀당의 시작
#1
알아서 전달하기
SPRING CAMP 2017
Parameter를 활용해 Context 전달하기
scouter APM 에 가장 먼저 제공된 기능
SPRING CAMP 2017
Parameter를 활용해 Context 전달하기
SPRING CAMP 2017
Parameter를 활용해 Context 전달하기
SPRING CAMP 2017
Parameter를 활용해 Context 전달하기
전달할 조건을 직접 설정
SPRING CAMP 2017
밀당하기
#2
Runnable & Callable
SPRING CAMP 2017
Runnable & Callable
결국 Runnable 또는 Callable !!!
SPRING CAMP 2017
Runnable & Callable
SPRING CAMP 2017
Runnable & Callable
실제로는
익명 Inner class가 생긴다.
SPRING CAMP 2017
Runnable & Callable
SPRING CAMP 2017
Runnable & Callable
SPRING CAMP 2017
Runnable & Callable
thread #1
thread #2
SPRING CAMP 2017
Good ~~ !
한방에 해결
SPRING CAMP 2017
(아직도 진행 중인)
끝나지 않은 밀당
#3
Lambda expression
SPRING CAMP 2017
Lambda expression
얘는 또 어쩔…
SPRING CAMP 2017
Lambda expression
얘는 또 어쩔…
SPRING CAMP 2017
Lambda expression
앞에서
Runnable을 통해 전달할때와 똑같이 해보자.
(1) 생성자에서 this를 key로 ctx 저장
(2) run() 에서 this로 ctx를 겟!
SPRING CAMP 2017
Lambda expression
이 두가지는 같은 것인가?
SPRING CAMP 2017
Lambda expression
anonymous inner class != lambda expression
SPRING CAMP 2017
Lambda expression
그렇다면 Lambda 식은 inner class 가 아닌가?
yes 인데 그냥 yes는 아니고…
SPRING CAMP 2017
Lambda expression
그렇다면 Lambda 식은 inner class 가 아닌가?
Lambda body는 inner class가 아니다.
Lambda body는 내부적으로 생성되는 inner class를 통해

실행된다. (Lambda proxy)
하지만 일반적인 inner class 와는 생성과정이 다르다.
SPRING CAMP 2017
Lambda expression desugar
Lambda의 body는
private (static) method가 된다.
SPRING CAMP 2017
Lambda expression
따라서 Lambda body에서의
this 는 lambda식이 있는 class의 인스턴스이다.
SPRING CAMP 2017
Lambda expression
??
??
SPRING CAMP 2017
Lambda expression
SPRING CAMP 2017
Lambda expression
SPRING CAMP 2017
Lambda expression
* 최초 실행시 bootstraping

—> LambdaMetafacoty::metafactory()
(1) Functional I/F를 구현하는 Innerclass 동적 생성 (ASM으로)
- Lambda Proxy
(2) Innerclass의 instance를 반환하는 factory Method

에 대한 methodHandle(CallSite) 반환
SPRING CAMP 2017
Lambda expression
SPRING CAMP 2017
Lambda expression
생성할때 this로 ctx 전파
Run에서 this로 ctx 겟!
SPRING CAMP 2017
Lambda 정복
LambdaMetafacoty에서
Innerclass 생성시에
BCI로 적용하면 모든것이
한방에 끝난다. !!
SPRING CAMP 2017
Lambda ??
그런데 ???
Classfile Transformer를 걸어도
transform()에 전달되지가 않는다…
SPRING CAMP 2017
Lambda ??
고난의 시작 …
구글신께 물어봐도 별다른 답이 없고…
SPRING CAMP 2017
Lambda ??
원인은 바로 이것
SPRING CAMP 2017
Lambda ??
원인은 바로 이것
anonymous class loader에 의해 class loading
-> anonymous-in-VM-sence class
-> target class의 보안 수준 계승 (private 접근 가능)
SPRING CAMP 2017
Lambda ??
Anonymous class loader에 의해 로드된 클래스는
classfiletransformer를 경유하지 않으므로
transform 할수 없다 !!!
SPRING CAMP 2017
Lambda ??
용자의 등장 !
SPRING CAMP 2017
Lambda ??
Rafael Winterhalter
http://rafael.codes/
SPRING CAMP 2017
Bytebuddy
Rafael Winterhalter
- Bytebuddy의 author
http://bytebuddy.net
- code generation and manipulation library 

( Mockito, Hibernate …)
SPRING CAMP 2017
Bytebuddy
Rafael Winterhalter
- Lambdametafacoty 에서 생성하는

Innerclass 를 일반 class 처럼

transform() 할수 있게 해줘!
- Open JDK groups 를 통해 의견 교환

http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-January/038199.html
SPRING CAMP 2017
Bytebuddy
- 해줘 !
- 왜 안돼?
- 안돼 !
- 람다는 람다야. 이 구현은 바뀔거야.

지금은 방법이 없어서 걍 일케 한거야.
- 좀 더 멋지게 바뀔거라구.
(언젠가는 …)
- using a vm anonymous class is
a workaround of the fact that
there is currently no way to
load a function/method
without a class.
SPRING CAMP 2017
Bytebuddy
- 넌 현실을 참 모르는구나!

Real world에선 필요하다구.
- 자꾸 그럼 내가 만든다!
- 안돼 ! 이걸로 뭘 하려고 하지마.

(왜 필요한지도 잘 모르겠구…)
- 증말 하지마.

JVM의 구현이 바뀌면

다 쓸모 없어 진다구 …
SPRING CAMP 2017
Bytebuddy
LambdaMetafacoty 자체를 transform()
SPRING CAMP 2017
Lambda class transform
해보니 잘된다 !
SPRING CAMP 2017
Lambda class transform
scouter v0.5.0에 적용
릴리즈
SPRING CAMP 2017
Lambda class transform
갑자기 밀려드는 버그 리포팅
SPRING CAMP 2017
Lambda class transform
Functional I/F가 Supplier인 경우
SPRING CAMP 2017
결국
No one-size-fits-all strategy
SPRING CAMP 2017
비동기 어플리케이션 모니터링
아직 할 수 있는 방법은 많다.
SPRING CAMP 2017
할 수 있는 것
잘 알려진 F/W, Library의 메커니즘들에 적용
Executor의 execute(), submit()
AsyncExecutionAspectSupport.doSubmit()
…
SPRING CAMP 2017
할 수 있는 것
믿고 쓰는 Spring
- Spring-web-reactive 에서도
SecurityContext 등을 

F/W 수준에서 전파하는 방법을 제공할 것
- 그 방식을 그대로 사용
SPRING CAMP 2017
밀당은 계속된다 !
SPRING CAMP 2017
하고 싶은 것
비동기 어플리케이션을 (& Non blocking)
쉽게 추적하고 모니터링 할 수 있게 만들기
SPRING CAMP 2017
SCOUTER에 참여하기
Github
https://github.com/scouter-project/scouter
Facebook 사용자 모임
https://www.facebook.com/groups/scouterapm
SPRING CAMP 2017
감사합니다
gunlee01@gmail.com

Contenu connexe

Tendances

Elastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & KibanaElastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & KibanaSpringPeople
 
Service workers
Service workersService workers
Service workersjungkees
 
KSQL and Security: The Current State of Affairs (Victoria Xia, Confluent) Kaf...
KSQL and Security: The Current State of Affairs (Victoria Xia, Confluent) Kaf...KSQL and Security: The Current State of Affairs (Victoria Xia, Confluent) Kaf...
KSQL and Security: The Current State of Affairs (Victoria Xia, Confluent) Kaf...confluent
 
Introduction to Prometheus
Introduction to PrometheusIntroduction to Prometheus
Introduction to PrometheusJulien Pivotto
 
How to monitor your micro-service with Prometheus?
How to monitor your micro-service with Prometheus?How to monitor your micro-service with Prometheus?
How to monitor your micro-service with Prometheus?Wojciech Barczyński
 
Service Worker Presentation
Service Worker PresentationService Worker Presentation
Service Worker PresentationKyle Dorman
 
Kafka Streams: What it is, and how to use it?
Kafka Streams: What it is, and how to use it?Kafka Streams: What it is, and how to use it?
Kafka Streams: What it is, and how to use it?confluent
 
Introduction to ASP.NET Core
Introduction to ASP.NET CoreIntroduction to ASP.NET Core
Introduction to ASP.NET CoreAvanade Nederland
 
Microservices, Kubernetes and Istio - A Great Fit!
Microservices, Kubernetes and Istio - A Great Fit!Microservices, Kubernetes and Istio - A Great Fit!
Microservices, Kubernetes and Istio - A Great Fit!Animesh Singh
 
Building Windows Images with Packer
Building Windows Images with PackerBuilding Windows Images with Packer
Building Windows Images with PackerMatt Wrock
 
MemSQL 201: Advanced Tips and Tricks Webcast
MemSQL 201: Advanced Tips and Tricks WebcastMemSQL 201: Advanced Tips and Tricks Webcast
MemSQL 201: Advanced Tips and Tricks WebcastSingleStore
 
Local Apache NiFi Processor Debug
Local Apache NiFi Processor DebugLocal Apache NiFi Processor Debug
Local Apache NiFi Processor DebugDeon Huang
 
Return of the monolith
Return of the monolith Return of the monolith
Return of the monolith Alper Hankendi
 
Apache Camel K - Copenhagen
Apache Camel K - CopenhagenApache Camel K - Copenhagen
Apache Camel K - CopenhagenClaus Ibsen
 
Zero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with NettyZero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with NettyDaniel Bimschas
 
Cilium - Bringing the BPF Revolution to Kubernetes Networking and Security
Cilium - Bringing the BPF Revolution to Kubernetes Networking and SecurityCilium - Bringing the BPF Revolution to Kubernetes Networking and Security
Cilium - Bringing the BPF Revolution to Kubernetes Networking and SecurityThomas Graf
 

Tendances (20)

Spring Boot
Spring BootSpring Boot
Spring Boot
 
Elastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & KibanaElastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & Kibana
 
Service workers
Service workersService workers
Service workers
 
Elk
Elk Elk
Elk
 
KSQL and Security: The Current State of Affairs (Victoria Xia, Confluent) Kaf...
KSQL and Security: The Current State of Affairs (Victoria Xia, Confluent) Kaf...KSQL and Security: The Current State of Affairs (Victoria Xia, Confluent) Kaf...
KSQL and Security: The Current State of Affairs (Victoria Xia, Confluent) Kaf...
 
Introduction to Prometheus
Introduction to PrometheusIntroduction to Prometheus
Introduction to Prometheus
 
Jenkins
JenkinsJenkins
Jenkins
 
gRPC Overview
gRPC OverviewgRPC Overview
gRPC Overview
 
How to monitor your micro-service with Prometheus?
How to monitor your micro-service with Prometheus?How to monitor your micro-service with Prometheus?
How to monitor your micro-service with Prometheus?
 
Service Worker Presentation
Service Worker PresentationService Worker Presentation
Service Worker Presentation
 
Kafka Streams: What it is, and how to use it?
Kafka Streams: What it is, and how to use it?Kafka Streams: What it is, and how to use it?
Kafka Streams: What it is, and how to use it?
 
Introduction to ASP.NET Core
Introduction to ASP.NET CoreIntroduction to ASP.NET Core
Introduction to ASP.NET Core
 
Microservices, Kubernetes and Istio - A Great Fit!
Microservices, Kubernetes and Istio - A Great Fit!Microservices, Kubernetes and Istio - A Great Fit!
Microservices, Kubernetes and Istio - A Great Fit!
 
Building Windows Images with Packer
Building Windows Images with PackerBuilding Windows Images with Packer
Building Windows Images with Packer
 
MemSQL 201: Advanced Tips and Tricks Webcast
MemSQL 201: Advanced Tips and Tricks WebcastMemSQL 201: Advanced Tips and Tricks Webcast
MemSQL 201: Advanced Tips and Tricks Webcast
 
Local Apache NiFi Processor Debug
Local Apache NiFi Processor DebugLocal Apache NiFi Processor Debug
Local Apache NiFi Processor Debug
 
Return of the monolith
Return of the monolith Return of the monolith
Return of the monolith
 
Apache Camel K - Copenhagen
Apache Camel K - CopenhagenApache Camel K - Copenhagen
Apache Camel K - Copenhagen
 
Zero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with NettyZero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with Netty
 
Cilium - Bringing the BPF Revolution to Kubernetes Networking and Security
Cilium - Bringing the BPF Revolution to Kubernetes Networking and SecurityCilium - Bringing the BPF Revolution to Kubernetes Networking and Security
Cilium - Bringing the BPF Revolution to Kubernetes Networking and Security
 

Similaire à 비동기 어플리케이션 모니터링과 밀당하기

Let'Swift 2023 Swift Macro, 어디다 쓰죠?
Let'Swift 2023 Swift Macro, 어디다 쓰죠?Let'Swift 2023 Swift Macro, 어디다 쓰죠?
Let'Swift 2023 Swift Macro, 어디다 쓰죠?williciousk
 
파크히어 Realm 사용 사례
파크히어 Realm 사용 사례파크히어 Realm 사용 사례
파크히어 Realm 사용 사례선협 이
 
[MASOCON 2019] Serverless - Kimminjun
[MASOCON 2019] Serverless - Kimminjun [MASOCON 2019] Serverless - Kimminjun
[MASOCON 2019] Serverless - Kimminjun Kim Minjun
 
[236] 카카오의데이터파이프라인 윤도영
[236] 카카오의데이터파이프라인 윤도영[236] 카카오의데이터파이프라인 윤도영
[236] 카카오의데이터파이프라인 윤도영NAVER D2
 
The platform 2011
The platform 2011The platform 2011
The platform 2011NAVER D2
 
Kinesis / Lambda / EMR / Redshift 를 이용한 Big Data 분석 - 이상현 (빙글)
Kinesis / Lambda / EMR / Redshift 를 이용한 Big Data 분석 - 이상현 (빙글)Kinesis / Lambda / EMR / Redshift 를 이용한 Big Data 분석 - 이상현 (빙글)
Kinesis / Lambda / EMR / Redshift 를 이용한 Big Data 분석 - 이상현 (빙글)AWSKRUG - AWS한국사용자모임
 
카사 공개세미나1회 W.E.L.C.
카사 공개세미나1회  W.E.L.C.카사 공개세미나1회  W.E.L.C.
카사 공개세미나1회 W.E.L.C.Ryan Park
 
AWS 서버리스 신규 서비스 총정리 - 트랙2, Community Day 2018 re:Invent 특집
AWS 서버리스 신규 서비스 총정리 - 트랙2, Community Day 2018 re:Invent 특집AWS 서버리스 신규 서비스 총정리 - 트랙2, Community Day 2018 re:Invent 특집
AWS 서버리스 신규 서비스 총정리 - 트랙2, Community Day 2018 re:Invent 특집AWSKRUG - AWS한국사용자모임
 
Aws lambda 와 함께 서버리스 서비스 만들기
Aws lambda 와 함께 서버리스 서비스 만들기Aws lambda 와 함께 서버리스 서비스 만들기
Aws lambda 와 함께 서버리스 서비스 만들기Junyoung Sung
 
Feature Branch Branch Dev QA 환경 구성기
Feature Branch Branch Dev QA 환경 구성기Feature Branch Branch Dev QA 환경 구성기
Feature Branch Branch Dev QA 환경 구성기productab180
 
자바_웹_개발자를_위한_c#_핵심_기능
자바_웹_개발자를_위한_c#_핵심_기능자바_웹_개발자를_위한_c#_핵심_기능
자바_웹_개발자를_위한_c#_핵심_기능Dexter Jung
 
게임 고객 사례를 통해 살펴보는 AWS 활용 전략 :: 이경안 :: AWS Summit Seoul 2016
게임 고객 사례를 통해 살펴보는 AWS 활용 전략 :: 이경안 :: AWS Summit Seoul 2016게임 고객 사례를 통해 살펴보는 AWS 활용 전략 :: 이경안 :: AWS Summit Seoul 2016
게임 고객 사례를 통해 살펴보는 AWS 활용 전략 :: 이경안 :: AWS Summit Seoul 2016Amazon Web Services Korea
 
React, Redux 실전 적용기
React, Redux 실전 적용기React, Redux 실전 적용기
React, Redux 실전 적용기은미 김
 
쇼핑검색 React 전환 경험 공유
쇼핑검색 React 전환 경험 공유쇼핑검색 React 전환 경험 공유
쇼핑검색 React 전환 경험 공유NAVER SHOPPING
 
Cloud-Barista 제4차 오픈 컨퍼런스 : CB-Spider / CB-Tumblebug : 멀티클라우드 인프라 서비스 (Multi-...
Cloud-Barista 제4차 오픈 컨퍼런스 : CB-Spider / CB-Tumblebug : 멀티클라우드 인프라 서비스 (Multi-...Cloud-Barista 제4차 오픈 컨퍼런스 : CB-Spider / CB-Tumblebug : 멀티클라우드 인프라 서비스 (Multi-...
Cloud-Barista 제4차 오픈 컨퍼런스 : CB-Spider / CB-Tumblebug : 멀티클라우드 인프라 서비스 (Multi-...Cloud-Barista Community
 

Similaire à 비동기 어플리케이션 모니터링과 밀당하기 (20)

Node.js in Flitto
Node.js in FlittoNode.js in Flitto
Node.js in Flitto
 
llvm 소개
llvm 소개llvm 소개
llvm 소개
 
Let'Swift 2023 Swift Macro, 어디다 쓰죠?
Let'Swift 2023 Swift Macro, 어디다 쓰죠?Let'Swift 2023 Swift Macro, 어디다 쓰죠?
Let'Swift 2023 Swift Macro, 어디다 쓰죠?
 
파크히어 Realm 사용 사례
파크히어 Realm 사용 사례파크히어 Realm 사용 사례
파크히어 Realm 사용 사례
 
[MASOCON 2019] Serverless - Kimminjun
[MASOCON 2019] Serverless - Kimminjun [MASOCON 2019] Serverless - Kimminjun
[MASOCON 2019] Serverless - Kimminjun
 
[236] 카카오의데이터파이프라인 윤도영
[236] 카카오의데이터파이프라인 윤도영[236] 카카오의데이터파이프라인 윤도영
[236] 카카오의데이터파이프라인 윤도영
 
The platform 2011
The platform 2011The platform 2011
The platform 2011
 
Kinesis / Lambda / EMR / Redshift 를 이용한 Big Data 분석 - 이상현 (빙글)
Kinesis / Lambda / EMR / Redshift 를 이용한 Big Data 분석 - 이상현 (빙글)Kinesis / Lambda / EMR / Redshift 를 이용한 Big Data 분석 - 이상현 (빙글)
Kinesis / Lambda / EMR / Redshift 를 이용한 Big Data 분석 - 이상현 (빙글)
 
카사 공개세미나1회 W.E.L.C.
카사 공개세미나1회  W.E.L.C.카사 공개세미나1회  W.E.L.C.
카사 공개세미나1회 W.E.L.C.
 
AWS 서버리스 신규 서비스 총정리 - 트랙2, Community Day 2018 re:Invent 특집
AWS 서버리스 신규 서비스 총정리 - 트랙2, Community Day 2018 re:Invent 특집AWS 서버리스 신규 서비스 총정리 - 트랙2, Community Day 2018 re:Invent 특집
AWS 서버리스 신규 서비스 총정리 - 트랙2, Community Day 2018 re:Invent 특집
 
Aws lambda 와 함께 서버리스 서비스 만들기
Aws lambda 와 함께 서버리스 서비스 만들기Aws lambda 와 함께 서버리스 서비스 만들기
Aws lambda 와 함께 서버리스 서비스 만들기
 
Feature Branch Branch Dev QA 환경 구성기
Feature Branch Branch Dev QA 환경 구성기Feature Branch Branch Dev QA 환경 구성기
Feature Branch Branch Dev QA 환경 구성기
 
자바_웹_개발자를_위한_c#_핵심_기능
자바_웹_개발자를_위한_c#_핵심_기능자바_웹_개발자를_위한_c#_핵심_기능
자바_웹_개발자를_위한_c#_핵심_기능
 
Spring boot DI
Spring boot DISpring boot DI
Spring boot DI
 
게임 고객 사례를 통해 살펴보는 AWS 활용 전략 :: 이경안 :: AWS Summit Seoul 2016
게임 고객 사례를 통해 살펴보는 AWS 활용 전략 :: 이경안 :: AWS Summit Seoul 2016게임 고객 사례를 통해 살펴보는 AWS 활용 전략 :: 이경안 :: AWS Summit Seoul 2016
게임 고객 사례를 통해 살펴보는 AWS 활용 전략 :: 이경안 :: AWS Summit Seoul 2016
 
Modern PHP
Modern PHPModern PHP
Modern PHP
 
React, Redux 실전 적용기
React, Redux 실전 적용기React, Redux 실전 적용기
React, Redux 실전 적용기
 
Showroom 2019-react
Showroom 2019-reactShowroom 2019-react
Showroom 2019-react
 
쇼핑검색 React 전환 경험 공유
쇼핑검색 React 전환 경험 공유쇼핑검색 React 전환 경험 공유
쇼핑검색 React 전환 경험 공유
 
Cloud-Barista 제4차 오픈 컨퍼런스 : CB-Spider / CB-Tumblebug : 멀티클라우드 인프라 서비스 (Multi-...
Cloud-Barista 제4차 오픈 컨퍼런스 : CB-Spider / CB-Tumblebug : 멀티클라우드 인프라 서비스 (Multi-...Cloud-Barista 제4차 오픈 컨퍼런스 : CB-Spider / CB-Tumblebug : 멀티클라우드 인프라 서비스 (Multi-...
Cloud-Barista 제4차 오픈 컨퍼런스 : CB-Spider / CB-Tumblebug : 멀티클라우드 인프라 서비스 (Multi-...
 

Dernier

공학 관점에서 바라본 JMP 머신러닝 최적화
공학 관점에서 바라본 JMP 머신러닝 최적화공학 관점에서 바라본 JMP 머신러닝 최적화
공학 관점에서 바라본 JMP 머신러닝 최적화JMP Korea
 
JMP를 활용한 전자/반도체 산업 Yield Enhancement Methodology
JMP를 활용한 전자/반도체 산업 Yield Enhancement MethodologyJMP를 활용한 전자/반도체 산업 Yield Enhancement Methodology
JMP를 활용한 전자/반도체 산업 Yield Enhancement MethodologyJMP Korea
 
실험 설계의 평가 방법: Custom Design을 중심으로 반응인자 최적화 및 Criteria 해석
실험 설계의 평가 방법: Custom Design을 중심으로 반응인자 최적화 및 Criteria 해석실험 설계의 평가 방법: Custom Design을 중심으로 반응인자 최적화 및 Criteria 해석
실험 설계의 평가 방법: Custom Design을 중심으로 반응인자 최적화 및 Criteria 해석JMP Korea
 
JMP를 활용한 가속열화 분석 사례
JMP를 활용한 가속열화 분석 사례JMP를 활용한 가속열화 분석 사례
JMP를 활용한 가속열화 분석 사례JMP Korea
 
JMP 기능의 확장 및 내재화의 핵심 JMP-Python 소개
JMP 기능의 확장 및 내재화의 핵심 JMP-Python 소개JMP 기능의 확장 및 내재화의 핵심 JMP-Python 소개
JMP 기능의 확장 및 내재화의 핵심 JMP-Python 소개JMP Korea
 
(독서광) 인간이 초대한 대형 참사 - 대형 참사가 일어날 때까지 사람들은 무엇을 하고 있었는가?
(독서광) 인간이 초대한 대형 참사 - 대형 참사가 일어날 때까지 사람들은 무엇을 하고 있었는가?(독서광) 인간이 초대한 대형 참사 - 대형 참사가 일어날 때까지 사람들은 무엇을 하고 있었는가?
(독서광) 인간이 초대한 대형 참사 - 대형 참사가 일어날 때까지 사람들은 무엇을 하고 있었는가?Jay Park
 
JMP가 걸어온 여정, 새로운 도약 JMP 18!
JMP가 걸어온 여정, 새로운 도약 JMP 18!JMP가 걸어온 여정, 새로운 도약 JMP 18!
JMP가 걸어온 여정, 새로운 도약 JMP 18!JMP Korea
 
데이터 분석 문제 해결을 위한 나의 JMP 활용법
데이터 분석 문제 해결을 위한 나의 JMP 활용법데이터 분석 문제 해결을 위한 나의 JMP 활용법
데이터 분석 문제 해결을 위한 나의 JMP 활용법JMP Korea
 

Dernier (8)

공학 관점에서 바라본 JMP 머신러닝 최적화
공학 관점에서 바라본 JMP 머신러닝 최적화공학 관점에서 바라본 JMP 머신러닝 최적화
공학 관점에서 바라본 JMP 머신러닝 최적화
 
JMP를 활용한 전자/반도체 산업 Yield Enhancement Methodology
JMP를 활용한 전자/반도체 산업 Yield Enhancement MethodologyJMP를 활용한 전자/반도체 산업 Yield Enhancement Methodology
JMP를 활용한 전자/반도체 산업 Yield Enhancement Methodology
 
실험 설계의 평가 방법: Custom Design을 중심으로 반응인자 최적화 및 Criteria 해석
실험 설계의 평가 방법: Custom Design을 중심으로 반응인자 최적화 및 Criteria 해석실험 설계의 평가 방법: Custom Design을 중심으로 반응인자 최적화 및 Criteria 해석
실험 설계의 평가 방법: Custom Design을 중심으로 반응인자 최적화 및 Criteria 해석
 
JMP를 활용한 가속열화 분석 사례
JMP를 활용한 가속열화 분석 사례JMP를 활용한 가속열화 분석 사례
JMP를 활용한 가속열화 분석 사례
 
JMP 기능의 확장 및 내재화의 핵심 JMP-Python 소개
JMP 기능의 확장 및 내재화의 핵심 JMP-Python 소개JMP 기능의 확장 및 내재화의 핵심 JMP-Python 소개
JMP 기능의 확장 및 내재화의 핵심 JMP-Python 소개
 
(독서광) 인간이 초대한 대형 참사 - 대형 참사가 일어날 때까지 사람들은 무엇을 하고 있었는가?
(독서광) 인간이 초대한 대형 참사 - 대형 참사가 일어날 때까지 사람들은 무엇을 하고 있었는가?(독서광) 인간이 초대한 대형 참사 - 대형 참사가 일어날 때까지 사람들은 무엇을 하고 있었는가?
(독서광) 인간이 초대한 대형 참사 - 대형 참사가 일어날 때까지 사람들은 무엇을 하고 있었는가?
 
JMP가 걸어온 여정, 새로운 도약 JMP 18!
JMP가 걸어온 여정, 새로운 도약 JMP 18!JMP가 걸어온 여정, 새로운 도약 JMP 18!
JMP가 걸어온 여정, 새로운 도약 JMP 18!
 
데이터 분석 문제 해결을 위한 나의 JMP 활용법
데이터 분석 문제 해결을 위한 나의 JMP 활용법데이터 분석 문제 해결을 위한 나의 JMP 활용법
데이터 분석 문제 해결을 위한 나의 JMP 활용법
 

비동기 어플리케이션 모니터링과 밀당하기

  • 1. SPRING CAMP 2017 Gunhee Lee SCOUTER commiter 비동기 어플리케이션과 모니터링으로 밀당하기 비동기 어플리케이션, 어떻게 모니터링 할 것인가? - 초초보 ver. -
  • 2. SPRING CAMP 2017 이건희 ­ 그분은 아닙니다. Line+ Programmer (& SNOW Corp.)
 Scouter APM commiter
 KOSSLab 3기 - 오픈소스프론티어 그래서 구글서 검색 안됨
  • 3. SPRING CAMP 2017 - 어플리케이션 모니터링과 APM - APM의 구현 원리 (BCI) - 모니터링을 위한 Context의 전파 (Servlet) - 비동기 어플리케이션 모니터링의 어려움 - 비동기 어플리케이션과 모니터링으로 밀당하기 이야기 할 것
  • 4. SPRING CAMP 2017 ?? CPU 응답시간 처리량 이건 뭐…
  • 5. SPRING CAMP 2017 ?? CPU 응답시간 처리량 이건 뭔가 좀 이상하다…
  • 6. SPRING CAMP 2017 시간에 따른 숫자들 - 성능메트릭 -> Visualization ??
  • 7. SPRING CAMP 2017 이것들은 결과일 뿐… ??
  • 8. SPRING CAMP 2017 원인을 모를때 우리는 이런 일 들을 하지요… ??
  • 9. SPRING CAMP 2017 RESTART ! ?? 다시 껏다 킨다!
  • 10. SPRING CAMP 2017 그럼 왜 ??? 원인이 뭐냐! ??
  • 11. SPRING CAMP 2017 Application performance management 성능 메트릭 + 원인을 찾기위한 𝛼 APM 이란?
  • 12. SPRING CAMP 2017 APM Active Service 응답시간 분포도 (XLog) Profile
  • 13. SPRING CAMP 2017 어떻게 성능 정보를 수집하는가? APM을 구현하는 기술 - cpu, memory - method 정보 - sql, bind 변수 - 구간별 수행시간 - api 호출 url, 응답시간 …
  • 14. SPRING CAMP 2017 BCI (Byte code instrumentation) - bytecode에 직접 변경을 가해
 소스코드의 수정없이 원하는 기능을
 삽입할 수 있는 방법 APM을 구현하는 기술 Super Power
  • 15. SPRING CAMP 2017 어렵지 않다. premain() 만 기억하자! BCI
  • 16. SPRING CAMP 2017 premain() - premain()은 main() 전에 수행된다. - 여기서 transformer를 통해 class 변경 BCI - Libraries - ASM, Javassist, cglib, bytebuddy …
  • 17. SPRING CAMP 2017 Thread name enhancer http-bio-7 : 뭔가 모자르다… 
 uri ??
 Start time ?? 특정 parameter? BCI 예제 HttpServerlet.service()
  • 18. SPRING CAMP 2017 Thread name enhancer https://github.com/gunlee01/thread-name-enhancer BCI 예제
  • 19. SPRING CAMP 2017 모니터링을 위한 application Trace Context
  • 20. SPRING CAMP 2017 Trace Context - cpu, memory - method 정보 - sql, bind 변수 - 구간별 수행시간 - api 호출 url, 응답시간 …
  • 21. SPRING CAMP 2017 methodA() { (시작시간); // <- BCI … 원래 코드 … … call methodB() (end시간-시작시간) // <- BCI } Method의 수행 시간 측정 methodB() { (시작시간); … 원래 코드 … (http call) (sql) (end시간-시작시간) } TraceContext
  • 22. SPRING CAMP 2017 Trace Context를 어떻게 전달할 것인가?
  • 23. SPRING CAMP 2017 Trace Context를 어떻게 전달할 것인가? static variable
  • 24. SPRING CAMP 2017 Trace Context를 어떻게 전달할 것인가? static variable
  • 25. SPRING CAMP 2017 Trace Context를 어떻게 전달할 것인가? - method의 파라미터로 전달
  • 26. SPRING CAMP 2017 Servlet Container Servlet Dispatcher Request Queue Thread Pool Request 요청에서 응답까지 Container가 관리하는 하나의 Thread로 동작
  • 27. SPRING CAMP 2017 ThreadLocal This class provides thread-local variables. 하나의 Thread에서 local 변수처럼
 접근할 수 있는 무언가가 필요하다 ! Refs : https://docs.oracle.com/javase/7/docs/api/java/lang/ThreadLocal.html
  • 28. SPRING CAMP 2017 ThreadLocal This class provides thread-local variables. ref: http://javacan.tistory.com/entry/ThreadLocalUsage
  • 29. SPRING CAMP 2017 Simple ThreadLocal
  • 30. SPRING CAMP 2017 ThreadLocal 의 활용 - Security Context - Transaction context - MDC (logging framework)
  • 31. SPRING CAMP 2017 비동기 어플리케이션과 모니터링으로 밀당하기
  • 32. SPRING CAMP 2017 Blocking Multi-thread
 Servlet application의 문제점 ?? - Thread per request : Blocking에 의한 Long running thread
 : 과도한 Thread 사용 (context switching)
 : thread pool 고갈로 인한 문제, cascading failure
  • 33. SPRING CAMP 2017 Blocking Multi-thread
 Servlet application의 문제점 ?? - Thread per request : Blocking에 의한 Long running thread
 : 과도한 Thread 사용 (context switching)
 : thread pool 고갈로 인한 문제, cascading failure 그렇다면 장점은?
  • 34. SPRING CAMP 2017 Blocking Multi-thread
 Servlet application의 장점 - 이해하고 디버깅 하기 쉽다.
 Thread가 하나의 작업을 처리
 Stack은 처리에 대한 정확한 Snapshot (threaddump)
 XXXContext의 전달이 쉽다
  • 35. SPRING CAMP 2017 blocking Servlet application의 장점 쉽고 단순하다.
  • 36. SPRING CAMP 2017 blocking Servlet application의 장점 비동기 메소드 호출시
  • 37. SPRING CAMP 2017 blocking Servlet application의 장점 Non bloking IO 라면 흔적도 없다. ㅠㅠ
  • 38. SPRING CAMP 2017 비동기 시스템 장점이 대단하게 들리겠지만 위 혜택은 운영 비용이 발생합니다. 블록킹 시스템은 이해하고 디버깅하기 쉽고… 쓰레드의 스택은 요청 또는 생성된 작업의 처리 과정에 대한 정확한 스냇샵이 됩니다… 반대로 비동기는 … 이벤트 반복의 스택 트레이스에서는 요청을 따라서 추적하는 것이 아무런 도움이 되지 않습니다. 이벤트와 콜백이 처리될 때 요청을 따라가기가 어렵고, 이러 한 문제를 디버깅하도록 지원하는 도구는 매우 부족합니다. Netflix tech blog
  • 39. SPRING CAMP 2017 전반적으로 아키텍처 변경으로 얻을 수 있는 가치는 높았습니다. 커넥션 규모를 늘릴 수 있다 점이 중요한 혜택이었지만 비용이 많이 들었습니다. 우리는 디버깅하고, 개발하고, 테스트하기 훨씬 더 복잡한 시스템을 보유하고 있으며… Netflix tech blog
  • 40. SPRING CAMP 2017 Netflix tech blog http://techblog.netflix.com/2016/09/zuul-2-netflix-journey-to-asynchronous.html http://chanwookpark.github.io/reactive/netflix/zuul/async/non-blocking/2016/11/21/ zuul2-netflixjourney-to-asynchronous-non-blocking-systems/
  • 41. SPRING CAMP 2017 비동기 application 모니터링의 목표 ! 비동기이던 non-blockign이던 기존 어플리케이션 모니터링에서 제공하던 동일한(혹은 유사한) View로 볼수 있게 하는 것.
  • 42. SPRING CAMP 2017 Servlet Thread #n 비동기 Servlet (Servlet 3.0+) Servlet
 Thread #m Worker Thread #n Request::
 StartAsync() AsyncContext::
 start(Runnable) RunnableDispatch Request Response
  • 43. SPRING CAMP 2017 비동기 처리 another thread #1 another thread #2 another thread #3
  • 44. SPRING CAMP 2017 이제는 ThreadLocal을 통해 Context를 전파할 수 없다 !!
  • 45. SPRING CAMP 2017 Good ! InheritableThreadLocal This class extends ThreadLocal to provide inheritance of values from parent thread to child thread. When a child thread is created, the child receives initial values … Refs : https://docs.oracle.com/javase/7/docs/api/java/lang/InheritableThreadLocal.html
  • 48. SPRING CAMP 2017 Logback manual # MDC A copy of the mapped diagnostic context 
 can not always be inherited by worker threads from the initiating thread. This is the case when java.util.concurrent.Executors is used for thread management. … creates a ThreadPoolExecutor and like other thread pooling code, it has intricate thread creation logic. In such cases, … MDC.getCopyOfContextMap() is invoked on the original (master) thread before submitting a task to the executor. … When the task runs, as its first action, it should invoke MDC.setContextMapValues() to associate … Refs : https://logback.qos.ch/manual/mdc.html#managedThreads
  • 49. SPRING CAMP 2017 Logback manual# MDC thread #1 thread #2 Map ctx = MDC.getCopyOfContextMap() MDC .setContextMap(ctx)
  • 50. SPRING CAMP 2017 Logback manual# MDC 결국. 니 알아서 전달해라.
  • 51. SPRING CAMP 2017 밀당의 시작 #1 알아서 전달하기
  • 52. SPRING CAMP 2017 Parameter를 활용해 Context 전달하기 scouter APM 에 가장 먼저 제공된 기능
  • 53. SPRING CAMP 2017 Parameter를 활용해 Context 전달하기
  • 54. SPRING CAMP 2017 Parameter를 활용해 Context 전달하기
  • 55. SPRING CAMP 2017 Parameter를 활용해 Context 전달하기 전달할 조건을 직접 설정
  • 57. SPRING CAMP 2017 Runnable & Callable 결국 Runnable 또는 Callable !!!
  • 59. SPRING CAMP 2017 Runnable & Callable 실제로는 익명 Inner class가 생긴다.
  • 62. SPRING CAMP 2017 Runnable & Callable thread #1 thread #2
  • 63. SPRING CAMP 2017 Good ~~ ! 한방에 해결
  • 64. SPRING CAMP 2017 (아직도 진행 중인) 끝나지 않은 밀당 #3 Lambda expression
  • 65. SPRING CAMP 2017 Lambda expression 얘는 또 어쩔…
  • 66. SPRING CAMP 2017 Lambda expression 얘는 또 어쩔…
  • 67. SPRING CAMP 2017 Lambda expression 앞에서 Runnable을 통해 전달할때와 똑같이 해보자. (1) 생성자에서 this를 key로 ctx 저장 (2) run() 에서 this로 ctx를 겟!
  • 68. SPRING CAMP 2017 Lambda expression 이 두가지는 같은 것인가?
  • 69. SPRING CAMP 2017 Lambda expression anonymous inner class != lambda expression
  • 70. SPRING CAMP 2017 Lambda expression 그렇다면 Lambda 식은 inner class 가 아닌가? yes 인데 그냥 yes는 아니고…
  • 71. SPRING CAMP 2017 Lambda expression 그렇다면 Lambda 식은 inner class 가 아닌가? Lambda body는 inner class가 아니다. Lambda body는 내부적으로 생성되는 inner class를 통해
 실행된다. (Lambda proxy) 하지만 일반적인 inner class 와는 생성과정이 다르다.
  • 72. SPRING CAMP 2017 Lambda expression desugar Lambda의 body는 private (static) method가 된다.
  • 73. SPRING CAMP 2017 Lambda expression 따라서 Lambda body에서의 this 는 lambda식이 있는 class의 인스턴스이다.
  • 74. SPRING CAMP 2017 Lambda expression ?? ??
  • 77. SPRING CAMP 2017 Lambda expression * 최초 실행시 bootstraping
 —> LambdaMetafacoty::metafactory() (1) Functional I/F를 구현하는 Innerclass 동적 생성 (ASM으로) - Lambda Proxy (2) Innerclass의 instance를 반환하는 factory Method
 에 대한 methodHandle(CallSite) 반환
  • 79. SPRING CAMP 2017 Lambda expression 생성할때 this로 ctx 전파 Run에서 this로 ctx 겟!
  • 80. SPRING CAMP 2017 Lambda 정복 LambdaMetafacoty에서 Innerclass 생성시에 BCI로 적용하면 모든것이 한방에 끝난다. !!
  • 81. SPRING CAMP 2017 Lambda ?? 그런데 ??? Classfile Transformer를 걸어도 transform()에 전달되지가 않는다…
  • 82. SPRING CAMP 2017 Lambda ?? 고난의 시작 … 구글신께 물어봐도 별다른 답이 없고…
  • 83. SPRING CAMP 2017 Lambda ?? 원인은 바로 이것
  • 84. SPRING CAMP 2017 Lambda ?? 원인은 바로 이것 anonymous class loader에 의해 class loading -> anonymous-in-VM-sence class -> target class의 보안 수준 계승 (private 접근 가능)
  • 85. SPRING CAMP 2017 Lambda ?? Anonymous class loader에 의해 로드된 클래스는 classfiletransformer를 경유하지 않으므로 transform 할수 없다 !!!
  • 86. SPRING CAMP 2017 Lambda ?? 용자의 등장 !
  • 87. SPRING CAMP 2017 Lambda ?? Rafael Winterhalter http://rafael.codes/
  • 88. SPRING CAMP 2017 Bytebuddy Rafael Winterhalter - Bytebuddy의 author http://bytebuddy.net - code generation and manipulation library 
 ( Mockito, Hibernate …)
  • 89. SPRING CAMP 2017 Bytebuddy Rafael Winterhalter - Lambdametafacoty 에서 생성하는
 Innerclass 를 일반 class 처럼
 transform() 할수 있게 해줘! - Open JDK groups 를 통해 의견 교환
 http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-January/038199.html
  • 90. SPRING CAMP 2017 Bytebuddy - 해줘 ! - 왜 안돼? - 안돼 ! - 람다는 람다야. 이 구현은 바뀔거야.
 지금은 방법이 없어서 걍 일케 한거야. - 좀 더 멋지게 바뀔거라구. (언젠가는 …) - using a vm anonymous class is a workaround of the fact that there is currently no way to load a function/method without a class.
  • 91. SPRING CAMP 2017 Bytebuddy - 넌 현실을 참 모르는구나!
 Real world에선 필요하다구. - 자꾸 그럼 내가 만든다! - 안돼 ! 이걸로 뭘 하려고 하지마.
 (왜 필요한지도 잘 모르겠구…) - 증말 하지마.
 JVM의 구현이 바뀌면
 다 쓸모 없어 진다구 …
  • 93. SPRING CAMP 2017 Lambda class transform 해보니 잘된다 !
  • 94. SPRING CAMP 2017 Lambda class transform scouter v0.5.0에 적용 릴리즈
  • 95. SPRING CAMP 2017 Lambda class transform 갑자기 밀려드는 버그 리포팅
  • 96. SPRING CAMP 2017 Lambda class transform Functional I/F가 Supplier인 경우
  • 97. SPRING CAMP 2017 결국 No one-size-fits-all strategy
  • 98. SPRING CAMP 2017 비동기 어플리케이션 모니터링 아직 할 수 있는 방법은 많다.
  • 99. SPRING CAMP 2017 할 수 있는 것 잘 알려진 F/W, Library의 메커니즘들에 적용 Executor의 execute(), submit() AsyncExecutionAspectSupport.doSubmit() …
  • 100. SPRING CAMP 2017 할 수 있는 것 믿고 쓰는 Spring - Spring-web-reactive 에서도 SecurityContext 등을 
 F/W 수준에서 전파하는 방법을 제공할 것 - 그 방식을 그대로 사용
  • 101. SPRING CAMP 2017 밀당은 계속된다 !
  • 102. SPRING CAMP 2017 하고 싶은 것 비동기 어플리케이션을 (& Non blocking) 쉽게 추적하고 모니터링 할 수 있게 만들기
  • 103. SPRING CAMP 2017 SCOUTER에 참여하기 Github https://github.com/scouter-project/scouter Facebook 사용자 모임 https://www.facebook.com/groups/scouterapm