Skip to content

Conversation

vietj
Copy link
Member

@vietj vietj commented Sep 5, 2025

Introduce QUIC server/client which can be used as basis for application protocols.

While the purpose is similar to NetClient/NetServer there are a few significant differences that would make the io.vertx.core.net API reuse.

  • QUIC mandates TLS and does not support TLS upgrade
  • QUIC requires to bind a physical UDP socket on client and server prior other interactions
  • QUIC provides connections multiplexing streams
  • A connection can be closed with a reason
  • Streams can be single duplex or full duplex
  • Server load balancing operates in a different fashion

Todo

  • endpoint metrics
  • server socket load balancing using port reuse
  • application integration API for both connection level and stream level
  • datagram
  • advanced configuration
  • flush strategy
  • token handler
  • connection id
  • stream reset
    • wiring
    • implement error code (requires contribution to Netty)
  • uni / bidi stream support
  • codegen
  • shutdown: stream/connection/endpoint
  • transport proxy
  • documentation
  • ...

@vietj vietj added this to the 5.1.0 milestone Sep 5, 2025
@vietj vietj self-assigned this Sep 5, 2025
@vietj vietj force-pushed the quic-refactoring branch 5 times, most recently from b995822 to 1675ba4 Compare September 10, 2025 14:55
@vietj vietj changed the title Extract specific TCP configuration in a TcpOptions class QUIC support Sep 10, 2025
@vietj vietj force-pushed the quic-refactoring branch 4 times, most recently from 9a84e2a to 20c87a8 Compare September 11, 2025 09:03
@vietj vietj force-pushed the quic-refactoring branch 10 times, most recently from 309c187 to 9ac3236 Compare September 17, 2025 21:19
Motivation:

TCPSSLOptions is an aggregate of state that carries TCP configuration (as the name says) among others.

In sight of having a NetServer being capable of using a QUIC transport, we should encapsulate the TCP portion of the state in a specific class.

Changes:

Extract the TCP portion of the TCPSSLOptions and NetworkOptions in a TcpOptions class as a transportOptions field, it is possible to get this field with a getter.

The TCPSSLOptions now delegates to the transportOptions field its getters/setters.

The Transport SPI is updated to only use the TcpOptions configuration.

The Transport SPI now only handle the TCP configuration and leaves the general channel config to the caller.
Motivation:

Our implementation has maintained a VertxSslContext wrapping an SslContext to configure a few aspects of the SSL engine. This does not seem necessary anymore since SslContext has all the necessary configuration options on the SslContextBuilder.

Changes:

Update the SslContextFactory to handle the configuration aspects VertxSslContext was implementing.

Remove VertxSslContext wrapper and configure the options instead on the SslContextFactory.
…nection

Motivation:

ConnectionBase carries a reason/timeout set of interactions for closing a connection that is superfluous for ConnectionBase since users of it are subclasseing VertxConnection.

We aim to have ConnectionBase more reusable and universal for non vertx based connections (such as HTTP/2) yet retain this for vertx based connections (HTTP/1.1, WebSocket).
Motivation:

Letting VertxConnection subclasses manage the shutdown handler gives more flexibility and is a concerned removed from the VertxConnection that focuses on its state management and control flow without caring about interactions.
…class.

Motivation:

Since only WebSocket use an effective close reason, we should move this generic part of the VertxConnection to WebSocketConnection implementation to simplify unclutter VertxConnection and keep it focus on its responsibitlies.
@vietj vietj force-pushed the quic-refactoring branch 2 times, most recently from cb07fb5 to a5658c9 Compare September 22, 2025 12:38
Motivation:

The VertxConnection relies on Netty channel close, instead it should be separate and keep channel close as short as possible.
…ionGroup class

Motivation:

NetServer and NetClient both combine a close sequence with a channel group to implement graceful shutdown of an endpoint.

We should encapsulate it to share the code between NetServer and NetClient and reuse it in Quic.
@vietj vietj force-pushed the quic-refactoring branch 3 times, most recently from eef66ea to a3a8965 Compare September 24, 2025 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant