ydb-platform / ydb-java-sdk

YDB Java SDK
https://ydb.tech
Apache License 2.0
36 stars 15 forks source link

R2DBC driver #72

Open KirillKurdyukov opened 1 year ago

KirillKurdyukov commented 1 year ago

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.
  2. 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.
  3. 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
  4. Testing

  5. Documentation.

  6. 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 commented 5 months ago

Student: @Kuleshovegor

Kuleshovegor commented 5 months ago

Kuleshov Egor from ITMO University

KirillKurdyukov commented 5 months ago

https://github.com/ydb-platform/ydb-r2dbc-driver/issues/1