Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R2DBC support #456

Open
NorbertSandor opened this issue Dec 26, 2018 · 39 comments
Open

R2DBC support #456

NorbertSandor opened this issue Dec 26, 2018 · 39 comments
Assignees

Comments

@NorbertSandor
Copy link

NorbertSandor commented Dec 26, 2018

Please make it possible to use https://github.com/r2dbc/r2dbc-client

@NorbertSandor
Copy link
Author

NorbertSandor commented Jan 19, 2019

A pluggable low-level database access layer would be even more better. It would be possible to support more "special" non-standard implementations like https://github.com/reactiverse/reactive-pg-client

@mp911de
Copy link

mp911de commented May 18, 2019

R2DBC support is built best on top of R2DBC SPI directly and not on R2DBC Client. R2DBC is for reactive programming what JDBC is for imperative programming. R2DBC can easily wrap less-capable asynchronous/non-blocking SQL database drivers exposing their functionality through a standardized SPI.

Javadoc: https://r2dbc.io/spec/0.8.0.M8/api/

@sollecitom
Copy link

Is this in progress? Would love to use Exposed if this was in.

@ivseb
Copy link

ivseb commented May 14, 2020

Any news? :)

@taylancapraz
Copy link

taylancapraz commented Jun 1, 2020

Are there any plan on this?

@gytis-ivaskevicius
Copy link

Alright its my time to shine. Ahem.

Any news on this?

@Tapac
Copy link
Contributor

Tapac commented Aug 21, 2020

Hi everyone, I have a prove of concept implementation of RDBC driver support, BUT!
RDBC api doesn't provide any methods to obtain database metadata like listing of database tables.

Right now I had decided to add ability to provide optional JDBC connection as a Database.connect parameter if you'd like to use some DDL.

It means that all DML operations will be handled by RDBC driver and all other with JDBC.

What do you think about it?

@gytis-ivaskevicius
Copy link

Brilliant news!!!

But here are a couple of things:

  1. Is metadata really necessary? If it is bearly used maybe it could be ignored or reimplemented? Probably tomorrow will check out how Exposed works more in detail. I kinda got curious
  2. Another option would be to manually implement it by executing a couple of database specific queries to retrieve required metadata. This would require more work but I feel like it is a better solution

@Tapac
Copy link
Contributor

Tapac commented Aug 21, 2020

@WithoutCaps ,

  1. It could be ignored if you do not want to make any DDL queries and just work with existing schema (or manage it with something like Flyway or Liquibase`. That's why I made it optional to provide jdbc connection.

  2. Yep, I started with that apprach, but finished at the time I dig into H2 queries (inside H2 jdbc driver) for fetching column names of tables. As Exposed supports a lot of DBMS I can't spend so much time to support all of them also in that place.
    Jdbc drivers usually supported by database developers and they know when they should fix a query for a new DB version or how to optimize them. I don't :)

@jvisker
Copy link

jvisker commented Aug 23, 2020

@Tapac Are you planning on having people try out the proof of concept?

@Tapac
Copy link
Contributor

Tapac commented Aug 23, 2020

@jvisker , yep. Have to add some tests and add documentation on how to use it. Hopefully I'll release it on the next week.

@jvisker
Copy link

jvisker commented Sep 4, 2020

Did I miss this release somehow?

@Tapac
Copy link
Contributor

Tapac commented Sep 4, 2020

Nope, I just stuck with fixing all current tests with R2DBC driver. The tests with savepoints still fail, so I can't release it right now.

@peterfigure
Copy link

hi @Tapac - any news here?

@dondish
Copy link

dondish commented Nov 10, 2020

Any updates?

@cantaylancapraz
Copy link

Is there an estimated completion date for this issue?

@cantaylancapraz
Copy link

Hi @Tapac

There is no update on this issue for a long time. Last information that we get about progress was in August 2020.

Could you please tell us whether this issue still on development or not?
Or has it been postponed to the future?

@Tapac
Copy link
Contributor

Tapac commented Sep 16, 2021

The work in progress, you can check rdbc-poc branch and try to build it localy.
R2DBC connecion will require also jdbc connection for operations with Schemas as R2DBC doesn't provide any api for extracting metadata. The example of how to connect with R2DBC can be found in tests

@sobvan
Copy link

sobvan commented Feb 1, 2022

The work in progress, you can check rdbc-poc branch and try to build it localy.
R2DBC connecion will require also jdbc connection for operations with Schemas as R2DBC doesn't provide any api for extracting metadata. The example of how to connect with R2DBC can be found in tests

Nice work @Tapac! When do you think this can be considered production ready? I am asking for Postgres specifically.

@cantaylancapraz
Copy link

The last commit seems to be 9 months ago. For this reason, I guess that this task will not be released in the near future, and its development is not continuing at the moment.

I wish there was an estimated time.

@rustamch
Copy link

The work in progress, you can check rdbc-poc branch and try to build it localy. R2DBC connecion will require also jdbc connection for operations with Schemas as R2DBC doesn't provide any api for extracting metadata. The example of how to connect with R2DBC can be found in tests

What needs to be done for this to be production ready?

@FatalCatharsis
Copy link

Not involved with the R2DBC project at all, but it looks like the R2DBC guys are waiting for expressed interest before implementing a DB introspection mechanism. For people that want to see this happen, I suggest upvoting r2dbc/r2dbc-spi#203 .

@Tapac In the interim, would you accept a PR if someone continued the work of doing DB specific introspection for the places where it's needed or were you intending to resume this effort sooner than later?

@Tapac
Copy link
Contributor

Tapac commented Jul 28, 2022

For now now I have uncompleted branch with R2DBC support with JDBC used for data introspection.

After recent updates in R2DBC API with tests doesn't pass and I'm not have enough time to debug the problem.
I hope to finish the branch till the end of summer and maybe release it as an experimental module to get feedback.

@FatalCatharsis
Copy link

No problem, this is more of a wishlist item than a core feature I'd say and it's initial implementation will still be a blocking implementation that has to live in it's own threads for the time being. I took a stab at trying to update the framework to use suspend calls throughout but that is gonna be a downright massive effort. There are many places where properties are delegated by lazy to blocking calls and those would have to all be changed to suspend functions like from the metadata calls on Database. Lots and lots of refactoring. You also have the issue that converting much of the framework to suspend invocations will make it backwards incompatible.

If you have a plan though and can think of a way to break it down into individual efforts, I and others might have time to help you convert portions of it all to suspendable invocations so that eventually the framework is suspendable enough to share main worker threads in reactive frameworks like ktor and vertx.

@aaronbond
Copy link

any updates?

@ghost
Copy link

ghost commented Oct 7, 2022

any updates?

I got a wife and 2 beautiful children

@gytis-ivaskevicius
Copy link

Code before family! 🥺 ❤️

@cantaylancapraz
Copy link

cantaylancapraz commented Dec 5, 2022

Is there an estimated completion time of this issue?

I apologize for asking this so many times. but we are at the point of switching to alternative solutions, even though I am very satisfied with exposed.

@kampka
Copy link

kampka commented Jan 25, 2023

Hi @Tapac
thanks for all your work that already went into this. If you find the time, could you possibly add a checklist of things left to do to get your branch through the door? Maybe we can crowd source the remaining effort.

@micheljung
Copy link
Contributor

@Tapac asking again

@micheljung
Copy link
Contributor

For me, this is - unfortunately - a reason to say goodbye to Exposed in favor of jOOQ which comes with coroutine support

@ghost
Copy link

ghost commented Mar 13, 2023

For me, this is - unfortunately - a reason to say goodbye to Exposed in favor of jOOQ which comes with coroutine support

I encourage you and everyone else to give vertx.io a try; it is the best thing that JVM ecosystem has to offer.

@raharrison
Copy link

https://github.com/komapper/komapper is another alternative that is quite similar to Exposed to use and comes with both JDBC and R2DBC support

@Intex32
Copy link

Intex32 commented Mar 14, 2023

As JetBrains recently had a job posting for Exposed, I still haven't lost all my hope that this project will be resurrected and features like this finally tackled. Might take another two years though...

@cantaylancapraz
Copy link

cantaylancapraz commented Dec 27, 2023

Happy 5th birthday to this issue 🎉

@hohohokekeke
Copy link

Recently, is this issue working on? I can't wait any more.
Should I find other library for using r2dbc?

@dobe
Copy link

dobe commented Jul 4, 2024

Should I find other library for using r2dbc?

we use jooq, which works fine with r2dbc

@tcrawford-figure
Copy link

@hohohokekeke According to their most recent talk on Exploring the Exposed Library A Kotlin Solution to Database Access | Chantal Loncle, yes, this is in progress and part of the 2024 roadmap (but I assume that doesn't necessarily mean it will be released this year, just that it's in progress).

@chrisihoby-dev
Copy link

Should I find other library for using r2dbc?

we use jooq, which works fine with r2dbc

Kotysa is also a good alternative

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests