Skip to content

Latest commit

 

History

History
443 lines (338 loc) · 17 KB

README.adoc

File metadata and controls

443 lines (338 loc) · 17 KB

Asynchronous & reactive programming with Java


🙋‍♂️ Presentation

This repository is intended to be a compilation of presentations, examples, links, and other resources on asynchronous and reactive programming in Java.

This initiative is part of the final project of: Máster Cloud Apps. Desarrollo y despliegue de aplicaciones en la nube [ 🇪🇸 ]

The project also provides, as documentation, a presentation about asynchronous and reactive programming in Java. You can check the slides here:

Name Version Download Updated at Lang

Presentación: Programación asíncrona y reactiva con Java

1.0.0

pptx or pdf

2020-12-08

🇪🇸

Slides: Asynchronous and reactive programming with Java

0.0.3

pptx or pdf

2020-11-18

🇬🇧

👩🏻‍🏫 Academic resources

On the other hand, the academic resources delivered as part of the completion of the project are also included:

Name Version Download Updated at Lang

Memoria: Programación asíncrona y reactiva con Java

1.0.0

pdf

2020-12-14

🇪🇸

Presentación: Programación asíncrona y reactiva con Java

1.0.0

pdf

2020-12-14

🇪🇸

📐 Examples

This section lists a series of examples that are intended to guide the content of the presentation.

Each of the mentioned examples are based on the latest version of Java (15+) and Spring Boot (2.4+).

Maven (3.6+) or Gradle (6+) will be used as build/dependency management tool. In addition, some examples will use the Lombok library to generate code through annotations

  • Example 00. Reactor operators: Simple project to practice with Project Reactor main operators. The purpose of the example is to show the behavior of Mono, Flux and their possibilities

  • Example 01. Basic comparison: Basic CRUD API (GET, POST, PUT, DELETE) in two flavors, Spring MVC and Spring WebFlux

  • Example 02. Using Spring WebClient: Basic API to retrieve information from remote web services using the reactive WebClient

  • Example 03. Gateway!: Gateway service to route requests to worker services to practice with Spring Cloud Gateway project

  • Example 04. Reactive DB access with R2DBC: Simple API with an internal relational PostgreSQL repository. R2DBC provides reactive non-blocking APIs to relational databases

  • Example 05. Protocols. RSocket: A simple project to know thow the reactive binary protocol RSocket works. The example includes two small modules that communicate with each other, exploring the different possibilities that RSocket offers to us

  • Example 06. Project Loom: Example for a first contact with Project Loom, its implementation and how to start with Virtual Threads

🔗 Resources

👨‍👩‍👧‍👦 Main Reactive Streams implementations

🍀 Spring ecosystem

It seems obvious but the best place to find good information about the Spring ecosystem is its official documentation:

Table 1. Interesting videos and articles about Reactive Spring
Name Author Year Info

Guide to "Reactive" for Spring MVC Developers

Rossen Stoyanchev

2018

🇬🇧 📹

Moving from Imperative to Reactive

Paul Harris

2019

🇬🇧 📹

Migrating from Imperative to Reactive

Nicholas Frankel

2020

🇬🇧 📋

Do’s and Don’ts: Avoiding First-Time Reactive Programmer Mines

Sergei Egorov

2019

🇬🇧 📹

Benefits of reactive programming with Reactor and Spring Boot 2

Violeta Georgieva

2019

🇬🇧 📹

Avoiding Reactor Meltdown

Phil Clay

2019

🇬🇧 📹

Reactive Performance

Oleh Dokuka

2019

🇬🇧 📹

Getting Started with R2DBC

Mark Heckler

2018

🇬🇧 📹

The RSocket Revolution

Josh Long

2020

🇬🇧 📹

Flight of the Flux: A look at Reactor execution model

Simon Baslé

2018

🇬🇧 📹

Flight of the Flux 1 - Assembly vs Subscription

Simon Baslé

2019

🇬🇧 📋

Flight of the Flux 2 - Debugging Caveats

Simon Baslé

2019

🇬🇧 📋

Flight of the Flux 3 - Hopping Threads and Schedulers

Simon Baslé

2019

🇬🇧 📋

Project Reactor: Which operator do I need? (Appendix A)

Project Reactor Docs

-

🇬🇧 📋

