Programming/Java

spring5의 Reactive 프로그래밍 모델

armyost 2022. 7. 14. 18:06
728x90

어느분께서 알려주셔서 찾아보았다. 

 

리액티브 프로그래밍 모델 이란?

Keyword : 반응형(이벤트Driven), 비동기(Non-Blocking), BackPressure(안전장치)

 

반응형 : 리액티브로 짜여진 어플리케이션은 탄력적으로 worker thread가 반응할 뿐만아니라 worker thread가 레거시 방식보다 더많이 늘어날 수 있다. 이는 각 worker thread가 상호의존성이 없어 tied up하지 않기 때문이다. 마치 Nginx와 Apache의 아키텍처 차이와 같은 느낌.. 

 

 

비동기 : Thread A가 Thread B를 참조할 경우 Thread A는 Thread B의 Return을 대기하지 않는다. Thread는 각자 자기 할일을 하는것

 

BackPressure : Message(Command)가 생성(Produce)되는 양이 처리(Consumer)되는 양을 압도하여 LAG이 발생하지 않도록 Message(Command) 수신량을 조절하는것. 고가용성을 담보하기 위함

 

https://stackify.com/reactive-spring-5/

 

Doing Reactive Programming with Spring 5

Reactive programming is a powerful tool to build your systems and the Spring 5 implementation will set the direction of Java web applications going forward.

stackify.com