Specialize HTTP client for Apple platform to fix the connection issue while running in the background #211
Labels
blocked
Work is blocked on this issue for this codebase. Other labels or comments may indicate why.
feature-request
A feature should be added or improved.
Describe the feature
Follow up to awslabs/aws-sdk-swift#1086
Enable the CRT HTTP client to continue handling events in the background on Apple platform clients.
The standard event handling mechanism used by the CRT HTTP client (kqueue) is not fully supported on Apple platforms (i.e. native iOS/iPadOS, tvOS, macOS applications). Using the CRT HTTP client as-is on Apple platforms will result in broken connections if the application is not in the active state for the entire duration of the connection; this is a severe limitation for most use cases, especially for mobile devices where connection speeds are limited and users are restricted to one foreground app at a time.
To remedy this limitation, an alternative event handling mechanism ("dispatch queues") must be used on Apple platforms, since dispatch queues continue to handle events as expected throughout the application lifecycle. The CRT HTTP client will be modified to use the correct event handling mechanism when building for the platforms that require it.
Use Case
To enable efficient, background HTTP communications via the AWS SDK for Swift.
Proposed Solution
Use Apple platform-native event handling on Apple platforms, instead of CRT's current event handling which is based on POSIX threads.
Other Information
No response
Acknowledgements
The text was updated successfully, but these errors were encountered: