1

I started to learning spring 5 features and I decided to start from spring webflux

I've read https://www.baeldung.com/spring-5-functional-web

I repeated that example but I didn't catch the benefits of this approach. As I understood the root benefit somehow related with 2 things:

  1. Reactive datasource (I was not able to understand what does it mean yet)
  2. Async request handling and automatic backpressure handling.

But I still don't have full picture in my mind. What the main aim of this idea ?

gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
  • Imagine three tiers architecture like MVC: we have frontend, backend and database. When we have reactive programming approach, we could use RxJs in frontend, some asynchronous technology at backend (asynico, nio, actors and etc) but all that staff useless, if our database driver is synchronous and uses blocking. And here we have Spring's Web Flux - all tiers reactive approach. – BSeitkazin Jun 04 '19 at 09:43
  • 1
    @BSeitkazin It is still unclear for me. Which problem can solve async driver? – gstackoverflow Jun 04 '19 at 11:38
  • if driver is synchronous, all other async stack waits it, and becomes synchronous. so, to avoid it, we also need async db driver, after-that we will get truly reactive architecture. about benefits of reactive approach you could read from duplicate link. – BSeitkazin Jun 04 '19 at 17:09
  • @BSeitkazin looks like I misunderstand smth. Could you explain why "something" becomes async ? – gstackoverflow Jun 04 '19 at 18:55
  • look here - https://blog.couchbase.com/why-you-should-care-about-reactive-database-access/ – BSeitkazin Jun 05 '19 at 03:45

0 Answers0