Skip to content

Instantly share code, notes, and snippets.

View vietj's full-sized avatar
🤖
Coding the Future

Julien Viet vietj

🤖
Coding the Future
View GitHub Profile
@vietj
vietj / write-result.md
Created November 4, 2026 21:17
WriteResult: the journey

WriteResult: the journey

The story of the per-write back-pressure contribution (PR #6462, branch message-write-cont): the steps, the doubts, the dead ends, and how Julien and Claude converged on the design. Companion to the design record write-result.md, which holds the full algorithm, correctness proof and contracts — this document tells how they came to be.

Prologue: an API at the end of its road

WriteStream's flow control — writeQueueFull() polling plus a single drainHandler slot — dates from Vert.x's beginnings and is a direct transcription of Node.js's streams design, where write() reports the high-water mark being crossed and the writer waits for the 'drain' event. That model is honest in Node, where a single thread makes the poll and the event trivially consistent. Transplanted into Vert.x's multi-threaded world, it acquired structural limits that no implementation can fix from below.

The poll reads live state

Incomplete SSL context cache key, leading to client SSL context property mismatch - CVE-2026-102476

In Eclipse Vert.x versions [5.0.0,5.0.12] or [5.1.0,5.1.9] or [5.2.0, 5.2.0], the Vert.x HTTP client relies on an SSL context for efficiency purpose, the key of this cache should reflect entirely the SSL semantics of the desired SSL properties. It is possible for a client to ask for an SSL context and obtain an SSL context with weaker properties, for instance a context with hostname validation and obtain a context ignoring hostname validation.

ChainAuthHandler bypasses scope checks on pre-authenticated users - CVE-2026-102460

@vietj
vietj / grpc-over-vertx-event-bus.txt
Created July 20, 2026 19:34
Claude generated RFC for gRPC over Vert.x Event Bus
gRPC / Vert.x Event Bus Vert.x gRPC Project
Internet-Draft Eclipse Vert.x
Intended status: Experimental 20 July 2026
Expires: 21 January 2027
gRPC Transport over the Vert.x Event Bus
draft-vertx-grpc-eventbus-transport-00
Abstract

Writing QUIC servers and clients

Vert.x allows you to easily write non-blocking QUIC clients and servers.

Configuration of native dependency

The implementation of QUIC relies on Netty and QUICHE, a savoury implementation of QUIC which requires native dependencies depending on OS/platform selection.

You need to add the following dependency:

Writing HTTP servers and clients

Vert.x allows you to easily write non-blocking HTTP clients and servers.

Vert.x supports the HTTP/1.0, HTTP/1.1, HTTP/2 and HTTP/3 protocols.

The base API for HTTP is the same for HTTP/1.x, HTTP/2 and HTTP/3, specific API features are available for dealing with the protocol peculiarities.

Creating an HTTP Server

package io.vertx.tests.vertx;
import io.vertx.test.core.AsyncTestBase;
import org.junit.Test;
import java.util.*;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
package io.vertx.ext.web.codec.sse;
import io.vertx.codegen.annotations.Nullable;
import io.vertx.core.Future;
import io.vertx.core.Handler;
import io.vertx.core.Promise;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.streams.ReadStream;
import io.vertx.core.streams.WriteStream;
import io.vertx.ext.web.codec.BodyCodec;
package io.vertx.core;
import io.netty.channel.EventLoop;
import io.vertx.core.internal.ContextInternal;
import io.vertx.core.internal.VertxInternal;
public class Main {
public static void main(String[] args) {
[INFO] Waiting until Deployment 98d775f6-a276-42ed-af47-7e70e196d924 is validated
[ERROR]
Deployment 98d775f6-a276-42ed-af47-7e70e196d924 failed
pkg:maven/io.vertx/vertx-codegen-json@5.0.0.CR8:
- Dependency version information is missing
- Developers information is missing
- License information is missing
- Project URL is not defined
- Project description is missing

Proto centric

Given

service Greeter {
  rpc sayHello(HelloRequest) returns (HelloResponse);
}