Whether or not you’ve been actively developing within one of the JVM languages or not, you’ve likely at least heard of the concept of reactive programming by now. If not, I certainly encourage you to do a little research into the whole idea of declarative programming using data streams.

In this article we’ll take a look at the (very) brief background of not only what Reactive Relational Database Connectivity (R2DBC) is but why it exists, and then dive into the code to see how the new MariaDB R2DBC connector can be used to create fully reactive, Java Spring applications!

We’re going to walking through the process of creating a simple todo application, but if you’d prefer to jump directly into the code you can find it here.

It all starts with Reactive Streams

While I’m not going to give you the entire backstory and technical

details behind reactive programming, it’s important that we go over a few of the high level points before diving to all the R2DBC hoopla.

For starters, it’s important to know (or recall, depending on your current circumstance) that reactive programming boils down to the idea of using asynchronous data streams.

A data stream is basically what it sounds like, a stream of data. But what does that really mean exactly?

A stream is a sequence of ongoing events ordered in time. There are three types of events; value, error, completed signal.

#spring-boot #spring-data #java

Reactive Programming with Java Spring, R2DBC and MariaDB
11.75 GEEK