Vert.x in Action
Julien Ponge
  • MEAP began October 2018
  • Publication in Spring 2020 (estimated)
  • ISBN 9781617295621
  • 375 pages (estimated)
  • printed in black & white

Fantastic introduction into Vert.x written for developers looking to develop services more efficiently in terms of time and resources.

Andrew Buttery
As enterprise applications become larger and more distributed, new architectural approaches like reactive designs, microservices, and event streams are required knowledge. The Vert.x framework provides a mature, rock-solid toolkit for building reactive applications using Java, Kotlin, or Scala. Vert.x in Action teaches you to build responsive, resilient, and scalable JVM applications with Vert.x using well-established reactive design patterns.
Table of Contents detailed table of contents

1 Vertx, asynchronous programming and reactive systems

1.1 Being distributed and networked is the norm

1.2 Not living on an isolated island

1.3 There is no free lunch on the network

1.4 The simplicity of blocking APIs

1.5 Blocking APIs waste resources, increase costs

1.6 Asynchronous programming with non-blocking I/O

1.7 Multiplexing event-driven processing: the case of the event loop

1.8 What is a reactive system?

1.9 What else does reactive mean?

1.10 What is Vert.x?

1.11 Your first Vert.x application

1.11.1 Preparing the project

1.11.2 The VertxEcho class

1.11.3 The role of callbacks

1.11.4 So is this a reactive application?

11.12 What are the alternatives to Vert.x?

11.13 Summary

11.14 References

Part 1: Fundamentals of asynchronous programming with Vert.x

2 Verticles: the basic processing units of Vert.x

2.1 Writing a verticle

2.1.1 Preparing the project

2.1.2 The verticle class

2.1.3 Running and first observations

2.2 More on verticles

2.2.1 Blocking and the event-loop

2.2.2 Asynchronous notification of life-cycle events

2.2.3 Deploying verticles

2.2.4 Passing configuration data

2.3 When code needs to block

2.3.1 Worker verticles

2.3.2 The executeBlocking operation

2.4 So what is really in a verticle?

2.4.1 Verticles and their environment

2.4.2 More on contexts

2.4.3 Bridging Vert.x and non-Vert.x threading models

2.5 Summary

2.6 References

3 Event-bus: the backbone of a Vert.x application

3.1 What is the event-bus?

3.1.1 So is the event-bus just another message broker?

3.1.2 Point-to-point messaging

3.1.3 Request-reply messaging

3.1.4 Publish / subscribe messaging

3.2 The event-bus through an example

3.2.1 Heat sensor verticle

3.2.2 Listener verticle

3.2.3 Sensor data verticle

3.2.4 HTTP server verticle

3.2.5 Bootstrapping the application

3.3 Clustering and the distributed event-bus

3.3.1 Clustering in Vert.x

3.3.2 From event-bus to distributed event-bus

3.4 Summary

3.5 References

4 Asynchronous data and event streams

4.1 Unified stream model

4.2 What is back-pressure?

4.3 Making a music streaming jukebox

4.3.1 Features and usage

4.3.2 HTTP processing: the big picture

4.3.3 Jukebox verticle basics

4.3.4 Incoming HTTP connections

4.3.5 Downloading as efficiently as possible

4.3.6 Reading MP3 files, but not too fast

4.4 Parsing simple streams

4.5 Parsing complex streams

4.6 A quick note on the stream fetch mode

4.7 Summary

5 Beyond callbacks

5.1 Composing asynchronous operations: the edge service example

5.1.1 Scenario

5.1.2 Heat sensor verticles

5.1.3 Snapshot service verticle

5.2 Callbacks

5.2.1 Implementation

5.2.2 Running

5.2.3 The "callback-hell" is not the problem

5.3 Future and promises with CompletionStage

5.4 Reactive extensions

5.4.1 RxJava in a nutshell

5.4.2 RxJava and Vert.x

5.4.3 Collector service in RxJava

5.5 Kotlin coroutines

5.5.1 What is a coroutine?

5.5.2 Vert.x and Kotlin coroutines

5.5.3 Edge service with coroutines

5.6 So, which model should I use?

5.7 Summary

5.8 References

Part 2: Developing reactive services with Vert.x

6 Beyond the event-bus

6.1 Revisiting heat sensors with a service API

6.2 Return of the RPCs

6.3 Defining a service interface

6.4 Service implementation

6.5 Enabling proxy code generation

