Email the Author

You can use this page to email Yuri Mednikov about Principles of Vertx (2nd edition).

Please include an email address so the author can respond to your query

This message will be sent to Yuri Mednikov

This site is protected by reCAPTCHA and the Google  Privacy Policy and  Terms of Service apply.

About the Book

This is the second edition of the popular “Principles of Vertx” book. The work was completely rewritten in order to promote new programming paradigms, that we introduced by the fourth release (Vertx 4.x). Unlike other existing publications about the Vertx platform, this book took as its priority to introduce readers to established software architecture practices and their implementations using Vertx. The book uses a project driven approach and it covers Eclipse Vertx 4.x features.

Table of Contents

Chapter 1. Futures

The concept of Futures in Vertx 4

How to create Future instances

Using Java asynchronous types

With a hardcoded value

From Vertx Promises

The difference between a status and a value

Sequential composition patterns

How to handle a recovery

Concurrent composition patterns

Any

All

Join

Chapter summary

Chapter 2. Verticles

Why verticles are actors

Why verticles are not actors

A lifecycle of a verticle

The difference between standard and worker verticles

How to execute blocking code inside standard verticles

Chapter summary

Chapter 3. An application configuration and a dependency injection

A configuration management

Using custom configuration sources

The dependency injection pattern in Vertx applications

Chapter summary

Chapter 4. Testing

Test context instances and their lifecycles

Unit tests

Checkpoints

Integration tests

API endpoints tests

Code coverage

Chapter summary

Chapter 5. Working with PostgreSQL databases in Vertx applications

Building blocks of the Vertx reactive client for PostgreSQL

Prepared queries

Row sets

Row mapping patterns

Notes about the usage of query builder libraries

CRUD operations with the Vertx reactive client for PostgreSQL

Save a new entity

Retrieve a single entity

Retrieve many entities

Delete an entity

Update an entity

How to handle schema creations and to manage migrations from Vertx applications

Execute queries in batches

The Pagination pattern

The Sorting pattern

How to handle aggregation operations

Aggregate data from two tables

Aggregate data from three tables

Chapter summary

Chapter 6. Working with MongoDB databases in Vertx applications

Make use of the MongoDB data model (documents instead of rows)

Document mapping patterns

CRUD operations with the Vertx reactive client for MongoDB

Save a new entity

Retrieve a single entity

Delete an entity

Retrieve many entities

Update an entity

Update using the save() method

Update using the updateCollection() method

How to manage bulk operations

Working with aggregation pipelines in Vertx applications

Chapter summary

Chapter 7. Making HTTP calls with the Vertx WebClient

How to execute requests without a body payload

How to execute requests with a body payload

Response predicates

Chapter summary

Chapter 8. Building REST APIs with Vertx

Make use of the Vertx web stack

The implementation of a CRUD REST service

An endpoint to create a new account

An endpoint to retrieve a single account

An endpoint to update an account

An endpoint to remove an account

An endpoint to retrieve a list of accounts

How to build a pagination for REST API in Vertx

Cross Origin Resource Sharing

Types of CORS requests

How to configure CORS with Vertx

A good error handling design

Chapter summary

Chapter 9. Dealing with file uploads in Vertx applications

An implementation of a file upload service component

Option A: store files in a local file system

Option B: store files on a FTP server

Option C: store files using a S3 compatible storage

An implementation of a file upload endpoint

Chapter summary

Chapter 10. Communication between application components in Vertx

An architecture of the io.vertx.core.eventbus.Eventbus

The Publisher component

The Bus component

The Message component

The Subscriber component

Implementations of standard communication paradigms in Vertx

The Broadcasting (Publish-subscribe) pattern

The Point to Point pattern

The Request-response pattern

Error handling mechanisms

The Dead Message pattern

The Invalid Message pattern

Chapter summary

Chapter 11. Authentication in Vertx applications

A concept of a token based authentication

Session tokens

Implementations of authentication features

Signup (Service)

Signup (Endpoint)

Login (Service)

Login (Endpoint)

Authenticate (Service)

Using the token based authentication with REST API

Testing

Chapter summary

Chapter 12. Architectural patterns for Vertx applications

Defining the application’s structure

How to use verticles?

Pattern 1. Using verticles as “applications”

Pattern 2. Using verticles as “proto” layers

Pattern 3. Using verticles as “proto” domains

Chapter summary

Chapter 13. Running single page apps on Vertx

On the frontend part (Vue + Vite)

Initialize a Vue 3 application

Set up a client side routing

Proxying API requests

On the backend part (Vertx)

Modify a build script

Serve the frontend from the WebVerticle component

Run the project

Chapter summary

Chapter 14. Deploying Vertx applications

Create fat jar applications

Use Docker with Vertx

Use Docker Compose with Vertx

Chapter summary

(Updated 12 July 2022)


About the Author

Yuri Mednikov’s avatar Yuri Mednikov

Yuri Mednikov (Iurii Mednikov) is a Java software engineer and, as truly passionate reactive programming advocate, Yuri Mednikov creates and shares more Vertx content than anyone else.

Logo white 96 67 2x

Publish Early, Publish Often

  • Path
  • There are many paths, but the one you're on right now on Leanpub is:
  • Principlesofvertx2 › Email Author › New
    • READERS
    • Newsletters
    • Weekly Sale
    • Monthly Sale
    • Store
    • Home
    • Redeem a Token
    • Search
    • Support
    • Leanpub FAQ
    • Leanpub Author FAQ
    • Search our Help Center
    • How to Contact Us
    • FRONTMATTER PODCAST
    • Featured Episode
    • Episode List
    • MEMBERSHIPS
    • Reader Memberships
    • Department Reader Memberships
    • Author Memberships
    • Your Membership
    • COMPANY
    • About
    • About Leanpub
    • Blog
    • Contact
    • Press
    • Essays
    • AI Services
    • Imagine a world...
    • Manifesto
    • More
    • Partner Program
    • Causes
    • Accessibility
    • AUTHORS
    • Write and Publish on Leanpub
    • Create a Book
    • Create a Bundle
    • Create a Course
    • Create a Track
    • Testimonials
    • Why Leanpub
    • Services
    • TranslateAI
    • TranslateWord
    • TranslateEPUB
    • PublishWord
    • Publish on Amazon
    • CourseAI
    • GlobalAuthor
    • Marketing Packages
    • IndexAI
    • Author Newsletter
    • The Leanpub Author Update
    • Author Support
    • Author Help Center
    • Leanpub Authors Forum
    • The Leanpub Manual
    • Supported Languages
    • The LFM Manual
    • Markua Manual
    • API Docs
    • Organizations
    • Learn More
    • Sign Up
    • LEGAL
    • Terms of Service
    • Copyright Policy
    • Privacy Policy
    • Refund Policy

*   *   *

Leanpub is copyright © 2010-2025 Ruboss Technology Corp.
All rights reserved.

This site is protected by reCAPTCHA
and the Google  Privacy Policy and  Terms of Service apply.

Leanpub requires cookies in order to provide you the best experience. Dismiss