create interface for write data api, implement in CRT#3789
Open
create interface for write data api, implement in CRT#3789
Conversation
d25cc72 to
ba65c36
Compare
87d1dfd to
b0644c8
Compare
b0644c8 to
17eb7ad
Compare
sbaluja
reviewed
Apr 7, 2026
| } | ||
| } | ||
|
|
||
| Aws::Http::HttpClient::AcquireConnectionOutcome CRTHttpClient::AcquireConnection(const std::shared_ptr<HttpRequest>& request) { |
Collaborator
There was a problem hiding this comment.
Just an idea but is it worth making this (or adding a seperate function) that acquires the connection without blocking i/o? Allows us to potentially lazy-init the connection when we implement the stream that uses these new API's
Collaborator
Author
There was a problem hiding this comment.
lets make this one non-blocking, its very easy to make this blocking for our use case, but very hard to make it non blocking in the future. changing
sbaluja
reviewed
Apr 7, 2026
| */ | ||
|
|
||
| #pragma once | ||
| #include <aws/core/utils/memory/stl/AWSStreamFwd.h> |
Collaborator
There was a problem hiding this comment.
super nit: we are transitively including AWS_CORE_API somewhere and that's why AWS_CORE_API works but we should explicitly include #include <aws/core/Core_EXPORTS.h>
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.
Description of changes:
The change creates a new function for the interface for our HTTPClient called
AcquireConnection. The idea here is to create a API that does not rely on polling to read more data. this created issues where we saw hot polling such as in transcribe streaming. The way this API could be invoked isThis create a foundation for non-blocking io where the http client is not waiting for more data, but instead we have have a write API to do this.
Projects like the amazon-transcribe-streaming-sdk used this exact API in the same way to eliminate hot polling.
Added a test in dynamodb to write data over a created connection using the new API. The integration tests exists there because dynamo has http2 apis, and unit testing the CRT is not feasible for this change.
Check all that applies:
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.