Reactive Relational Database — Scalable database solution

Sujit Udhane
2 min readDec 1, 2020

--

High Level Diagram — Blocking IO at DB level vs Reactive Database

1) What is R2DBC?
In contrast to the blocking nature of JDBC, R2DBC allows you to work with SQL databases using a reactive API.
Existing standards, based on blocking I/O, cut off reactive programming from relational database users. R2DBC specifies a new API to allow reactive code that works efficiently with relational databases.
R2DBC is a specification designed from the ground up for reactive programming with SQL databases. It defines a non-blocking SPI for database driver implementers and client library authors. R2DBC drivers fully implement the database wire protocol on top of a non-blocking I/O layer.

2) Why R2DBC ?
Supports scalable solutions. With Reactive Streams, R2DBC enables you to move from the classic “one thread per connection” model to a more powerful and scalable approach.

3) Where will be useful?
High volume transaction systems like
- Comments or Reviews getting added OR updated.
- Location trackers where state changes happening constantly e.g. Online delivery of food or beverages.
-Real time analytics data.
-News feed.
Many more places…

4) How R2DBC can be implemented?
Please find the GitHub repo details below.

Please find URL of GitHub Repo — https://github.com/sudhane/fullstack

Please take a look at README file — https://github.com/sudhane/fullstack/blob/main/README.md

GitHub repo covers — Spring Boot Service + Spring Webflux + PostgreSQL (as a Datasource) + ReactJS (as a Frontend) + Happy case test scenarios at server side and at client side.

Selenium Web driver headless chrome based integration testcases.

5) Additional references

http://r2dbc.io/

https://spring.io/projects/spring-data-r2dbc

If you like the article, please clap for it. Also, share the article with your friends.

--

--

Sujit Udhane
Sujit Udhane

Written by Sujit Udhane

I am Lead Platform Architect, working in Pune-India. I have 20+ years of experience in technology, and last 10+ years working as an Architect.

No responses yet