Search code examples
javar2dbc

Is R2DBC only for Java applications?


Is the R2DBC specification only for Java applications? Because I only find Java examples on the Internet.

And what about the thread-per-request problem? Doesn't this exist in other programming languages?


Solution

  • Is R2DBC-specification only for Java applications?

    R2DBC is implemented in Java, which means it can be used in Java as well as other JVM languages, such as kotlin, scala, etc.

    and what about thread-per-request problem? Doesn't this exist in other programming languages?

    Assuming you are talking about the benefits of going non-blocking also with database interactions, the problem is independent of the language / platform you're working on, so yes, this also exists elsewhere.

    But just like JDBC is a Java-only API for blocking database interaction, R2DBC is a Java-only API for non-blocking (reactive, specifically) database interaction.

    Both can be used in Java, kotlin, scala, etc., i.e. on the JVM only.