Skip to content

Commit

Permalink
Reorg
Browse files Browse the repository at this point in the history
  • Loading branch information
vietj committed Dec 17, 2024
1 parent e6ab599 commit 626dc25
Showing 1 changed file with 107 additions and 107 deletions.
214 changes: 107 additions & 107 deletions src/main/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,113 @@ We borrow terminology from this https://github.com/tfesenko/Java-Modules-JPMS-Ch

Most {VertX} components support level 3 (according to the maturity model) and explicit modules, however a few modules have been left aside, due to constraints preventing proper modularity to happen, often due to a faulty dependency, e.g. a split package.

== Native transports

Native transports are supported.

The module `io.netty.transport.classes.${native.detected.transport}` is required as it contains the transport classes.

The module `io.netty.transport.${native.transport}.${os.name}.${os.detected.arch}` contains the native library and its presence is only required at runtime.

You can add them to the JVM launch command with `--add-modules --add-modules io.netty.transport.classes.${native.transport},io.netty.transport.${native.transport}.${os.detected.name}.${os.detected.arch}`.

Alternatively you can also add them to your module descriptor (even though your application does not use them) which usually triggers tools to add them automatically at runtime, however this binds your module to a specific os/architecture:

[source,java]
----
// Add to module-info.java
requires io.netty.transport.classes.kqueue;
requires io.netty.transport.kqueue.osx.aarch_64;
----

You can find an https://github.com/vert-x3/vertx-examples/tree/5.x/jpms-examples#native-transports[example with OpenSSL] among {VertX} JPMS examples.

== OpenSSL

OpenSSL is supported.

The module `io.netty.tcnative.classes.openssl` is required as it contains the OpenSSL Netty classes.

The module `io.netty.internal.tcnative.openssl.${os.detected.name}.${os.detected.arch}` contains the native library and its presence is only required at runtime.

You can add them to the JVM launch command with `--add-modules io.netty.transport.classes.${native.transport},io.netty.transport.${native.transport}.${os.detected.name}.${os.detected.arch}`.

Alternatively you can also add them to your module descriptor (even though your application does not use them) which usually triggers tools to add them automatically at runtime, however this binds your module to a specific os/architecture:

[source,java]
----
// Add to your module-info.java
requires io.netty.tcnative.classes.openssl;
requires io.netty.internal.tcnative.openssl.osx.aarch_64;
----

You can find an https://github.com/vert-x3/vertx-examples/tree/5.x/jpms-examples#open-ssl[example with OpenSSL] among {VertX} JPMS examples.

== HTTP Compression

{VertX} supports _gzip_ and _deflate_ algorithms out of the box, however _brotli_ and _zstd_ algorithms requires you to respectively add the following dependencies:

- Brotli: `com.aayushatharva.brotli4j:brotli4j`
- Zstd: `com.github.luben:zstd-jni`

These dependencies are optional since not everyone need them and when used, they are required at runtime instead of compile time.

You can add them to the JVM launch command with `--add-modules com.aayushatharva.brotli4j,com.github.luben.zstd_jni`.

Alternatively you can also add them to your module descriptor (even though your application does not use them) which usually triggers tools to add them automatically at runtime.

[source,java]
----
// Add to your module-info.java
requires com.aayushatharva.brotli4j;
requires com.github.luben.zstd_jni;
----

You can find an https://github.com/vert-x3/vertx-examples/tree/5.x/jpms-examples#http-compression[example with Brotli] among {VertX} JPMS examples.

== Code generation

Code generation of a modular application is supported.

The following module are available for applications:

|===
|Artifact ID|Module name|Description
|_vertx-codegen-api_
|`io.vertx.codegen.api`
|Codegen annotations, e.g. `io.vertx.codegen.annotations.DataObject`
|_vertx-codegen-json_
|`io.vertx.codegen.json`
|JSON generator API, e.g. `io.vertx.codegen.json.JsonGen`
|===

Your application requires these components on the module path.

The {VertX} 4 `vertx-codegen` component has been split between

- `vertx-codegen-processor` contains the annotation processor only necessary to the Java compiler
- `vertx-codegen-api` contains the annotations
- `vertx-codegen-json` contains the json generator

`vertx-codegen` still exists for backward compatibility purpose, feel free to use it or use finer grained dependencies.

=== Service proxy generation

Here is the bare minimum required by your module to generate a service proxy.

[source,java]
----
// Service proxy
requires static io.vertx.codegen.api;
requires static io.vertx.codegen.json;
----

You can find the https://github.com/vert-x3/vertx-examples/tree/5.x/jpms-examples#service-proxy[service proxy example] among our set of examples.

