Go to file
Chris Vest 1b65bf9a23 Make the incubating buffers exposable as ByteBuf
Motivation:
This makes it possible to use the new buffer API in Netty as is.

Modification:
Make the MemSegBuffer implementation class implement AsByteBuf and ReferenceCounted.
The produced ByteBuf instance delegates all calls to the underlying Buffer instance as faithfully as possible.
One area where the two deviates, is that it's not possible to create non-retained duplicates and slices with the new buffer API.

Result:
It is now possible to use the new buffer API on both client and server side.
The Echo* examples demonstrate this, and the EchoIT proves it with a test.
The API is used more directly on the client side, since the server-side allocator in Netty does not know how to allocate buffers with the incubating API.
2021-03-01 10:49:09 +01:00
.github/workflows Capture build artifacts for failed builds 2020-12-01 14:38:09 +01:00
src Make the incubating buffers exposable as ByteBuf 2021-03-01 10:49:09 +01:00
.dockerignore Add a docker-based build 2020-11-18 17:16:37 +01:00
.gitignore Prepare incubator repo for new buffer API 2020-11-17 14:56:28 +01:00
Dockerfile Try a different caching mechanism 2020-11-21 15:26:10 +01:00
Makefile The make clean command now also cleans up after failed build commands 2020-12-11 12:10:04 +01:00
pom.xml Make the incubating buffers exposable as ByteBuf 2021-03-01 10:49:09 +01:00
README.md Readme file updates 2021-01-05 12:51:17 +01:00

Netty Incubator Buffer API

This repository is incubating a new buffer API proposed for Netty 5.

Building and Testing

Short version: just run make.

The project currently relies on snapshot versions of the Panama Foreign fork of OpenJDK. This allows us to test out the most recent version of the jdk.incubator.foreign APIs, but also make building, and local development more involved. To simplify things, we have a Docker based build, controlled via a Makefile with the following commands:

  • image build the docker image. This includes building a snapshot of OpenJDK, and download all relevant Maven dependencies.
  • test run all tests in a docker container. This implies image. The container is automatically deleted afterwards.
  • dbg drop into a shell in the build container, without running the build itself. The debugging container is not deleted afterwards.
  • clean remove the leftover containers created by dbg, test, and build.
  • build build binaries and run all tests in a container, and copy the target directory out of the container afterwards. This is the default build target.