• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Liutauras Vilda
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Piet Souris

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

 
Greenhorn
Posts: 22
Scala IntelliJ IDE Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic