Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This was for a future completely message driven solution (for now we start with a REST request that will generate an async message eventually. In future we could also send a message that will trigger the same.


Webflux Investigation

...


What is Webflux?

Spring WebFlux is a web framework that’s built on top of Project Reactor, to give you asynchronous I/O, and allow your application to perform better. 

Reactive web programming is great for applications that have streaming data, and clients that consume it and stream it to their users. It ain’t great for developing CRUD apps. If you want to develop a CRUD API, stick with Spring MVC.

Sounrce: https://developer.okta.com/blog/2018/09/24/reactive-apis-with-spring-webflux


The original web framework included in the Spring Framework, Spring Web MVC, was purpose-built for the Servlet API and Servlet containers. The reactive-stack web framework, Spring WebFlux, was added later in version 5.0. It is fully non-blocking, supports Reactive Streams back pressure, and runs on such servers as Netty, Undertow, and Servlet 3.1+ containers.

https://docs.spring.io/spring-framework/docs/current/reference/html/web-reactive.html


Webflux supports:

  • Annotation-based reactive components
  • Functional routing and handling


Pros & cons


ProsCons
  • Better scalability due to non blocking threads
  • Use less threads (1 per core)
  • Better COU Efficiency
  • b


Links to materials

https://www.baeldung.com/spring-webflux

https://www.youtube.com/watch?v=1F10gr2pbvQ


Kafka Strimzi Investigation

...

This is necessary as the client will need to connect to Kafka to consume async responses.


draw.io Diagram
bordertrue
diagramNameCopy of CPS-821
simpleViewerfalse
width1000
linksauto
tbstyletop
diagramDisplayNameProposed Design
lboxtrue
diagramWidth1201
revision1