GitHunt
MA

MasterCloudApps-Projects/AsyncReactiveProgramming

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

= Asynchronous & reactive programming with Java
Marcos de la Calle Samaniego, @marcosDLCS marcos.dlcs@gmail.com
v1.0.4, 2020-12-20
:toc:

++++

++++

== ๐Ÿ™‹โ€โ™‚๏ธ 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: https://www.codeurjc.es/mastercloudapps/[*Mรกster Cloud Apps. Desarrollo y despliegue de aplicaciones en la nube*, window=_blank] [ ๐Ÿ‡ช๐Ÿ‡ธ ]

++++

++++

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

[cols="9,4,3,3,1"]
|===
|Name |Version |Download |Updated at | Lang

| Presentaciรณn: Programaciรณn asรญncrona y reactiva con Java
| 1.0.0
| https://drive.google.com/file/d/1Whum-P6f5nqzq3Qj55C-p2DNLFvEKDBC/view?usp=sharing[pptx, window=_blank] or https://drive.google.com/file/d/1bnDI5x$$_$$jeQ1uV9MXXmi8-jbUGZ0Rfm9Z/view?usp=sharing[pdf, window=_blank]
| 2020-12-08
| ๐Ÿ‡ช๐Ÿ‡ธ

| Slides: Asynchronous and reactive programming with Java
| 0.0.3
| https://drive.google.com/file/d/1vfMmL__LiVgOm2fLsEiZVVHBcqgiD4Ez/view?usp=sharing[pptx, window=_blank] or https://drive.google.com/file/d/11zZQBMAHh0cgV2gVhK-6L5KEZ4i9-hSv/view?usp=sharing[pdf, window=_blank]
| 2020-11-18
| ๐Ÿ‡ฌ๐Ÿ‡ง
|===

=== ๐Ÿ‘ฉ๐Ÿปโ€๐Ÿซ Academic resources

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

[cols="9,4,3,3,1"]
|===
|Name |Version |Download |Updated at | Lang

| Memoria: Programaciรณn asรญncrona y reactiva con Java
| 1.0.0
| https://github.com/MasterCloudApps-Projects/AsyncReactiveProgramming/tree/master/resources/academic/memoria.pdf[pdf, window=_blank]
| 2020-12-14
| ๐Ÿ‡ช๐Ÿ‡ธ

| Presentaciรณn: Programaciรณn asรญncrona y reactiva con Java
| 1.0.0
| https://github.com/MasterCloudApps-Projects/AsyncReactiveProgramming/tree/master/resources/academic/presentacion_tfm.pdf[pdf, window=_blank]
| 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 https://spring.io/projects/spring-boot[*Spring Boot (2.4+)*, window=_blank].

https://maven.apache.org/[*Maven (3.6+), window=_blank] or https://gradle.org/[*Gradle (6+), window=_blank] will be used as build/dependency management tool. In addition, some examples will use the https://projectlombok.org/[*Lombok*, window=_blank] library to generate code through annotations

== ๐Ÿ”— Resources

=== ๐Ÿ‘ผ๐Ÿป Fundamentals

=== ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ 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:

[cols="6,3,2,1"]
.Interesting videos and articles about Reactive Spring
|===
|Name |Author |Year |Info

| https://www.infoq.com/presentations/spring-reactive-webflux[Guide to "Reactive" for Spring MVC Developers, window=_blank]
| Rossen Stoyanchev
| 2018
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“น

| https://www.youtube.com/watch?v=vSHNBgY7MGA&ab_channel=SpringI%2FO[Moving from Imperative to Reactive, window=_blank]
| Paul Harris
| 2019
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“น

| https://hazelcast.com/blog/migrating-from-imperative-to-reactive[Migrating from Imperative to Reactive, window=_blank]
| Nicholas Frankel
| 2020
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“‹

| https://www.youtube.com/watch?v=0rnMIueRKNU&ab_channel=SpringDeveloper[Doโ€™s and Donโ€™ts: Avoiding First-Time Reactive Programmer Mines, window=_blank]
|Sergei Egorov
|2019
|๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“น

| https://www.youtube.com/watch?v=ODzY5uJfzDI&ab_channel=SpringI%2FO[Benefits of reactive programming with Reactor and Spring Boot 2, window=_blank]
| Violeta Georgieva
| 2019
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“น

| https://www.youtube.com/watch?v=xCu73WVg8Ps&ab_channel=SpringDeveloper[Avoiding Reactor Meltdown, window=_blank]
| Phil Clay
| 2019
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“น

| https://www.youtube.com/watch?v=pyqIpqCt8PU&ab_channel=vJUG[Reactive Performance, window=_blank]
| Oleh Dokuka
| 2019
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“น

| https://www.youtube.com/watch?v=qwF6v6FN_Uc&ab_channel=SpringDeveloper[Getting Started with R2DBC, window=_blank]
| Mark Heckler
| 2018
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“น

| https://www.youtube.com/watch?v=ipVfRdl5SP0&ab_channel=SpringDeveloper[The RSocket Revolution, window=_blank]
| Josh Long
| 2020
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“น

| https://www.youtube.com/watch?v=hfupNIxzNP4&ab_channel=SpringI%2FO[Flight of the Flux: A look at Reactor execution model, window=_blank]
| Simon Baslรฉ
| 2018
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“น

| https://spring.io/blog/2019/03/06/flight-of-the-flux-1-assembly-vs-subscription[Flight of the Flux 1 - Assembly vs Subscription, window=_blank]
| Simon Baslรฉ
| 2019
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“‹

| https://spring.io/blog/2019/04/16/flight-of-the-flux-2-debugging-caveats[Flight of the Flux 2 - Debugging Caveats, window=_blank]
| Simon Baslรฉ
| 2019
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“‹

| https://spring.io/blog/2019/12/13/flight-of-the-flux-3-hopping-threads-and-schedulers[Flight of the Flux 3 - Hopping Threads and Schedulers, window=_blank]
| Simon Baslรฉ
| 2019
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“‹

| https://projectreactor.io/docs/core/release/reference/#which-operator[Project Reactor: Which operator do I need? (Appendix A), window=_blank]

Project Reactor Docs
๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“‹
===

=== ๐ŸŒˆ Other framework ecosystems

[cols="6,3,1,2,1"]
.Interesting videos and articles about other frameworks and ecosystems
|===
|Name |Author |Year | Ecosystem| Info

https://quarkus.io/guides/getting-started-reactive[Quarkus - Getting started with Reactive, window=_blank]
-
Quarkus
๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“‹

| https://www.youtube.com/watch?v=kWlrGtwvOxg&ab_channel=RedHatDeveloper/[Reactive Quarkusโ€“A Java Mutiny, window=_blank]
| Clement Escoffier
| 2020
| Quarkus
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“น

https://docs.micronaut.io/latest/guide/index.html#reactiveServer[Reactive HTTP Request Processing]
-
Micronaut
๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“‹
https://docs.micronaut.io/latest/guide/index.html#reactiveServer[Configurations for Reactive Programming]
-
Micronaut
๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“‹

| https://www.youtube.com/watch?v=EvkSWuo7Mig&ab_channel=Autentia[Microservicios reactivos con Micronaut]
| Ivรกn Lรณpez
| 2019
| Micronaut
|๐Ÿ‡ช๐Ÿ‡ธ ๐Ÿ“น

| https://piotrminkowski.com/2019/11/12/micronaut-tutorial-reactive/[Micronaut Tutorial: Reactive]
| Piotr Minkowski
| 2019
| Micronaut
|๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“‹
|===

=== โ˜• Project Loom

First and foremost: What is Project Loom?

According to https://wiki.openjdk.java.net/display/loom/Main[OpenJDK Wiki, window=_blank]:

====
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
    ====

[cols="6,3,2,1"]
.Interesting articles and resources about Project Loom
|===
|Name |Author |Year |Info

https://wiki.openjdk.java.net/display/loom/Main[Loom - OpenJDK Wiki, window=_blank]
-
๐Ÿ‡ฌ๐Ÿ‡ง

| https://youtu.be/23HjZBOIshY/[Project Loom: Modern Scalable Concurrency for the Java Platform, window=_blank]
| Ron Pressler
| 2020
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“น

| https://inside.java/2020/08/07/loom-performance/[On the performance of user-mode threads and coroutines, window=_blank]
| Ron Pressler
| 2020
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“‹

| https://blog.frankel.ch/project-loom-reactive-coroutines/[On Project Loom, the Reactive model and coroutines, window=_blank]
| Nicholas Frankel
| 2020
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“‹

| https://i-rant.arnaudbos.com/loom-part-0-rationale/[Loom - Part 0 - Rationale, window=_blank]
|Arnaud Bos
|2019
|๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“‹

| https://i-rant.arnaudbos.com/loom-part-1-scheduling/[Loom - Part 1 - It's all about Scheduling, window=_blank]
| Arnaud Bos
| 2019
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“‹

| https://i-rant.arnaudbos.com/loom-part-2-blocking/[Loom - Part 2 - Blocking code, window=_blank]
| Arnaud Bos
| 2019
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“‹

| https://i-rant.arnaudbos.com/loom-part-3-async/[Loom - Part 3 - Asynchronous code, window=_blank]
| Arnaud Bos
| 2019
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“‹

| https://i-rant.arnaudbos.com/loom-part-4-nio/[Loom - Part 4 - Non-thread-blocking async I/O, window=_blank]
| Arnaud Bos
| 2020
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“‹

