Building Reactive Java Applications with Spring Framework

If you’re a Java developer who uses the Spring ecosystem, you’ve probably seen the Spring Pet Clinic. In this workshop, we will walk you through a new reactive implementation of the Pet Clinic backend that uses Spring WebFlux and Apache Cassandra® (via DataStax Astra DB).

The cloud-native database-as-a-service built on Cassandra fits the highly concurrent, non-blocking nature of our reactive application. We’ll do all of our work in the cloud with Gitpod’s open-source, zero-install and collaborative development environment.

Kafka Fail-Over Using Quarkus Reactive Messaging

Background

Recently, I came across a scenario where, at first glance, we needed an active-active Kafka cluster with bi-directional replication using MirrorMaker2. However, while diving deeper into the nuances of the solution that this particular project demanded, a number of factors showed this wasn't really the case. For example, a look at how the producers/consumers will handle temporary failure and/or guarantee exactly-once processing downstream added a ton of complexity to the problem. 

By taking a step back to the design board, we changed the approach to an active-standby scenario. In this scenario, the active cluster will replicate all its configs, consumer groups, and topics to the standby cluster that will become active in case of failure.  However, this posed a problem: how can I get the minimum possible downtime in my producers without the need to restart them with the new configuration for the new cluster?

Simplify Java persistence using Quarkus and Hibernate Reactive

This tutorial shows how you can simplify reactive Java applications that persist data using the Hibernate ORM with Panache extension in Quarkus.

Business applications preserve valuable business data in persistence stores such as relational databases. The application's presentation layer usually showcases the data for multiple uses, such as inventory, shopping, subscription, and monitoring. Java provides a core feature, the Java Persistence API (JPA), to manage persistent objects using object-relational mapping (ORM) with databases such as PostgreSQL, MySQL, and Microsoft's SQL Server. However, even when using JPA annotations, you must implement the JPA specifications to handle data transactions.

Authentication With Remote LDAP Server in Spring WebFlux

In my previous article, we covered authentication and authorization with remote LDAP servers in Spring Web MVC. Since base concepts are the same, some sections are unavoidably the same in these two articles and they are kept in both articles in order to create a seamless reading experience for WebFlux and MVC learners. 

In this article, we will develop a reactive Spring Boot project and integrate into remote LDAP through Spring Security. In addition, we will perform authentication (auth) and authorization (autz) operations over JWT (JSON Web Token) for the APIs we will open. 

Separation of Reactive and Non-Reactive Code

One of the most important distinctions to keep in mind when working with Project Reactor or any other reactive streams implementation is the difference between assembly-time vs. subscription-time in code execution. 

Regardless of your level of experience with reactive programming, odds are you’ve already encountered the famous:

Reactive Microservices – 1

Prologue

The term reactive is ubiquitous. Everything from architecture to frameworks, to the general concepts, seems to refer to this term. Quite obviously, reactive has assumed many meanings and definitions and can be understood under a certain context. This article aims to dive deep into what being reactive means and to explore the various contexts where this idea is used. In particular, the article aims to explore the relationship between microservices and reactive and attempt to define what reactive microservices are.

Reactive Systems — Introduction

The operating environment of enterprises today has complexity as a norm. Cloud Computing, Multiple device types (desktops, mobile devices, wearables, Sensors, Gaming Consoles, Smart Homes), near-zero downtime, low latency & petabytes of data processing are few characteristics that have led to a world of services where the experience and expectations of a consumer have changed. In addition, the number of users has increased manifold and these users are always connected.

Getting started with edge development on Linux using open source

There are many reasons why Linux is such a popular platform for processing Internet of Things (IoT) edge applications. A major one is a transparency. Linux security capabilities are built on open source projects, giving users a transparent view of security risks and threats and enables them to apply fixes quickly with security module patches or kernel-level updates. Another Linux advantage is that developers can choose from various programming languages to develop, test, and run device communications over various networking protocols—other than HTTP(s)—when developing IoT edge applications. It also enables developers to address server programming for controlling data flow from IoT devices to front-end graphical user interface (GUI) applications.

This article explains how to get started with IoT edge development using Quarkus, a cloud-native Java framework that enables you to integrate a lightweight message broker for processing data streams from IoT devices in a reactive way.