🌈 Other framework ecosystems

Table 2. Interesting videos and articles about other frameworks and ecosystems
Name Author Year Ecosystem Info

Quarkus - Getting started with Reactive

-

-

Quarkus

🇬🇧 📋

Reactive Quarkus–A Java Mutiny

Clement Escoffier

2020

Quarkus

🇬🇧 📹

Reactive HTTP Request Processing

-

-

Micronaut

🇬🇧 📋

Configurations for Reactive Programming

-

-

Micronaut

🇬🇧 📋

Microservicios reactivos con Micronaut

Iván López

2019

Micronaut

🇪🇸 📹

Micronaut Tutorial: Reactive

Piotr Minkowski

2019

Micronaut

🇬🇧 📋

☕ Project Loom

First and foremost: What is Project Loom?

According to OpenJDK Wiki:

Project Loom is to intended to explore, incubate and deliver Java VM features and APIs built on top of them for the purpose of supporting easy-to-use, high-throughput lightweight concurrency and new programming models on the Java platform. This is accomplished by the addition of the following constructs:

  • Virtual threads

  • Delimited continuations

  • Tail-call elimination

Table 3. Interesting articles and resources about Project Loom
Name Author Year Info

Loom - OpenJDK Wiki

-

-

🇬🇧

Project Loom: Modern Scalable Concurrency for the Java Platform

Ron Pressler

2020

🇬🇧 📹

On the performance of user-mode threads and coroutines

Ron Pressler

2020

🇬🇧 📋

On Project Loom

Nicholas Frankel

2020

🇬🇧 📋

Loom - Part 0 - Rationale

Arnaud Bos

2019

🇬🇧 📋

Loom - Part 1 - It’s all about Scheduling

Arnaud Bos

2019

🇬🇧 📋

Loom - Part 2 - Blocking code

Arnaud Bos

2019

🇬🇧 📋

Loom - Part 3 - Asynchronous code

Arnaud Bos

2019

🇬🇧 📋

Loom - Part 4 - Non-thread-blocking async I/O

Arnaud Bos

2020

🇬🇧 📋

Experimenting with Project Loom EAP and Spring WebMVC

Mark Paluch

2020

🇬🇧 📋

Project Loom and structured concurrency

Cay Horstmann

2020

🇬🇧 📋

⚒️ Libraries and tools

Table 4. Recommended libraries and tools
Name Description

VisualVM

VisualVM is a visual tool integrating commandline JDK tools and lightweight profiling capabilities. Designed for both development and production time use

Java Mission Control

Mission Control is an open source production time profiling and diagnostics tool for Java

Awaitility

Awaitility is a DSL that allows you to express expectations of an asynchronous system in a concise and easy to read manner

BlockHound

Java agent to detect blocking calls from non-blocking threads

Reactor Tools

A set of tools to improve Project Reactor’s debugging and development experience. Starting from Reactor 3.3.0.M2, reactor-tools is now moved to reactor-core

Reactor Addons

Reactor-adapter and reactor-extras utils

Rx Marbles

A webapp for experimenting with diagrams of Rx Observables, for learning purposes

📕 Books

Table 5. Recommended books
Name Author Year Lang

Reactive Design Patterns

Roland Kuhn, Jamie Allen

2014

🇬🇧

Reactive Application Development

Sean Walsh, Duncan K. DeVore, Brian Hanafee

2018

🇬🇧

Reactive Programming with RxJava: Creating Asynchronous

Tomasz Nurkiewicz, Ben Christensen

2016

🇬🇧

Hacking with Spring Boot 2.3: Reactive Edition

Greg L. Turnquist

2020

🇬🇧

Reactive Spring

Josh Long

2020

🇬🇧

Spring Boot: Up and Running: Building Cloud Native Java and Kotlin Applications

Mark Heckler

2021

🇬🇧

👣 Courses

Table 6. Recommended courses
Name Author Platform Lang

Java concurrency and multithreading (playlist)

Jakob Jenkov

Youtube

🇬🇧

Efficient Java Multithreading and Concurrency with Executors

Arun Kumar

Udemy

🇬🇧

Reactive Spring

Josh Long

Oreilly

🇬🇧

🚶‍♀️ Who to follow?

👩🏻‍💻 People

👮🏻‍♂️ Official accounts

🤝 Credits