Skip to Content
Building Reactive Microservices in Java
book

Building Reactive Microservices in Java

by Clement Escoffier
June 2017
Intermediate to advanced
81 pages
1h 41m
English
O'Reilly Media, Inc.
Content preview from Building Reactive Microservices in Java

Chapter 3. Building Reactive Microservices

In this chapter, we will build our first microservices with Vert.x. As most microservice systems use HTTP interactions, we are going to start with HTTP microservices. But because systems consist of multiple communicating microservices, we will build another microservice that consumes the first one. Then, we will demonstrate why such a design does not completely embrace reactive microservices. Finally, we will implement message-based microservices to see how messaging improves the reactiveness.

First Microservices

In this chapter we are going to implement the same set of microservices twice. The first microservice exposes a hello service that we will call hello microservice. Another consumes this service twice (concurrently). The consumer will be called hello consumer microservice. This small system illustrates not only how a service is served, but also how it is consumed. On the left side of Figure 3-1, the microservices are using HTTP interactions. The hello consumer microservice uses an HTTP client to invoke the hello microservice. On the right side, the hello consumer microservice uses messages to interact with the hello microservice. This difference impacts the reactiveness of the system.

brmj 0301
Figure 3-1. The microservices implemented in this chapter using HTTP and message-based interactions

In the previous chapter, we saw two different ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Reactive in Java made easy with Vert.x

Reactive in Java made easy with Vert.x

Julien Ponge

Publisher Resources

ISBN: 9781491986295