6.6 Deploying event-bus services

6.7 Service proxies beyond callbacks

6.8 Testing and Vert.x

6.8.1 Using JUnit 5 with Vert.x

6.8.2 Testing DataVerticle

6.8.3 Running the tests

6.9 Summary

6.10 References

7 Designing a reactive application

7.1 What makes an application reactive

7.2 The 10k steps challenge scenario

7.3 One application, many services

7.4 Service specifications

7.4.1 User profile service

7.4.2 Ingestion service

7.4.3 Activity service

7.4.4 Public API

7.4.5 User web application

7.4.6 Event stats service

7.4.7 Congrats service

7.4.8 Dashboard web application

7.5 Running the application

7.6 Summary

7.7 References

8 The web stack

8.1 Exposing a public API

8.1.1 Routing HTTP requests

8.1.2 Making HTTP requests

8.2 Access control with JWT tokens

8.2.1 Using JWT tokens

8.2.2 What is in a JWT token?

8.2.3 Handling JWT tokens with Vert.x

8.2.4 Issuing JWT tokens with Vert.x

8.3 Cross-origin resource sharing (CORS)

8.3.1 What is the problem?

8.3.2 Supporting CORS with Vert.x

8.4 A modern web frontend

8.4.1 Vue.js

8.4.2 Vue.js application structure and build integration

8.4.3 Backend integration illustrated

8.4.4 Static content serving with Vert.x

8.5 Writing integration tests

8.6 Summary

8.7 References

9 Messaging

10 State management with databases

11 End-to-end real-time event processing

12 Are we reactive yet?

13 Final notes: container-native Vert.x

About the Technology

Vert.x is a mature framework for building reactive applications on the JVM. Designed to handle asynchronous communication effortlessly, Vert.x permits the fewest number of concurrent threads possible. As a result, you automatically get increased scalability, resource efficiency, and dependability, which are big wins for any distributed system. Vert.x’s modular design lends itself perfectly to data processing, IoT gateways, web apps, gaming backends, and more.

Vert.x supports all major JVM languages and asynchronous programming models including callbacks, promises, Scala futures, and Kotlin futures. Hosted by the Eclipse foundation and now in its third major release, Vert.x boasts over seven years of field-tested performance. In addition, Vert.x has been integrated into the Red Hat OpenShift platform as a rapid development tool for cloud native reactive applications.

About the book

Vert.x in Action teaches you to build highly-scalable reactive enterprise applications. In this practical developer’s guide, Vert.x expert Julien Ponge gets you up to speed in the basics of asynchronous programming as you learn to design and code reactive applications. Using the Vert.x asynchronous APIs, you’ll build services including web stack, messaging, authentication, and access control. You’ll also dive into deployment of container-native components with Docker, Kubernetes, and OpenShift. Along the way, you’ll check your app’s health and learn to test its resilience to external service failures.

As a member of the Vert.x core team, Julien Ponge has up-close-and-personal experience you can trust. The lessons and examples in this book center on principles that will easily transfer to other reactive technologies, empowering you to apply what you learn using Vert.x or the reactive tech of your choice. With the rising tide of microservices and distributed systems, reactive programming is flowing into the mainstream. With Vert.x in Action, you’ll be sailing smoothly!

What's inside

  • An introduction to asynchronous programming and reactive systems
  • Building reactive services
  • Responding to external service failures
  • Horizontal scaling
  • Deploying with Docker, Kubernetes, and OpenShift

About the reader

Intended for intermediate Java developers familiar with web development, networked services, and enterprise Java frameworks like Spring or Java EE. No prior experience in asynchronous or reactive programming is required.

About the author

Julien Ponge is a Principal Software Engineer at Red Hat, working on reactive things and the Eclipse Vert.x project. He is on-leave from INSA Lyon where he was an Associate Professor in computer science and engineering, and he remains a research member of the CITI Laboratory. Drawing on his strong background in distributed systems and long-standing open source experience, he’s a regular speaker at user groups and conferences about Vert.x. He’s also the principal author of A gentle guide to asynchronous programming with Eclipse Vert.x for Java developers, which is part of the Vert.x core documentation.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
MEAP combo $49.99 pBook + eBook + liveBook
MEAP eBook $39.99 pdf + ePub + kindle + liveBook
Prices displayed in rupees will be charged in USD when you check out.

placing your order...

Don't refresh or navigate away from the page.

FREE domestic shipping on three or more pBooks