| https://paluch.biz/blog/182-experimenting-with-project-loom-eap-and-spring-webmvc.html[Experimenting with Project Loom EAP and Spring WebMVC, window=_blank]
| Mark Paluch
| 2020
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“‹

| https://www.javaadvent.com/2020/12/project-loom-and-structured-concurrency.html[Project Loom and structured concurrency, window=_blank]
| Cay Horstmann
| 2020
| ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ“‹
|===

=== โš’๏ธ Libraries and tools

[cols="2,5"]
.Recommended libraries and tools
|===
|Name |Description

| https://visualvm.github.io/[VisualVM, window=_blank]
| VisualVM is a visual tool integrating commandline JDK tools and lightweight profiling capabilities.
Designed for both development and production time use

| https://github.com/openjdk/jmc[Java Mission Control, window=_blank]
| Mission Control is an open source production time profiling and diagnostics tool for Java

| http://www.awaitility.org/[Awaitility, window=_blank]
| Awaitility is a DSL that allows you to express expectations of an asynchronous system in a concise and easy to read manner

| https://github.com/reactor/BlockHound[BlockHound, window=_blank]
| Java agent to detect blocking calls from non-blocking threads

| https://github.com/reactor/reactor-core/tree/master/reactor-tools[Reactor Tools, window=_blank]
| 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

| https://github.com/reactor/reactor-addons[Reactor Addons, window=_blank]
| Reactor-adapter and reactor-extras utils

| https://github.com/reactor/reactor-core/tree/master/reactor-tools[Rx Marbles, window=_blank]
| A webapp for experimenting with diagrams of Rx Observables, for learning purposes
|===

=== ๐Ÿ“• Books

[cols="6,3,2,1"]
.Recommended books
|===
|Name |Author |Year |Lang

| https://www.goodreads.com/book/show/21799444-reactive-design-patterns[Reactive Design Patterns, window=_blank]
| Roland Kuhn, Jamie Allen
| 2014
| ๐Ÿ‡ฌ๐Ÿ‡ง

| https://www.goodreads.com/book/show/23752020-reactive-application-development[Reactive Application Development, window=_blank]
| Sean Walsh, Duncan K. DeVore, Brian Hanafee
| 2018
| ๐Ÿ‡ฌ๐Ÿ‡ง

| https://www.goodreads.com/book/show/28321006-reactive-programming-with-rxjava[Reactive Programming with RxJava: Creating Asynchronous, Event-Based Applications, window=_blank]
| Tomasz Nurkiewicz, Ben Christensen
| 2016
| ๐Ÿ‡ฌ๐Ÿ‡ง

| https://www.goodreads.com/book/show/53722460-hacking-with-spring-boot-2-3[Hacking with Spring Boot 2.3: Reactive Edition, window=_blank]
| Greg L. Turnquist
| 2020
| ๐Ÿ‡ฌ๐Ÿ‡ง

| https://www.goodreads.com/book/show/49450069-reactive-spring[Reactive Spring, window=_blank]
| Josh Long
| 2020
| ๐Ÿ‡ฌ๐Ÿ‡ง

| https://www.goodreads.com/book/show/55182022-spring-boot[Spring Boot: Up and Running: Building Cloud Native Java and Kotlin Applications, window=_blank]
| Mark Heckler
| 2021
| ๐Ÿ‡ฌ๐Ÿ‡ง
|===

=== ๐Ÿ‘ฃ Courses

[cols="6,3,2,1"]
.Recommended courses
|===
|Name |Author |Platform |Lang

| https://www.youtube.com/playlist?list=PLL8woMHwr36EDxjUoCzboZjedsnhLP1j4[Java concurrency and multithreading (playlist), window=_blank]
| Jakob Jenkov
| Youtube
| ๐Ÿ‡ฌ๐Ÿ‡ง

| https://www.udemy.com/course/efficient-java-multithreading-with-executors/[Efficient Java Multithreading and Concurrency with Executors, window=_blank]
| Arun Kumar
| Udemy
| ๐Ÿ‡ฌ๐Ÿ‡ง

| https://learning.oreilly.com/library/view/reactive-spring-boot/9780136836421/[Reactive Spring, 2nd Edition, window=_blank]
| Josh Long
| Oreilly
| ๐Ÿ‡ฌ๐Ÿ‡ง
|===

== ๐Ÿšถโ€โ™€๏ธ Who to follow?

=== ๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ป People

=== ๐Ÿ‘ฎ๐Ÿปโ€โ™‚๏ธ Official accounts

=== ๐Ÿก Sites

== ๐Ÿค Credits

Contributors

Apache License 2.0
Created June 30, 2020
Updated April 24, 2025