Skip to content

Implement Response Decompression #35

@wkkasztan

Description

@wkkasztan

Currently, the driver does support request compression, but it does not accept compressed responses.

We may want to enable compressed responses for DynamoDB operations that are expected to yield big payloads.

This one is tricky to implement using Interceptors, as Rust's safety mechanisms prevent us from modifying responses where it would make sense.

Below I list a few ways I think could work:

Custom Deserializer

We could use a custom SharedResponseDeserializer (possibly a wrapper around the one DynamoDB attaches to each operation call inside the ConfigBag).
To my knowledge all DynamoDB deserializers (example) expect a nonstreaming response.
So we could do the decompressing inside DeserializeResponse::deserialize_nonstreaming, just before sending to the inner deserializer.

Custom HttpClient

We could also use a wrapper around HttpClient and HttpConnector, and decompress the request just before it is send to the interceptors, inside HttpConnector::call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions