Why does Spring not provide reactive (non-blocking) clients for relational databases?

前端 未结 2 1302
予麋鹿
予麋鹿 2021-01-31 21:04

I\'ve used Vert.x toolkit for creating reactive applications with support for relational DBs like MySQL and Postgres. I know Spring provides reactive support for some NoSQL DBs

2条回答
  •  后悔当初
    2021-01-31 21:41

    Spring WebFlux is a great way to create a non-blocking REST application. One issue that you run into when start working with WebFlux is JDBC, because JDBC is blocking. New school databases like Cassandra or Couchbase have non-blocking drivers. In Couchbase’s case its driver uses RXJava. There is some effort going into creating asynchronous drivers for databases, as well as Oracle’s effort to create ADBA. Unfortunately, these are early days, and if you want to talk to a SQL database on the JVM you’re stuck with a blocking driver.
    Actually, Spring is not responsible for providing a none blocking driver for relational databases.

提交回复
热议问题