MariaDB Connector/R2DBC

Overview

Java developers can use MariaDB Connector/R2DBC to connect to MariaDB Enterprise using the Reactive Relational Database Connectivity (R2DBC) API. R2DBC operations are non-blocking, which makes the R2DBC API more scalable than Java's standard JDBC API. MariaDB Connector/R2DBC is available both with a native R2DBC implementation and the Spring Data R2DBC framework

Connector

MariaDB Connector/R2DBC

Supported Versions

1.0

Programming Language

Java

Programming Language Version

Java 8+

API

R2DBC 0.8.5

Supports TLS

Yes

Supports Connection Pools

Yes

License

Apache 2.0

Compatibility

MariaDB Connector/R2DBC is compatible with:

  • MariaDB SkySQL DBaaS

  • MariaDB Enterprise (including MariaDB Enterprise Server and MariaDB MaxScale)

  • MariaDB Community Server

Benefits of R2DBC

The R2DBC API relies on reactive data streams, which provide many benefits over standard JDBC:

  • Reactive: R2DBC uses an event-driven, non-blocking, and functional programming model.

  • Scalable: R2DBC is more scalable than standard JDBC, because it allows the runtime to handle concurrency and scheduling.

  • Fast: R2DBC streams results, which can improve performance.

  • Efficient: R2DBC uses deferred execution and flow control to ensure that operations are performed efficiently.

  • Simple: R2DBC is designed to make common usage patterns simple to implement for developers.

Resources

Framework-Specific Documentation

For details on how to use MariaDB Connector/R2DBC, choose a supported framework:

Native R2DBC

The native implementation of R2DBC can be used to connect using MariaDB Connector/R2DBC from within your Java application.

Spring Data R2DBC

Spring Data implementation of R2DBC allows you to connect using MariaDB Connector/R2DBC using the Spring Framework.

Feature

Native R2DBC

Spring Data R2DBC

Reactive

Yes

Yes

Scalable

Yes

Yes

Fast

Yes

Yes

Efficient

Yes

Yes

Executes SQL

Yes

Yes

Integrates with Spring Framework

No

Yes

Spring Data: DatabaseClient

No

Yes

Spring Data: Repositories

No

Yes

Spring Data: Object Mapping

No

Yes

Spring Data: Transaction Management

No

Yes