-
Notifications
You must be signed in to change notification settings - Fork 915
Add Initial Support for AWS Common Runtime Http Client #1359
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1359 +/- ##
============================================
+ Coverage 70.94% 71.12% +0.18%
- Complexity 188 262 +74
============================================
Files 777 782 +5
Lines 24266 24570 +304
Branches 1817 1854 +37
============================================
+ Hits 17216 17476 +260
- Misses 6257 6285 +28
- Partials 793 809 +16
Continue to review full report at Codecov.
|
@SdkPublicApi | ||
public class AwsCrtAsyncHttpClient implements SdkAsyncHttpClient { | ||
private static final Logger log = Logger.loggerFor(AwsCrtAsyncHttpClient.class); | ||
private static final String HOST_HEADER = "Host"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this H2 compatible? wouldn't it be :authority in that case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sending 'Host' Header is compatible with both Http/1 and Http/2, but it is recommended to send :authority
Header instead of 'Host' if using Http/2.
From the HTTP/2 RFC: Clients that generate HTTP/2 requests directly SHOULD use the :authority pseudo-header field instead of the Host header field.
Also, I don't think we know which version of Http is being used at this point so we shouldn't generate headers that are only compatible with Http/2.
Add aws-crt-client benchmark
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just nit picks and questions.
Fix-n-ship
.../it/java/software/amazon/awssdk/http/crt/AwsCrtCombinatorialConfigStressIntegrationTest.java
Outdated
Show resolved
Hide resolved
.../it/java/software/amazon/awssdk/http/crt/AwsCrtCombinatorialConfigStressIntegrationTest.java
Outdated
Show resolved
Hide resolved
...ents/aws-crt-client/src/main/java/software/amazon/awssdk/http/crt/AwsCrtAsyncHttpClient.java
Show resolved
Hide resolved
...ents/aws-crt-client/src/main/java/software/amazon/awssdk/http/crt/AwsCrtAsyncHttpClient.java
Show resolved
Hide resolved
...ient/src/main/java/software/amazon/awssdk/http/crt/internal/AwsCrtRequestBodySubscriber.java
Show resolved
Hide resolved
...ient/src/main/java/software/amazon/awssdk/http/crt/internal/AwsCrtResponseBodyPublisher.java
Show resolved
Hide resolved
…07f3b8419 Pull request: release <- staging/61f6ba62-0c11-4ef5-b3f2-4af07f3b8419
Description
Add Initial Support for AWS Common Runtime Http Client. Users should consider this Client to be in "Early Beta" stage, and users should not replace usages of other Http clients with this one yet.
Motivation and Context
AwsCrtAsyncHttpClient is a non-blocking AsyncIO Http Client that is owned and maintained by AWS that uses the AWS TLS Library s2n on Linux platforms.
Known Missing Features not included in this Pull Request
No support for connection pooling or parallelizing requests to the same endpoint over multiple connections.Updated PR to useHttpConnectionPoolManager
.No Performance TestsAdded AwsCrtAsyncHttpClientsdk-benchmarks
ModuleTesting
AwsCrtAsyncHttpClient
correctly implements theSdkAsyncHttpClient
SPIAwsCrtResponseBodyPublisher
correctly implements thePublisher<ByteBuffer>
APIAwsCrtRequestBodySubscriber
correctly implements theSubscriber<ByteBuffer>
APIAwsCrtAsyncHttpClient
can be used to makeCreateKey
,Encrypt
, andDecrypt
calls to KMS.AwsCrtAsyncHttpClient
can download a file from S3 and that the file has the correct SHA-256 hash.AwsCrtAsyncHttpClient
works in various combinations of calling patterns.Screenshots (if appropriate)
Types of changes
Checklist
mvn install
succeedsLicense