Spring boot reactive (Webflux) with MySql Spring boot reactive (Webflux) with MySql spring spring

Spring boot reactive (Webflux) with MySql


Actually there isn't any reactive support for relational database. But not for long time since the Spring Data team is working on R2DBC, which will provide the ability to access data reactively from a relational database. Stay tuned here: https://github.com/r2dbc

EDIT

The first release is out, see here for more details: https://github.com/r2dbc/r2dbc-postgresql/tags


No there is no reactive driver for MySQl. There is one for Postgres:

https://github.com/r2dbc/r2dbc-client

it uses all the reactive bits from project rector (collections are return as flux). Of Course you are back to working with prepared statements. And pulling data directly from the Serch reasult.

And the one for the oracle DB:

https://github.com/oracle/oracle-db-examples/tree/master/java/AoJ

But it uses a blocking JDBC calls and only hides the problem of behind thread pool. However it represent the current effort at Oracle to attack the problem. And it is not a trivial thing as there is a certain philosophy when working with relational databases of consistent state. That is why your query result is return all at once unlike mongodb that can return result as it comes in.

Because of that any ORM (hibernate, eclipselink) tooling is nowhere.I think for production code we are stuck with blocking calls for now.