cloud-sql-jdbc-socket-factory icon indicating copy to clipboard operation
cloud-sql-jdbc-socket-factory copied to clipboard

Support jasync-r2dbc-mysql driver

Open davin111 opened this issue 1 year ago • 4 comments

Feature Description

Currently for r2dbc mysql, the dev.miku should be used. However, because the repository have not been maintained for quite long time and the driver is not compatible with the version 1 of r2dbc.spi (and so spring boot 3), Spring Boot removed it from its release and r2dbc.io also acknowledged it. Users of r2dbc mysql have moved to jasync-r2dbc-mysql or r2dbc-mariadb, etc. I saw the issue #990, but I think supporting jasync-r2dbc-mysql is also valuable. Could you consider it?

Sample code

No response

Alternatives Considered

No response

Additional Details

No response

davin111 avatar Apr 18 '23 02:04 davin111

@davin111 Does https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/pull/1264 address any of the concerns here?

enocom avatar Apr 25 '23 16:04 enocom

We can treat this issue as a feature request for jasync-r2dbc-mysql.

#1264 unblocked Spring Boot 3 support meanwhile.

enocom avatar Apr 25 '23 16:04 enocom

Based on my understanding, in order to use jasync-r2dbc-mysql or any other r2dbc driver, this library would need to acquire the ConnectionFactoryProvider through java spi rather than directly using that of a specific driver. However, since this library seems to rely on r2dbc-mysql's ssl tunneling functionalities, which are not supported by r2dbc-spi, it seems impossible to implement at the moment.

One potential solution could be to support certain drivers by checking for their existence one-by-one, as demonstrated in this example. However, this would only allow us to support drivers with ssl tunneling functionality.

Please note that I may be mistaken about certain aspects, so please feel free to correct me if necessary.

mscheong01 avatar Apr 26 '23 01:04 mscheong01

If Spring Boot 3 is the driving concern, I think we've fixed that with #1264.

Are there other reasons to support jasync-r2dbc-mysql (or postgres)?

enocom avatar Apr 26 '23 15:04 enocom