I’d like to ask to add the support for gzipResponseWrite for on-fly gzipping the output json.
In some situations, this helps to decrease the time needed to upload the output payload (json) to a client (a database via apache, a browser via apace or a simple js in /static/ folder of the cayley).
I have notice that the latency time (time needed to deliver the response back, I have tested libcurl ) may be twice larger than the cayley query time even for small jsons (~100 elements and each of ~ 100 bytes).
Here is a few examples of an optimization of http traffic:
and the gzipping plays the important role.
Because I transfer quite big JSONs (about 100K elements) back, I propose to introduce GzipServeV1Query utilizing gzipResponseWrite. Example of the gzipResponseWrite can be found here
if you decide to implement gzipping, you can find additional information on the choice of the compresser: gzip or zlib, below.
- PHP supports both
- apache supports only zlib (deflate)
- HTTP specification supports both
but not all browsers supports both
https://github.com/SlyMarbo/web uses gzip
- here is an example of zlib in go
- In principal, zlib and gzip formats are compatible (except headers)