Comments (12)
Just a note. This is also happening on baremetal. You can check it with provided reproducer by running mvn clean verify -Dnative
mvn install -Dnative
./target/reproducer-with-quarkus-1.0.0-SNAPSHOT-runner
- Go to http://127.0.0.1:8080/compression/text and see quarkus log
from quarkus.
Here is a working example, tested with Quarkus 3.10.0 on Linux aarch64 (see README.md) and Linux amd64, using Mandrel native-image, Mandrel-23.1.3.1-Final (JDK 21.0.3+9-LTS).
See:
https://github.com/Karm/dev-null/tree/main/brotli4j-native
The example is heavily simplified version of your original reproducer, because the issue has nothing to do with either OpenShift or some other dependencies you had there.
You don't need to do anything in the Java code, you just need to mark Brotli4jLoader.java for runtime init and you need to specify resource config so as libbrotli.so
gets bundled in the final executable file as a resource.
See application.properties
.
from quarkus.
Hello @jcarranzan,
I have your reproducer working properly in native. Let me polish the how-to and share it with you.
This is neither Quarkus nor GraalVM issue per se. It's just that AOT requires some more config work to get it working.
Quarkus extensions shield users from this complexity, but since there is none for this specific library usage (or none I know of), you need to add some manual configs.
from quarkus.
/cc @Karm (mandrel), @galderz (mandrel), @geoand (openshift), @iocanel (openshift), @zakkak (mandrel,native-image)
from quarkus.
Is this usage widespread? Would it make sense to develop a small extension similar to what I did here: https://github.com/quarkiverse/quarkus-opencv/ ?
from quarkus.
@gsmet https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/Webserver.20compression/near/438350071
I'd say yes. Unless I misunderstood and it's already a part of e.g. Vert.x.
from quarkus.
I would not say 'widespread'. It's starting to be used. Vert.x already has the support (via netty), and due to some ugly substitution business, we have it on the classpath.
@Karm Based on your exploration, I would do the same thing I did for RocksDB, Snappy... If a built-time property enables Brotli, we include the appropriate native library into the native executable and mark Broli4Loarder as runtime init.
from quarkus.
Should we re-open this ticket then?
from quarkus.
Should we re-open this ticket then?
I don't know. Not a bug... it's a missing feature :)
I will work on the seamless integration regardless of this particular issue being open or not.
from quarkus.
I guess the next to be PR should be enough. This ticket provides the workaround (correct instructions).
from quarkus.
@Karm thanks i will monitor for PR's!
from quarkus.
@Karm thanks i will monitor for PR's!
yeah, we also need to know to change our tests, so let's all monitor instead of having a tracker that will notify us
from quarkus.
Related Issues (20)
- Hibernate Inheritance not persisting to database table HOT 4
- Quarkus exits without showing thrown exception when using `-H:ThrowMissingRegistrationErrors=` HOT 1
- Not all Micrometer metrics are available when exporting with Json HOT 3
- Quarkus 3.10 issue with OpenTelemetry? HOT 7
- Customize list of exceptions to unwrap in resteasy-reactive HOT 9
- Performance Issue with MP Rest Client HOT 3
- Kotlin junit ParameterizedTest with list as argument, not working anymore (3.13.0.CR1) HOT 6
- OpenAPI generates wrong example for URLs HOT 3
- ClassCast Exception with Quarkus Hibernate HOT 2
- Our Nightly Quarkus build deploy to Nexus was failing after the gradle upgrade to 8.9 HOT 3
- Update examples to use org.htmlunit:htmlunit HOT 5
- Core module is using a mix of traditional `@ConfigRoot` and `@ConfigMapping` HOT 5
- Support for Demonstrating Proof of Possession (DPoP) in quarkus-oidc HOT 1
- Add OIDC response filters HOT 1
- Quarkus JaCoCo in CD/CI error Error while instrumenting io/quarkus/test/common/*
- Sort identity providers by priority in QuarkusIdentityProviderManagerImpl HOT 3
- ArrayIndexOutOfBoundsException occurred when i was serializing data from redis with quarkus redis extension HOT 6
- Incorrect data in the ReactiveDatasourceHealthCheck being set when the connection is down HOT 2
- Narayana throws an exception when working with the latest MSSQL server HOT 1
- Native Image run issue with XML Changelog quarkus-liquibase HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quarkus.