Skip to content

Commit

Permalink
Fix occurences of "reactive" left-over after the removal of the React…
Browse files Browse the repository at this point in the history
…ive WebServer.

Fixes #7680

This changeset does not address all issues, a lot of the docs remain broken.

- Replaced io.helidon.reactive.webserver with io.helidon.webserver
- Replaced io.helidon.reactive.webserver.Routing with io.helidon.webserver.HttpRules
- Replaced io.helidon.reactive.webserver.Service with io.helidon.webserver.HttpService
- Replaced `public void routing(HttpRules rules) {` with `public void update(Routing.Rules rules) {`
- Removed WebServer Jersey documentation
- Removed Programmatic Media Support registration from the webserver docs
- Updated HashiCorp Vault docs to refresh snippets to not be reactive
- Replaced "Reactive Route" in MP server docs with "WebServer Route"
- Replaced "Reactive Service" in MP server docs with "HTTP Service"
  • Loading branch information
romain-grecourt committed Sep 28, 2023
1 parent 0650b0a commit fc20a22
Show file tree
Hide file tree
Showing 33 changed files with 449 additions and 842 deletions.
4 changes: 2 additions & 2 deletions docs/about/intro.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
* Upgraded MicroProfile support to MicroProfile 6 and Jakarta 10 Core Profile running on the Helidon N&iacute;ma WebServer. Learn more: <<Helidon MP, Helidon MP>>
* Java 21 is required to use Heldon 4.
* Java 21 is required to use Helidon 4.
== Helidon 4 WebServer
== Helidon 4 WebServer
Before Helidon 4, the Helidon WebServer was built on Netty and had a reactive API. In Helidon 4 we have replaced this with a new server implementation (Project N&iacute;ma) that is written from the ground up to take full advantage of Java 21's virtual threads. With virtual threads, threads are no longer a scarce resource to be carefully pooled and managed. Instead they are an abundant resource that can be created as needed to handle nearly unlimited concurrent requests.
Expand Down
15 changes: 7 additions & 8 deletions docs/includes/attributes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,13 @@ endif::[]
:http-javadoc-base-url: {javadoc-base-url}/io.helidon.http
:config-javadoc-base-url: {javadoc-base-url}/io.helidon.config
:configurable-javadoc-base-url: {javadoc-base-url}/apidocs/io.helidon.common.configurable
:faulttolerance-javadoc-base-url: {javadoc-base-url}/io.helidon.reactive.faulttolerance
:faulttolerance-javadoc-base-url: {javadoc-base-url}/io.helidon.faulttolerance
:grpc-server-javadoc-base-url: {javadoc-base-url}/io.helidon.grpc.server
:health-javadoc-base-url: {javadoc-base-url}/io.helidon.health.checks
:integration-oci-sdk-cdi-javadoc-base-url: {javadoc-base-url}/io.helidon.integrations.oci.sdk.cdi
:media-jsonp-javadoc-base-url: {javadoc-base-url}/io.helidon.reactive.media.jsonp
:media-jsonb-javadoc-base-url: {javadoc-base-url}/io.helidon.reactive.media.jsonb
:media-jackson-javadoc-base-url: {javadoc-base-url}/io.helidon.reactive.media.jackson
:media-jsonp-javadoc-base-url: {javadoc-base-url}/io.helidon.http.media.jsonp
:media-jsonb-javadoc-base-url: {javadoc-base-url}/io.helidon.http.media.jsonb
:media-jackson-javadoc-base-url: {javadoc-base-url}/io.helidon.http.media.jackson
:metrics-javadoc-base-url: {javadoc-base-url}/io.helidon.metrics.api
:metrics-mp-javadoc-base-url: {javadoc-base-url}/io.helidon.microprofile.metrics
:metrics-serviceapi-javadoc-base-url: {javadoc-base-url}/io.helidon.metrics.serviceapi
Expand All @@ -211,11 +211,10 @@ endif::[]
:scheduling-javadoc-base-url: {javadoc-base-url}/io.helidon.microprofile.scheduling
:security-integration-jersey-base-url: {javadoc-base-url}/io.helidon.security.integration.jersey
:security-integration-webserver-base-url: {javadoc-base-url}/io.helidon.security.integration.webserver
:webclient-javadoc-base-url: {javadoc-base-url}/io.helidon.reactive.webclient
:webserver-javadoc-base-url: {javadoc-base-url}/io.helidon.reactive.webserver
:webserver-jersey-javadoc-base-url: {javadoc-base-url}/io.helidon.reactive.webserver.jersey
:webclient-javadoc-base-url: {javadoc-base-url}/io.helidon.webclient
:webserver-javadoc-base-url: {javadoc-base-url}/io.helidon.webserver
:webserver-staticcontent-javadoc-base-url: {webserver-javadoc-base-url}.staticcontent
:webserver-cors-javadoc-base-url: {javadoc-base-url}/io.helidon.reactive.webserver.cors
:webserver-cors-javadoc-base-url: {javadoc-base-url}/io.helidon.webserver.cors
:graphql-javadoc-base-url: {javadoc-base-url}/io.helidon.graphql.server
:security-provider-oidc-base-url: {javadoc-base-url}/io.helidon.security.providers.oidc
:security-provider-httpauth-base-url: {javadoc-base-url}/io.helidon.security.providers.httpauth
Expand Down
6 changes: 3 additions & 3 deletions docs/includes/cors.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ the following dependency in your project:
Support in Helidon for CORS configuration uses two closely-related cross-origin configuration formats: basic and mapped.
Each format corresponds to a class
in the Helidon CORS library.
The basic format corresponds to the link:{webserver-cors-javadoc-base-url}/io/helidon/reactive/webserver/cors/CrossOriginConfig.html[`CrossOriginConfig`]
The basic format corresponds to the link:{webserver-cors-javadoc-base-url}/io/helidon/cors/CrossOriginConfig.html[`CrossOriginConfig`]
class, and the mapped format corresponds to the
link:{webserver-cors-javadoc-base-url}/io/helidon/reactive/webserver/cors/MappedCrossOriginConfig.html[`MappedCrossOriginConfig`] class.
link:{webserver-cors-javadoc-base-url}/io/helidon/cors/MappedCrossOriginConfig.html[`MappedCrossOriginConfig`] class.
//end::cors-configuration-formats-intro[]
//tag::basic-cross-origin-config[]
Expand Down Expand Up @@ -239,7 +239,7 @@ the top-level resource in the app (the `path-pattern` key and value).
<6> Begins the basic CORS config section for `/`; it permits sharing of resources at the top-level path with all origins
for the indicated HTTP methods.
Path patterns can be any expression accepted by the link:{webserver-javadoc-base-url}/io/helidon/reactive/webserver/PathMatcher.html[`PathMatcher`] class.
Path patterns can be any expression accepted by the link:{webserver-javadoc-base-url}/io/helidon/webserver/PathMatcher.html[`PathMatcher`] class.
NOTE: Be sure to arrange the entries in the order that you want Helidon to check them.
Helidon CORS support searches the cross-origin entries in the order you define them until it finds an entry that
Expand Down
4 changes: 2 additions & 2 deletions docs/includes/security/helidon-endpoints.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2020, 2022 Oracle and/or its affiliates.
Copyright (c) 2020, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,7 +29,7 @@ There are several endpoints provided by Helidon services, such as:
- OpenAPI endpoint (`/openapi`)
- Configured static content (can use any path configured)
These endpoints are all implemented using Helidon reactive WebServer and as such
These endpoints are all implemented using Helidon WebServer and as such
can be protected only through Security integration with WebServer.
The following section describes configuration of such protection using configuration files,
Expand Down
2 changes: 1 addition & 1 deletion docs/mp/cors/cors.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ The index `_i_` is an integer (0, 1, 2, etc.).
The system uses the index `_i_`, not the position in the config file, to identify the settings for a particular resource.
Path patterns can be any expression accepted by the link:{webserver-javadoc-base-url}/io/helidon/reactive/webserver/PathMatcher.html[`PathMatcher`] class.
Path patterns can be any expression accepted by the link:{webserver-javadoc-base-url}/io/helidon/webserver/PathMatcher.html[`PathMatcher`] class.
NOTE: Helidon scans the cross-origin entries in index order (0, 1, 2, etc.) until it finds an entry that
matches an incoming request's path and HTTP method, so be sure to assign index values to the entries so Helidon will check them in the order you want. In particular, use lower index values for entries with more specific path patterns.
Expand Down
6 changes: 3 additions & 3 deletions docs/mp/guides/mp-tutorial.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -660,15 +660,15 @@ Rebuild and run the application and notice the new logging format takes effect.
.Log output
----
// before
Aug 22, 2019 11:10:11 AM io.helidon.reactive.webserver.NettyWebServer lambda$start$8
Aug 22, 2019 11:10:11 AM io.helidon.webserver.LoomWebServer lambda$start$8
INFO: Channel '@default' started: [id: 0xd0afba31, L:/0:0:0:0:0:0:0:0:8080]
Aug 22, 2019 11:10:11 AM io.helidon.microprofile.server.ServerImpl lambda$start$10
INFO: Server started on http://localhost:8080 (and all other host addresses) in 182 milliseconds.
http://localhost:8080/greet
// after
2019.08.22 11:24:42 INFO io.helidon.reactive.webserver.NettyWebServer Thread[main,5,main]: Version: 1.2.0
2019.08.22 11:24:42 INFO io.helidon.reactive.webserver.NettyWebServer Thread[nioEventLoopGroup-2-1,10,main]: Channel '@default' started: [id: 0x8f652dfe, L:/0:0:0:0:0:0:0:0:8080]
2019.08.22 11:24:42 INFO io.helidon.webserver.LoomServer Thread[main,5,main]: Version: 1.2.0
2019.08.22 11:24:42 INFO io.helidon.webserver.LoomServer Thread[nioEventLoopGroup-2-1,10,main]: Channel '@default' started: [id: 0x8f652dfe, L:/0:0:0:0:0:0:0:0:8080]
2019.08.22 11:24:42 INFO io.helidon.microprofile.server.ServerImpl Thread[nioEventLoopGroup-2-1,10,main]: Server started on http://localhost:8080 (and all other host addresses) in 237 milliseconds.
http://localhost:8080/greet
----
Expand Down
12 changes: 6 additions & 6 deletions docs/mp/guides/se-services.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2020, 2022 Oracle and/or its affiliates.
Copyright (c) 2020, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -17,7 +17,7 @@
///////////////////////////////////////////////////////////////////////////////
= Reusing Helidon SE services
:description: Helidon Reactive Routing
:description: Helidon WebServer Routing
:keywords: helidon, guide, routing
:rootdir: {docdir}/../..
Expand All @@ -31,21 +31,21 @@ For this 10 minute tutorial, you will need the following:
include::{rootdir}/includes/prerequisites.adoc[tag=prerequisites]
Helidon MP supports xref:../server.adoc[Reactive routing] which brings possibility for reusing
`io.helidon.reactive.webserver.Service` implementations in Helidon MP. Such feature can be quite useful for common
Helidon MP supports xref:../server.adoc[WebServer routing] which brings possibility for reusing
`io.helidon.webserver.HttpService` implementations in Helidon MP. Such feature can be quite useful for common
solutions for filtering, auditing, logging or augmenting REST endpoints in hybrid Helidon SE/MP environment.
Let's define simple Helidon SE Service for adding special header to every REST response:
[source,java]
----
public class CoolingService implements Service, Handler {
public class CoolingService implements HttpService, Handler {
public static final String COOL_HEADER_NAME = "Cool-Header";
public static final String COOLING_VALUE = "This is way cooler response than ";
@Override
public void update(Routing.Rules rules) {
public void routing(HttpRules rules) {
rules.any(this);
}
Expand Down
6 changes: 3 additions & 3 deletions docs/mp/integrations/hcv.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2021, 2022 Oracle and/or its affiliates.
Copyright (c) 2021, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,7 +35,8 @@ include::{rootdir}/includes/mp.adoc[]
== Overview
HashiCorp Vault is a commonly used Vault in many microservices. The APIs are REST-based and Helidon implements them using reactive client.
HashiCorp Vault is a commonly used Vault in many microservices. The APIs are REST-based and Helidon implements them using
xref:{webclient-page}[WebClient].
include::{rootdir}/includes/dependencies.adoc[]
Expand Down Expand Up @@ -111,7 +112,6 @@ The following classes can be injected into any CDI bean (if appropriate module i
* K8sAuth - Kubernetes authentication method (management operations)
* TokenAuth - Token authentication method (management operations)
* Sys - System operations (management of Vault - enabling/disabling secret engines and authentication methods)
* *Rx - reactive counterparts to the classes defined above, usually not recommended in CDI, as it is a blocking environment
In addition to these features, Vault itself can be authenticated as follows:
Expand Down
2 changes: 1 addition & 1 deletion docs/mp/jaxrs/jaxrs-applications.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ is provided via the `ServerRequest` 's context object as shown next.
[source,java]
----
import io.helidon.reactive.webserver.ServerRequest;
import io.helidon.webserver.ServerRequest;
@Path("myresource")
public class MyResource {
Expand Down
20 changes: 10 additions & 10 deletions docs/mp/server.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ as is done in the xref:guides/quickstart.adoc[Helidon MP Quickstart example]. No
include::{rootdir}/config/io_helidon_microprofile_server_Server.adoc[leveloffset=+1,tag=config]
The following table provides a brief description of routing annotations, including its parameters. More information
in `Configuring a reactive route` section.
in `Configuring a WebServer route` section.
[cols="3,5", role="flex, sm10"]
|===
Expand Down Expand Up @@ -222,12 +222,12 @@ health:
routing: "admin"
----
=== Configuring A Reactive Route
=== Configuring A WebServer Route [[
Helidon MP Server will pick up CDI beans that implement the `io.helidon.reactive.webserver.Service`
Helidon MP Server will pick up CDI beans that implement the `io.helidon.webserver.HttpService`
interface and configure them with the underlying WebServer.
This allows configuration of reactive routes to run alongside a JAX-RS application.
This allows configuration of WebServer routes to run alongside a JAX-RS application.
The bean is expected to be either `ApplicationScoped` or `Dependent` and will be requested
only once during the boot of the `Server`.
Expand All @@ -236,17 +236,17 @@ The bean will support injection of `ApplicationScoped` and `Dependent` scoped be
You cannot inject `RequestScoped` beans. Please use WebServer features to handle request
related objects.
==== Customizing the reactive service
==== Customizing the HTTP service
The service can be customized using annotations and/or configuration to be
- registered on a specific path
- registered with a named routing
==== Assigning a reactive service to named ports
==== Assigning an HTTP service to named ports
Helidon has the concept of named routing. These correspond to the named ports
configured with WebServer.
You can assign a reactive service to a named routing (and as a result to a named port) using
You can assign an HTTP service to a named routing (and as a result to a named port) using
either an annotation or configuration (or both to override the value from annotation).
===== Annotation `@RoutingName` [[annotation-routing-name]]
Expand All @@ -263,7 +263,7 @@ The annotation has two attributes:
@ApplicationScoped
@RoutingName(value="admin", required="true")
@RoutingPath("/admin")
public class AdminService implements Service {
public class AdminService implements HttpService {
}
----
Expand All @@ -287,7 +287,7 @@ io.helidon.examples.AdminService:
required: false
----
==== Configuring a reactive service path
==== Configuring an HTTP service path
Each service is registered on a path. If none is configured, then the service would be
configured on the root path.
Expand All @@ -300,7 +300,7 @@ You can configure `@RoutingPath` to define the path a service is registered on.
===== Configuration override of routing path
For each reactive service class you can define the routing path by specifying a configuration
For each HTTP service class you can define the routing path by specifying a configuration
option `class-name.routing-path.path`.
Example (YAML) configuration for a class `io.helidon.example.AdminService` that changes the
Expand Down
9 changes: 1 addition & 8 deletions docs/se/dbclient.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ include::{rootdir}/includes/se.adoc[]
== Overview
The Helidon SE DB Client provides a unified, reactive API for working with databases in non-blocking way.
The Helidon SE DB Client provides a unified API for working with databases.
include::{rootdir}/includes/dependencies.adoc[]
Expand Down Expand Up @@ -88,13 +88,6 @@ different databases on different environments without changing code.
Thanks to the statement configuration abstraction, we can invoke a statement against a relational
or non-relations databases (such as MySQL and MongoDB) without modifying source code
* Reactive database access with backpressure
+
Current we support natively reactive driver for MongoDB, and an executor service wrapped
support for any JDBC driver.
This allows for seamless use of JDBC drivers in a reactive non-blocking environment, including support
for backpressure (result set is processed as requested by the query subscriber)
* Observability +
+
The API offers support for health checks, metrics and tracing.
Expand Down
21 changes: 8 additions & 13 deletions docs/se/guides/dbclient.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,15 @@ include::{rootdir}/includes/prerequisites.adoc[tag=prerequisites]
== Introduction
The Helidon DB Client simplifies how you work with databases in reactive applications. It provides a unified,
reactive API for working with databases in a non-blocking way. Helidon team constantly updates this API in order
to make it more user-friendly and efficient. For this matter, it is recommended to use the latest helidon version.
The Helidon DB Client provides a unified API for working with databases.
=== Main Features
The main features of Helidon DB Client are:
* *Unified API for data access and query*:
The API was implemented as a layer above JDBC or MongoDB Reactive Streams Java Driver, so any relational databases
The API was implemented as a layer above JDBC or MongoDB Java Driver, so any relational databases
with JDBC driver or MongoDB are supported.
* *Reactive database access with non-reactive drivers*:
Most JDBC drivers are blocking. Using them in a reactive application is problematic. Helidon DB Client allows the use
of blocking JDBC drivers in your reactive application by wrapping a blocking driver in an executor service.
* *Observability*:
Support for health checks, metrics and tracing.
* *Backpressure*:
Expand Down Expand Up @@ -120,9 +115,9 @@ A database stores the books from the library. H2 is a java SQL database that is
If H2 is not installed on your machine, here are few steps to quickly download and set it up:
1. Download the latest H2 version from the official website: https://www.h2database.com/html/main.html
* Note: Windows operating system users can download the Windows Installer.
2. Unzip the downloaded file into your directory.
* Only the h2-\{latest-version}.jar, located in the h2/bin folder, will be needed.
Expand Down Expand Up @@ -343,12 +338,12 @@ package io.helidon.examples.quickstart.se;
import io.helidon.http.Http; // <1>
import io.helidon.dbclient.DbClient;
import io.helidon.webserver.Routing;
import io.helidon.webserver.HttpRules;
import io.helidon.webserver.ServerRequest;
import io.helidon.webserver.ServerResponse;
import io.helidon.webserver.Service;
public class LibraryService implements Service {
public class LibraryService implements HttpService {
private final DbClient dbClient; // <2>
Expand All @@ -368,7 +363,7 @@ It defines application endpoints and Http request which can be reached by client
.Add update method to LibraryService
----
@Override
public void update(Routing.Rules rules) {
public void routing(HttpRules rules) {
rules
.get("/{name}", this::getBook) // <1>
.put("/{name}", this::addBook) // <2>
Expand All @@ -381,7 +376,7 @@ public void update(Routing.Rules rules) {
<3> Remove a book from the library.
<4> Return the book information in Json format.
To summarize, there is one endpoint that can manipulate books.
To summarize, there is one endpoint that can manipulate books.
The number of endpoints and application
features can be changed from these rules by creating or modifying methods. `\{name}` is a path parameter for the book
name. The architecture of the application is defined, so the next step is to create these features.
Expand Down
Loading

0 comments on commit fc20a22

Please sign in to comment.