프로그래밍
Reactive Programming
gthoya
2019. 3. 20. 08:55
Reactive Programming
용도
- 비동기(asyncronous), 이벤트 기반(event-driven), 논블럭킹(non-blocking) 어플리케이션
- 수직적 확장(scale up) 보다는 수평적 확장(scale out)에 적합
- 배압(backpressure) 컨셉 : producers가 consumers를 넘어서지 못하게 하는 것
- MSA가 지향하는 방향
2가지 개발방식 지원
- 기존의 MVC 방식(@Controller, @RequestMapping),
- 새로운 함수형 모델(RouterFunction, HandleFunction)
새로운 요청 응답 모델
- 서블릿 스택과 API에서 탈피(서블릿 API는 리액티브 함수형 모델에 적합하지 않음 - HttpServletRequest, HttpServletResponse)
- ServerRequest, ServerResponse
지원 웹서버 / 컨테이너
- Servlet 3.1 +
- Netty, Undertow (비동기-논블럭킹 IO 웹서버)
[참조]
https://hojak99.tistory.com/453
https://kimseunghyun76.tistory.com/448
http://eyeahs.github.io/rxjava/blog/2016/10/11/rxjava-wiki-backpressure/