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

Add apache-async-client #1543

Closed
wants to merge 1 commit into from
Closed

Conversation

rschmitt
Copy link
Contributor

@rschmitt rschmitt commented Dec 10, 2019

This commit adds a new SdkAsyncHttpClient implementation,
ApacheAsyncHttpClient, as well as a service provider for that
implementation. These live in a new module, apache-async-client, which
is part of the http-clients module.

This client is intended to be roughly equivalent in power to the
netty-nio-client, supporting features like HTTP/2, full-duplex HTTP
requests, and reactive streams.

The client supports the following options:

Option Default value Defined by... Implemented via...
socketTimeout 30 sec http-client-spi IOReactorConfig
connectionTimeout 2 sec http-client-spi RequestConfig
connectionAcquisitionTimeout 20 sec http-client-spi RequestConfig
maxConnections 50 http-client-spi PoolingAsyncClientConnectionManager
proxyConfiguration empty object apache-async-client HttpAsyncClient
localAddress null apache-async-client HttpAsyncClient
expectContinueEnabled true apache-async-client RequestConfig
connectionTimeToLive unlimited http-client-spi PoolingAsyncClientConnectionManager
connectionMaxIdleTime 60 sec http-client-spi HttpAsyncClient
protocol null http-client-spi HttpVersionPolicy
maxHttp2Streams null apache-async-client H2Config
httpRoutePlanner null apache-async-client HttpAsyncClient
credentialsProvider null apache-async-client HttpAsyncClient
tlsKeyManagersProvider JVM defaults http-client-spi SSLContext

The following standard options are not supported:

  • SdkHttpConfigurationOption.WRITE_TIMEOUT: socketTimeout maps to
    READ_TIMEOUT, which controls both read and write behavior on every
    client except netty-nio-client
  • SdkHttpConfigurationOption.MAX_PENDING_CONNECTION_ACQUIRES: Apache
    supports an acquisition timeout, not a limit on the number of pending
    connection acquires

@rschmitt rschmitt force-pushed the apache-async-client branch from a9c8d8d to 039b460 Compare December 10, 2019 20:56
@rschmitt rschmitt force-pushed the apache-async-client branch 3 times, most recently from 2a9ffcf to 41f383d Compare December 11, 2019 08:16
@rschmitt rschmitt force-pushed the apache-async-client branch 6 times, most recently from 5fe2ceb to c3abf7e Compare January 6, 2020 21:41
@rschmitt rschmitt force-pushed the apache-async-client branch 5 times, most recently from 156b23c to abc3d20 Compare January 7, 2020 19:12
@rschmitt rschmitt force-pushed the apache-async-client branch from abc3d20 to fa77504 Compare January 27, 2020 19:10
@rschmitt
Copy link
Contributor Author

I've updated this PR to depend on the latest beta. It no longer requires snapshot builds and is in pretty good shape to merge to a feature branch or something.

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.

Bug C 3 Bugs
Vulnerability C 2 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 21 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

This commit adds a new `SdkAsyncHttpClient` implementation,
`ApacheAsyncHttpClient`, as well as a service provider for that
implementation. These live in a new module, apache-async-client, which
is part of the http-clients module.

This client is intended to be roughly equivalent in power to the
netty-nio-client, supporting features like HTTP/2, full-duplex HTTP
requests, and reactive streams.

The client supports the following options:

| Option                         | Default value | Defined by...       | Implemented via...                    |
| ------------------------------ | ------------- | ------------------- | ------------------------------------- |
| `socketTimeout`                | 30 sec        | http-client-spi     | `IOReactorConfig`                     |
| `connectionTimeout`            | 2 sec         | http-client-spi     | `RequestConfig`                       |
| `connectionAcquisitionTimeout` | 20 sec        | http-client-spi     | `RequestConfig`                       |
| `maxConnections`               | 50            | http-client-spi     | `PoolingAsyncClientConnectionManager` |
| `proxyConfiguration`           | empty object  | apache-async-client | `HttpAsyncClient`                     |
| `localAddress`                 | `null`        | apache-async-client | `HttpAsyncClient`                     |
| `expectContinueEnabled`        | `true`        | apache-async-client | `RequestConfig`                       |
| `connectionTimeToLive`         | unlimited     | http-client-spi     | `PoolingAsyncClientConnectionManager` |
| `connectionMaxIdleTime`        | 60 sec        | http-client-spi     | `HttpAsyncClient`                     |
| `protocol`                     | `null`        | http-client-spi     | `HttpVersionPolicy`                   |
| `maxHttp2Streams`              | `null`        | apache-async-client | `H2Config`                            |
| `httpRoutePlanner`             | `null`        | apache-async-client | `HttpAsyncClient`                     |
| `credentialsProvider`          | `null`        | apache-async-client | `HttpAsyncClient`                     |
| `tlsKeyManagersProvider`       | JVM defaults  | http-client-spi     | `SSLContext`                          |

The following standard options are not supported:

* `SdkHttpConfigurationOption.WRITE_TIMEOUT`: `socketTimeout` maps to
  `READ_TIMEOUT`, which controls both read and write behavior on every
  client except netty-nio-client
* `SdkHttpConfigurationOption.MAX_PENDING_CONNECTION_ACQUIRES`: Apache
  supports an acquisition timeout, not a limit on the number of pending
  connection acquires
@rschmitt rschmitt force-pushed the apache-async-client branch from 7d239e4 to d6a705b Compare March 23, 2020 22:39
aws-sdk-java-automation added a commit that referenced this pull request Jul 16, 2021
…1c59d118c

Pull request: release <- staging/c2eace12-0c83-44d0-9b5d-c351c59d118c
@debora-ito debora-ito added the needs-review This issue or PR needs review from the team. label Aug 16, 2021
@dagnir
Copy link
Contributor

dagnir commented Aug 23, 2021

Hey Ryan, I'm going to go ahead and close this as the branch has gone stale. I think we as a team should also discuss how want to handle new HTTP client implementations going forward.

@dagnir dagnir closed this Aug 23, 2021
@debora-ito debora-ito removed the needs-review This issue or PR needs review from the team. label Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants