Reactive Backend Applications with Spring Boot, Kotlin and Coroutines (Part 1)

This page summarizes the projects mentioned and recommended in the original post on dev.to

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • BlockHound

    Java agent to detect blocking calls from non-blocking threads.

    There is a great tool called Blockhound we can use to detect if/when we have a blocking call in our application. This way, we can ensure that we don't break the non-blocking nature of our application by mistake while developing new features. Setting it up is fairly straightforward.

  • CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  • You can find the source code of this application at github.com/iodigital-com/reactive-kotlin-weather-api.

  • Reactive Streams

    Reactive Streams Specification for the JVM

    Reactive programming is a paradigm that focuses on non-blocking and asynchronous processing of tasks. One set of specifications/abstractions for reactive programming on JVM is called Reactive Streams. Project Reactor is a message-driven, type-safe and functional implementation of Reactive Streams, and it is used by Spring (via spring-webflux module) to enable reactive web applications. Reactive streams model the data processing as a stream with one end producing the values and one end consuming them.

  • initializr

    A quickstart generator for Spring projects

    You can use start.spring.io to generate a project using Java 17, Gradle, Spring Web, Spring Data JPA, and H2 Database. Here's what the build file of our project should look like:

  • r2dbc-postgresql

    Postgresql R2DBC Driver

    Now that we have an application, let's turn it into a reactive application. For this, we will replace Spring Web dependency with Spring WebFlux, Spring Data JPA with Spring Data R2DBC. We will also add R2DBC dependency for our H2 database. R2DBC works with a reactive driver so it will integrate nicely with the rest of our application to allow us database access in a non-blocking way.

  • reactor-core

    Non-Blocking Reactive Foundation for the JVM

    Spring Framework is one of the most popular choices for web applications. It comes with a great ecosystem, tooling, and support. Spring applications are mainly written in Java. While they can serve quite well in many different domains and use cases, they may not be a good fit for modern-day applications which require low-latency and high-throughput. This is where the reactive programming paradigm could help because the paradigm is designed to address these issues by its non-blocking nature. Spring already supports reactive programming via Project Reactor.

  • Flyway

    Flyway by Redgate • Database Migrations Made Easy.

    Since we don't use JPA/Hibernate anymore, we will need to be handling our DB structure ourselves. Luckily, for a simple case like ours, Spring supports DB schema initialization directly (a real-world application might use a tool like Flyway for this purpose). Let's create a schema.sql in our resources folder:

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Reactive db drivers (r2dbc)

    1 project | /r/scala | 12 Dec 2022
  • Using Flyway for Database Setup

    2 projects | /r/Kotlin | 28 Apr 2023
  • IvorySQL - I've tested some Oracle-PostgreSQL compatibility of version 2.1

    2 projects | dev.to | 19 Dec 2022
  • How do you guys go about the persistence layer?

    2 projects | /r/javahelp | 23 Mar 2022
  • What is the state of Spring WebFlux and R2DBC

    4 projects | /r/java | 6 Nov 2021

Did you konow that Java is
the 8th most popular programming language
based on number of metions?