apache / openwhisk

Apache OpenWhisk is an open source serverless cloud platform
https://openwhisk.apache.org/
Apache License 2.0
6.5k stars 1.16k forks source link

Streaming JSON responses for large responses #832

Open psuter opened 8 years ago

psuter commented 8 years ago

Currently, large responses that are retrieved from the DB, stored in memory, then sent as part of a single HTTP response. Instead, we should stream the response from the DB, (potentially) apply a transformation to each element, and stream it to the client as a chunked response.

mbehrendt commented 8 years ago

what would be the use case for this? for displaying lon lists in the ui, a chunked loading should be sufficient?

rabbah commented 8 years ago

streaming = chunked request/response.

psuter commented 8 years ago

@mbehrendt I uploaded the description. It's to:

  1. be able to remove hard limits on the number of elements you can retrieve
  2. relieve the controller from having to keep the lists in memory

(Note that we currently don't produce any chunked HTTP responses.)

mbehrendt commented 8 years ago

cool -- chunked interactions make sense

mbehrendt commented 8 years ago

@psuter based on a DM msg exchange on slack with @rabbah , the title of this issue should be changed, such that it doesn't refer to long lists (which is already addressed today via pagination), but rather larger action invocation responses (included in activations) being larger.

does that make sense to you?

rabbah commented 8 years ago

I modified title and description.