Add capability of generating native binaries using GraalVM based on v8.2.0#4325
Open
Alessandro Vermeulen (spockz) wants to merge 5 commits into
Open
Add capability of generating native binaries using GraalVM based on v8.2.0#4325Alessandro Vermeulen (spockz) wants to merge 5 commits into
Alessandro Vermeulen (spockz) wants to merge 5 commits into
Conversation
…ge class to re-use the original published jar because of versions mismatch between project (containing -0 suffix) and the published version without.
|
Please sign the Contributor License Agreement here before this PR can be approved. |
There was a problem hiding this comment.
Duplicated version and stale variant from the one in package-schema-registry. See open questions in PR.
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <?xml version="1.0" encoding="UTF-8" ?> |
There was a problem hiding this comment.
Silly auto formatting, sorry.
friend Claude Opus 4.8 in lieu of just enabling all providers since that is a deprecated option.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
We very frequently spin up fresh environments for exhaustive testing. This environment contains the schema registry. Currently, the docker image of the schema registry is too big which causes slow downloads and reasonably slow in starting up. We are reducing the download footprint and CPU footprint by compiling our Java apps to native binaries using GraalVM so lets also give Schema Registry the same treatment.
What
I've changed the packaging of the schema registry to also support compiling into a native binary. The configuration of initialization at runtime vs at build time is taken from running with 8.2.0. The reachability information is taken from running 8.2.0 in a live setting with the GraalVM agent enabled and capturing reflection uses etc.
Result
The docker image can be significantly reduced to 214MiB and startup time is reduced to 1s. Memory usage is not tested.
Checklist
Please answer the questions with Y, N or N/A if not applicable.
./mvnw clean package -Pstandalone,native -pl package-schema-registry.References
JIRA: ???
Test & Review
The repository for building the images contains a docker-compose.yaml to run a locally generated binary image.
We also rand and used this image in our local testing environment succesfully.
Open questions / Follow-ups
native-image.properties?core/src/main/resources/META-INF/nativeor in the package repository?