ydb-java-sdk icon indicating copy to clipboard operation
ydb-java-sdk copied to clipboard

R2DBC driver

Open KirillKurdyukov opened this issue 1 year ago • 3 comments

R2DBC (Reactive Relational Database Connectivity) is a reactive API specification for SQL databases. It provides a non-blocking and reactive way to interact with relational databases.

https://r2dbc.io

Roadmap below:

  1. Research and understand the database dialect
  1. SQL syntax
  2. YDB Data types map to Java Types, implement io.r2dbc.spi.Type
  3. other language-specific features YQL
  1. Study R2DBC specification. Existing dialect implementations.
  1. PostgreSQL R2DBC - https://github.com/pgjdbc/r2dbc-postgresql. The perfect solution from the founders of R2DBC.
  2. Clickhouse R2DBC - https://github.com/ClickHouse/clickhouse-java/tree/main/clickhouse-r2dbc. Community implementation. Don't support transactions, and more features.
  1. Design the architecture
  1. The driver implementation will be built using the YDB Java SDK v2.
  2. Connection != YDB Session. Because the connection is active until the close method is called. Connection have next state - InTransaction, OutTransaction, Close.
  1. Implement the core API - R2DBC SPI
  1. io.r2dbc.spi.ConnectionFactory
  2. io.r2dbc.spi.ConnectionFactoryMetadata
  3. io.r2dbc.spi.ConnectionFactoryProvider
  4. io.r2dbc.spi.Result
  5. io.r2dbc.spi.Row
  6. io.r2dbc.spi.RowMetadata
  7. io.r2dbc.spi.Batch
  8. io.r2dbc.spi.Connection
  9. io.r2dbc.spi.Statement
  1. Testing

  2. Documentation.

  3. Release candidate.

Document the usage, configuration options, and any database-specific features of YDB R2DBC driver to help users and developers understand how to use it effectively.

KirillKurdyukov avatar Mar 27 '23 11:03 KirillKurdyukov