Reactive Programming with Java and Spring
Reactive Programming with Java and Spring
Reactive Programming with Java and Spring

Last updated on 2018-03-02

About the Book


This book is intended for developers that want to learn Reactive Programming patterns using Java and frameworks like Spring WebFlux and Project Reactor. To give a complete overview of a Full Reactive System, it also shows how to create a reactive web page using Angular.

Chapters and Description

1 - Introduction

This chapter describes the different chapters in the book, its goals and prerequisites.

2 - The Reactive Landscape

A brief summary of the different technologies, programming languages and frameworks that enable developers implement Reactive Patterns. It also explains the differences between Reactive Programming and Reactive Systems and where and how to apply them.

3 - Reactive Programming

This chapter goes through the Java 9's Flow API and compares it with Project Reactor and RxJava. The concepts are covered using practical examples, and it includes a reasoned comparison between using Reactive Patterns and Functional and Imperative Programming.

4 - Reactive Web

The reader will see how to implement Reactive Web Controllers using Spring WebFlux, and how to interact with them from the frontend using Angular and Javascript's EventSource (although the book focuses on the backend side of the story).

5 - Going Full Stack Reactive

Within this chapter, the reader will learn how to interact with a database in a reactive style, and how to connect all the pieces: UI, backend's reactive web layer and persistence. The practical part of this chapter shows how to start the full application and see the patterns in action.

6 - Bonus Chapter: Deploying the app with Docker

Given that the practical example consists of many pieces, it's always simpler to use tools like Docker and Docker Compose to be able to run the entire system with just one command: that's what it's covered in this bonus chapter that, even though it's not related with Reactive Patterns, provides useful knowledge to the reader.

7 - Reactive Web Benchmark and Conclusions

Covers an analysis of the differences between using a synchronous Web API and an asynchronous, reactive one.

8 - Epilogue

The book finishes with the book's author conclusions and some advice.

Note that the book is a work in progress, so these contents may vary along the writing process.

About the Author

Moisés Macero
Moisés Macero

I'm developing software since I was a kid, when my parents bought me a Spectrum ZX (in which I also played great videogames...). I've worked at startups, where a developer is a real full-stack developer (from frontend to backend, from building to maintaining, from the cave to customer-facing meetings) and also at big companies, where stability and keeping high product quality standards is a must. Along my career I have been involved usually in development, design and architecture, for small and huge projects. Worked in waterfall and agile environments.

Now I'm working at a Dutch company as Solutions Architect for a project based on microservices. I like keeping ways of working as practical as possible but, at the same time, producing proper documentation and sharing knowledge.

I'm the author of the blog about software development The Practical Developer: and the book Learn Microservices with Spring Boot.

Authors have earned$8,393,636writing, publishing and selling on Leanpub,
earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.

Learn more about writing on Leanpub

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub