• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

REST API: Limitations of Spring WebFlux + Spring Data JPA?

 
Greenhorn
Posts: 22
Scala IntelliJ IDE Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Almost every Spring WebFlux example out there is leveraging Spring Data MongoDB to build Reactive end to end solutions.

As I understand it, JDBC is inherently a blocking API and we'll not be getting reactive support for relational databases any time soon. Leveraging Spring JPA async queries and dedicated thread pools can potentially improve things but it is not a replacement for real Reactive support.

My question is. Ate there known limitations when using Spring WebFlux with a "blocking" persistence layer such as a Spring Data JPA? Would it even make sense to build a Reactive REST API on top of a traditional blocking persistence layer (in terms os scalability)?
 
author
Posts: 469
20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anthony,

It's true that currently we don't have JDBC drivers that provide reactive access to the databases. There are no limitations with using Spring WebFlux with a blocking data acess layer, at the same time, there are no tangible advantages either.

regards
Ashish
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want all the benefits of reactive, async / non-blocking, you'll need to make the whole stack async / non-blocking. JDBC is indeed inherently a blocking API, so you can't build a fully reactive / non-blocking app if you need to access the database through JDBC.

Oracle seems to be working on a new, async / non-blocking database API, which is (provisionally) called ADBA, but there's not a lot of information on it available yet. It will probably take a few years before it's available. Besides the API itself, database vendors will also need to implement non-blocking drivers.
 
A day job? In an office? My worst nightmare! Comfort me tiny ad!
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic