SQLiteQueryServer icon indicating copy to clipboard operation
SQLiteQueryServer copied to clipboard

Support request and response streaming

Open assafmo opened this issue 6 years ago • 1 comments

We want to read a request line, execute the query, flush the response and continue to the next request line. This will prevent huge requests to buffer in the application's RAM.

The native go http server closes the request body after the first byte is flushed to the response.
So to flush the response as soon as possible we need to read the entire request, and to read the request line by line we need to buffer the entire response.
In both situations huge requests or responses will cause huge RAM usage.

assafmo avatar Apr 18 '19 15:04 assafmo

https://github.com/assafmo/SQLiteQueryServer/commit/c7e49588a2759d5f2eb00dd68bdcdb5a5b15b3e2

assafmo avatar Apr 18 '19 15:04 assafmo