Skip to content

Specialize HTTP client for Apple platform to fix the connection issue while running in the background #211

Open
@waahm7

Description

@waahm7

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

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Metadata

Metadata

Assignees

Labels

blockedWork is blocked on this issue for this codebase. Other labels or comments may indicate why.feature-requestA feature should be added or improved.p2This is a standard priority issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions