ring-middleware-format icon indicating copy to clipboard operation
ring-middleware-format copied to clipboard

Large (streaming) response support

Open RickMoynihan opened this issue 10 years ago • 1 comments

Hi I'm not sure if this is supported or not, but as far as I can tell this middleware doesn't support (memory) efficient serialisation of large responses.

From looking at the code it seems that objects are fully converted into in memory strings before being returned to the web server. Is this a fair assessment?

Would it be possible to support streaming responses with this middleware?

Perhaps by allowing certain handlers to return a piped-input-stream instead of a String?

RickMoynihan avatar Mar 17 '15 11:03 RickMoynihan

Yes this sounds like a good idea.

I'm currently working on a major refactoring and after that is completed I'm thinking I'll take a look into this.

Deraen avatar Aug 10 '15 20:08 Deraen