Deploy Friday: E42 Subatomic Reactive Systems in cloud

Reactive programming is growing in popularity, but what is it? Is it a fully new paradigm, or just an evolution of functional programming?  When should (or shouldn't) you use it?  To answer these questions, we'll be speaking with two experts from RedHat about Reactive Programming as seen in Quarkus, the Java microservices framework.  We'll go deep into how Quarkus works with a reactive paradigm and the pros and cons of reactive style. 

Try Quarkus on Platform.sh: https://github.com/platformsh-templates/quarkus

What Is a Single-page Application (SPA)?

Single-page application technology has become the de facto standard for creating modern web applications today due to the numerous benefits related to loading times and user experience. Industry giants of the digital space that have already adopted this approach to web development include Facebook, Gmail, Google Maps, LinkedIn, and Netflix.

But is a single-page application framework the right one for your upcoming web project? In this blog post, I’ll set out what a single-page application is, its benefits, and when you should use it.

What Is a Single-page Application?

A single-page application (SPA) is a JavaScript framework for distributing application functionality over the web. The three most popular SPA tools are:

RSocket in Cloud Native

In the mission of the cloud-native computing foundation, It states “the techniques enable loosely coupled systems that are resilient, manageable, and observable.” Those three characterizes are the core of the cloud-native computing foundation. Other technologies play a support role.

1. Reactive Programming 

1.1 Imperative Programming vs. Reactive Programming

With an imperative approach, a developer writes code that describes in exacting detail the steps that the computer must take to accomplish the goal. Those steps are executed in the order as the developer lays out without considering other systems the code interacts with.

Intro to Spring Data MongoDB Reactive and How to Move It to the Cloud

In this post, we're going to see how to configure and implement database operations using Reactive Programming through Spring Data Reactive Repositories with MongoDB to run locally and then see how to move it smoothly to the cloud through Platform.sh. 

Reactive programming is a programming paradigm that promotes an asynchronous, non-blocking, event-driven approach to data processing. Reactive programming involves modeling data and events as observable data streams and implementing data processing routines to react to the changes in those streams.

Introduction of Spring Webflux and How to Apply Cloud on It

If you're looking for a non-blocking web stack to handle concurrency with a small number of threads and scale with fewer hardware resource Spring WebFlux is for you. In this article, we'll talk about Spring WebFlux and how to move this non-block project to the cloud thanks to Platform.sh.

The reactive-stack web framework, Spring WebFlux, was added later in version 5.0. It is fully non-blocking, supports Reactive Streams back pressure, and runs on such servers as Netty, Undertow, and Servlet 3.1+ containers.

Reactive Messaging Examples for Quarkus

Quarkus provides several different reactive messaging capabilities. The open-source project cloud-native-starter uses some of these capabilities in a sample application which is described in this article.

There a several easy to follow Quarkus guides about the topic 'reactive messaging'. Tutorials are great, but the best way to learn new technologies is for me is to use them in simple applications. That's why I've come up with a simple scenario.

Build a Simple Netty Application With and Without Spring

As an asynchronous, non-blocking input/output (NIO) framework, Netty is used for the rapid development of maintaining highly scalable protocol servers and clients. Building low-level network servers and clients is relatively straightforward with Netty. Developers can work on the socket level (e.g. creating original communication protocols between clients and servers). 

Blocking and non-blocking unified APIs, amenable threading model, and SSL/TLS are all supported by Netty. All requests run asynchronously on an individual thread with a non-blocking server. (The event loop shouldn’t be blocked by the function.) This contradicts operations performed in a blocking server model, which usually uses a separate thread to run each request. Without the need for switching or creating threads when the load increases, the non-blocking model decreases overhead and allows for faster development as traffic expands. 

Tutorial: Reactive Spring Boot, Part 7: Subscribing Multiple Consumers

Learn more about subscribing to multiple consumers in this seventh installment on building a Reactive Spring Boot application.

This is the seventh part of our tutorial showing how to build a Reactive application using Spring Boot, Kotlin, Java, and JavaFX. The original inspiration was a 70-minute live demo.

This tutorial is a series of steps during which we will build a full Spring Boot application featuring a Kotlin back-end, a Java client, and a JavaFX user interface.