Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRT Http Client doesn't support GraalVM #2948

Closed
msailes opened this issue Jan 4, 2022 · 11 comments
Closed

CRT Http Client doesn't support GraalVM #2948

msailes opened this issue Jan 4, 2022 · 11 comments
Labels
crt-client feature-request A feature should be added or improved. graalvm p2 This is a standard priority issue

Comments

@msailes
Copy link

msailes commented Jan 4, 2022

Describe the bug

@zoewangg added GraalVM support to the v2 SDK in #2268. However when I build a native-image project with the CRT Http Client I get a number of errors to do with missing resources, classes, functions.

Could GraalVM support be added to this module as well?

Expected behavior

When I compile my application with GraalVM native-image modules from the AWS SDK for Java v2 should work without any further configuration.

Current behavior

Stack traces for missing resources, classes and functions.

Steps to Reproduce

https://github.com/aws-samples/serverless-graalvm-demo/tree/low-latency

Possible Solution

I'm part way through the required configuration, but I don't understand the CRT project well enough to complete it.

https://github.com/aws-samples/serverless-graalvm-demo/tree/low-latency/software/products/src/main/resources/META-INF/native-image/software.amazon.awssdk/aws-crt-client

Context

The CRT client is the fastest Http Client available within the AWS SDK for Java. I would like to use this within applications I compile with GraalVM native-image.

AWS Java SDK version used

2.17.100-PREVIEW

JDK version used

OpenJDK Runtime Environment GraalVM CE 21.3.0

Operating System and version

AL2 on Lambda

@msailes msailes added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 4, 2022
@debora-ito
Copy link
Member

Hi @msailes 👋 thank you for submitting this issue.

We'll add this to our backlog. I'm changing this to a feature request though, the CRT Client is still in dev preview and was not in the initial plans when the native image was released.

@debora-ito debora-ito added feature-request A feature should be added or improved. graalvm and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 26, 2022
@timmattison
Copy link

Most of the functions I've written with native image do their job in a few milliseconds but hitting a single API adds hundreds of milliseconds to the duration (not just initialization). Making CRT just work with native image would significantly reduce the cost of native image Lambdas.

@maschnetwork
Copy link

maschnetwork commented Jun 21, 2022

Thanks to @timmattison initial PR here I was able to get the CRT client now running with GraalVM. I described the full process to get the configs on the PR and you can find a full working version writing records to DynamoDB in this repo: https://github.com/maschnetwork/aws-lambda-graalvm-crt

@zoewangg it would be very cool to get this supported out of the box and the mentioned PR is a good starting point.

@msailes
Copy link
Author

msailes commented Nov 13, 2023

@debora-ito the CRT Client is now GA, can this be revisited

@antechrestos
Copy link

@debora-ito @yasminetalby do we know if/when it would be available?
@maschnetwork did a great on his project and it would be great that thre project take the responsability of it

@MatejNedic
Copy link

MatejNedic commented Dec 23, 2023

Hey @msailes , any idea when we can see this resolved? Is there any way we can help? Looking forward to this so I can test spring-cloud-aws S3 integration with it!

@maschnetwork
Copy link

Hi @MatejNedic @antechrestos , I'll open a PR for this in early January on this repo https://github.com/awslabs/aws-crt-java - Will post the reference here and keep you posted.

@scrocquesel
Copy link
Contributor

@maschnetwork Do you know if there are plans to support --link-at-build-time ? Somes places check for the presence of an eventually present CRT class and this is not supported by GraalVM with this argument.

@maschnetwork
Copy link

@scrocquesel I would need to take a deeper look into this one. Lets track it as an issue once the first version is merged.

@zoewangg
Copy link
Contributor

CRT GraalVM support is added in awslabs/aws-crt-java#791 and released in 0.29.20. Resolving.

PR to bump CRT version in the SDK: #5290

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crt-client feature-request A feature should be added or improved. graalvm p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

9 participants