=== Sql Client Template generation

Todo (needs https://github.com/vert-x3/vertx-examples/pull/474/files)

== Components

=== Core
Expand Down Expand Up @@ -476,110 +583,3 @@ NOTE: multicast join is not supported on the module path on macOS, instead Hazel
|`io.vertx.httpproxy`
|explicit
|===

== Native transports

Native transports are supported.

The module `io.netty.transport.classes.${native.detected.transport}` is required as it contains the transport classes.

The module `io.netty.transport.${native.transport}.${os.name}.${os.detected.arch}` contains the native library and its presence is only required at runtime.

You can add them to the JVM launch command with `--add-modules --add-modules io.netty.transport.classes.${native.transport},io.netty.transport.${native.transport}.${os.detected.name}.${os.detected.arch}`.

Alternatively you can also add them to your module descriptor (even though your application does not use them) which usually triggers tools to add them automatically at runtime, however this binds your module to a specific os/architecture:

[source,java]
----
// Add to module-info.java
requires io.netty.transport.classes.kqueue;
requires io.netty.transport.kqueue.osx.aarch_64;
----

You can find an https://github.com/vert-x3/vertx-examples/tree/5.x/jpms-examples#native-transports[example with OpenSSL] among {VertX} JPMS examples.

== OpenSSL

OpenSSL is supported.

The module `io.netty.tcnative.classes.openssl` is required as it contains the OpenSSL Netty classes.

The module `io.netty.internal.tcnative.openssl.${os.detected.name}.${os.detected.arch}` contains the native library and its presence is only required at runtime.

You can add them to the JVM launch command with `--add-modules io.netty.transport.classes.${native.transport},io.netty.transport.${native.transport}.${os.detected.name}.${os.detected.arch}`.

Alternatively you can also add them to your module descriptor (even though your application does not use them) which usually triggers tools to add them automatically at runtime, however this binds your module to a specific os/architecture:

[source,java]
----
// Add to your module-info.java
requires io.netty.tcnative.classes.openssl;
requires io.netty.internal.tcnative.openssl.osx.aarch_64;
----

You can find an https://github.com/vert-x3/vertx-examples/tree/5.x/jpms-examples#open-ssl[example with OpenSSL] among {VertX} JPMS examples.

== HTTP Compression

{VertX} supports _gzip_ and _deflate_ algorithms out of the box, however _brotli_ and _zstd_ algorithms requires you to respectively add the following dependencies:

- Brotli: `com.aayushatharva.brotli4j:brotli4j`
- Zstd: `com.github.luben:zstd-jni`

These dependencies are optional since not everyone need them and when used, they are required at runtime instead of compile time.

You can add them to the JVM launch command with `--add-modules com.aayushatharva.brotli4j,com.github.luben.zstd_jni`.

Alternatively you can also add them to your module descriptor (even though your application does not use them) which usually triggers tools to add them automatically at runtime.

[source,java]
----
// Add to your module-info.java
requires com.aayushatharva.brotli4j;
requires com.github.luben.zstd_jni;
----

You can find an https://github.com/vert-x3/vertx-examples/tree/5.x/jpms-examples#http-compression[example with Brotli] among {VertX} JPMS examples.

== Code generation

Code generation of a modular application is supported.

The following module are available for applications:

|===
|Artifact ID|Module name|Description
|_vertx-codegen-api_
|`io.vertx.codegen.api`
|Codegen annotations, e.g. `io.vertx.codegen.annotations.DataObject`
|_vertx-codegen-json_
|`io.vertx.codegen.json`
|JSON generator API, e.g. `io.vertx.codegen.json.JsonGen`
|===

Your application requires these components on the module path.

The {VertX} 4 `vertx-codegen` component has been split between

- `vertx-codegen-processor` contains the annotation processor only necessary to the Java compiler
- `vertx-codegen-api` contains the annotations
- `vertx-codegen-json` contains the json generator

`vertx-codegen` still exists for backward compatibility purpose, feel free to use it or use finer grained dependencies.

=== Service proxy generation

Here is the bare minimum required by your module to generate a service proxy.

[source,java]
----
// Service proxy
requires static io.vertx.codegen.api;
requires static io.vertx.codegen.json;
----

You can find the https://github.com/vert-x3/vertx-examples/tree/5.x/jpms-examples#service-proxy[service proxy example] among our set of examples.

=== Sql Client Template generation

Todo (needs https://github.com/vert-x3/vertx-examples/pull/474/files)

0 comments on commit 626dc25

Please sign in to comment.