Reactive Endpoints with Quarkus on OpenShift
  • README
  • Setup the IBM Cloud Environment
    • Overview
    • Access the Cluster
    • Access IBM Cloud Shell
  • Setup the sample application
    • Exercise 1 - Deploy the example application via one script
    • YouTube - How to setup the sample application (optional)
  • Build a new version of the Microservice
    • Exercise 1 - Develop reactive Endpoints
    • Exercise 2 - Invoke Endpoints reactively
    • Exercise 3 - Deploy Service to OpenShift
    • Exercise 4 (optional) - Use distributed Logging
  • YouTube Videos related to the Exercises
    • Exercise 1 - Develop reactive Endpoints (optional)
    • Exercise 2 - Invoke Endpoints reactively (optional)
    • Exercise 3 - Deploy Service to OpenShift (optional)
    • Exercise 4 - Use distributed Logging (optional)
  • Additional Resources
    • Blog posts related to reactive
    • Workshop: Reactive Messaging with Quarkus on OpenShift
    • Cloud-Native-Starter project
    • Cloud-Native-Starter project reactive
  • Known Issues
    • Quarkus needs Apache Maven 3.6.2+
Powered by GitBook
On this page
  • Architecture
  • Estimated time and level
  • Objectives
  • About this workshop
  • Agenda
  • Compatibility
  • Technology Used
  • Credits
  • Additional resources

Was this helpful?

README

NextOverview

Last updated 4 years ago

Was this helpful?

In this workshop you'll learn how to implement reactive endpoints with Java, and . An end-to-end sample application will be deployed to .

The code is available as open source as part of the project.

One key benefit of reactive systems and reactive REST endpoints is efficiency. This workshop describes how to use reactive systems and reactive programming to achieve faster response times. Especially in public clouds where costs depend on CPU, RAM and compute durations this model saves money.

The workshop uses a sample application to demonstrate reactive functionality. The sample application displays links to articles and author information.

The sample contains a 'Web-API' service with two versions of the endpoint '/articles', one uses imperative code, the other one reactive code. In this workshop you'll re-implement a simplified version of the reactive version yourselves.

The reactive stack of this sample provides response times that take less than half of the time compared to the imperative stack:

Reactive

Imperative

793 ms

1956 ms

If you want to know more details, you can read the of the performance tests.

Architecture

The following architecture diagrams do explain the complete flow the sample application.

  • The 'API Client' invokes the 'Web-API' service which implements a backend-for-frontend pattern.

  • The 'Web-API' service invokes the two microservices 'Authors' and 'Articles'. The 'Articles' service reads data from Postgres.

Note that in this workshop you will deploy the full application as described in the previous diagram. But to simplify the workshop you'll re-implement a simpler version of the 'Web-API' service which only invokes the 'Articles' service.

Estimated time and level

Time

Level

one hour

beginners

Objectives

After you complete this workshop, you'll understand the following reactive functionality:

  • Reactive REST endpoints via CompletionStage

  • Exception handling in chained reactive invocations

  • Timeouts via CompletableFuture

  • Reactive REST invocations via MicroProfile REST Client

The intention of this workshop is not to explain every aspect of reactive programming, but to explain core reactive principles and to deploy a complete reactive application which you can inspect after the workshop in more detail.

About this workshop

The introductory page of the workshop is broken down into the following sections:

Agenda

These are the labs of this workshop, go through all of them in sequence, start with `Pre work:

Create your Cloud Environment

Deploy the example application via script

Develop reactive Endpoints

Invoke Endpoints reactively

Deploy Service to OpenShift

Use distributed Logging

Compatibility

This workshop has been tested on the following platforms:

  • IBM Open Shift: version 4.3

  • IBM Cloud Shell: beta

Technology Used

Credits

Additional resources

The as well as the describe the functionality in more detail.

There is a second workshop which uses the same sample application. That workshop is called and it focusses on messaging with Kafka.

Jakarta EE
MicroProfile
Quarkus
Apache Kafka
PostgresSQL
RedHat OpenShift
Microservices architecture
Vue.js
Niklas Heidloff
Harald Uebele
Thomas Südbröcker
blogs
presentation
Reactive Messaging with Quarkus on OpenShift
Agenda
Compatibility
Technology Used
Credits
What`s next?
Pre work
Deploy application
Exercise 1
Exercise 2
Exercise 3
Exercise 4
Quarkus
MicroProfile
Red Hat OpenShift
Cloud Native Starter
documentation
Full Architecture
Simplified Architecture