CIA World Factbook API with Functional Spring

CIA World Factbook API with Functional Spring

I have recently been very interested in microframeworks. One thing notably missing from that article is Spring in the context of a microframework. You may be surprised, but it is possible to write very lightweight APIs with Functional Spring. In this article, I will show you how, by turning CIA World Factbook into a REST API. So what is Functional Spring? Functional Web Framework was introduced in Spring 5 and lets you build a very lightweight REST API without much of the Spring Magic. Sounds perfect! ...

June 22, 2018 · 5 min · Bartosz Jedrzejewski
WebFlux in practice - asynchronous service with WebClient

WebFlux in practice - asynchronous service with WebClient

Building reactive microservices with WebFlux is fun and easy. In this article, I will show you how to build a reactive “synonyms” service. Making asynchronous API calls with WebClient is likely the most common scenario for a real-life reactive microservice. Synonyms service – the idea I want to build a service that will return a synonym for a given word. Based on that I would like this service to translate a sentence into another one made completely out of synonyms. For example, I will have: Java is a good languagebecome Coffee is a right speech. It is somewhat entertaining and a nice example! ...

May 31, 2018 · 4 min · Bartosz Jedrzejewski
The State of Spring in 2018 - Devoxx UK Impressions

The State of Spring in 2018 - Devoxx UK Impressions

Thanks to my company – Scott Logic – I recently had a pleasure of attending the Devoxx UK 2018 conference. Among many interesting talks and speakers, there were quite a few Spring celebrities present. Juergen Holler (Father of Spring), Josh Long and Mark Heckler were all there. Here are my impressions from the conference. Spring is hugely popular This is hardly news for anyone interested in microservices, but the popularity of Spring can’t be overstated. Every Spring talk was full and the audience was very engaged. Spring is very much the bread and butter of Server Side Java in 2018. ...

May 20, 2018 · 4 min · Bartosz Jedrzejewski
Spring’s WebFlux / Reactor Parallelism and Backpressure

Spring’s WebFlux / Reactor Parallelism and Backpressure

Spring Boot 2.0 (and Spring 5) introduced WebFlux as a way to build reactive Microservices. WebFlux is built using Reactor, which introduces completely new ideas to Spring Boot parallelism. Backpressure, Schedulers, and Parallel Flux are a few concepts that we will look at closer in order to understand how to make the most of our reactive services. I have recently written articles on Getting Started with WebFlux and Concurrency in Spring Boot. One thing that I did not explore enough in these articles were the concurrency implications of building a WebFlux based reactive microservice. ...

April 28, 2018 · 7 min · Bartosz Jedrzejewski
WebFlux and servicing client requests - how does it work?

WebFlux and servicing client requests - how does it work?

I have previously written about Getting Reactive with Spring Boot 2.0 and Reactor, where I have given an introduction to reactive programming in Spring Boot. In this article, I will further explore WebFlux and the ways it impacts servicing client requests- what happens when you return a Flux<>? Simple Flux When you write a Controller that returns a list of numbers from your function, you get a list of numbers when you call it. How does it work when you return a Flux like that?: ...

April 14, 2018 · 5 min · Bartosz Jedrzejewski
Getting Reactive with Spring Boot 2.0 and Reactor

Getting Reactive with Spring Boot 2.0 and Reactor

Reactive programming is gaining a rapid popularity in the JVM community. With Java 9 natively embracing the Reactive Streams and Spring Boot 2.0 including the WebFlux, it is hard to argue with this statement. Spring uses Reactor for its own reactive support and WebFlux relies on that support. In this article, I will show you how to get into reactive programming with Reactor and Spring Boot 2.0. What is Reactor? Project Reactor is quite well described by the tagline on their official page: ...

April 11, 2018 · 5 min · Bartosz Jedrzejewski
Reactive Streams in Java - introducing the new SPI

Reactive Streams in Java - introducing the new SPI

One of the new features of Java 9 is the introduction of the Reactive Streams SPI to the JDK. Reactive programming keeps gaining in popularity, mainly because it works well. If you are not familiar with the principles, I recommend checking out The Reactive Manifesto to which I subscribe. To learn more about Reactive Streams in Java, read on. Reactive Streams got introduced to Java as java.util.concurrent.Flow. Before looking into that, let’s see what are Reactive Streams and how can we make use of them. ...

April 4, 2018 · 4 min · Bartosz Jedrzejewski