Hi Stefan,
Jetty’s GZIP feature can now be enabled in BaseX [1,2].
Looking forward to your testing feedback, Christian
[1] http://docs.basex.org/wiki/Options#GZIP [2] http://files.basex.org/releases/latest/
On Mon, Oct 7, 2019 at 1:40 PM Stefan Koch koch@buit-solutions.com wrote:
Hi Christian,
thx for your reply. Got it :) Solution 2 would be cool - maybe feature request?
But I can live with a workaround.
kind regards,
Stefan
-----Ursprüngliche Nachricht----- *Von:* Christian Grün [mailto:christian.gruen@gmail.com] *Gesendet:* Donnerstag, 3. Oktober 2019 11:51 *An:* Stefan Koch koch@buit-solutions.com *Cc:* BaseX basex-talk@mailman.uni-konstanz.de *Betreff:* Re: [basex-talk] HTTPServer + gzip compression
Hi Stefan,
There’s a StackOverflow entry that has previously been referenced on this list (by Michael Seiferle, see [2]). Based on this thread, in which Joakim Erdfelt (the magnificent Jetty core developer) explains why the existing approaches for enabling GZIP compression don’t work anymore, I see three choices:
- to wrap all HTTP responses in a GZIP output stream;
- to initialize GZipHandler in our basexhttp code; or
- enable GZIP compression outside BaseX,
Alternative 1 would give us most control, but it would raise new questions that would need to be solved. Alternative 2 may be the better approach: It only works if basexhttp is used, but we could benefit from existing optimizations and tweaks from the Jetty implementation [2]. Alternative 3 is already available: You can use another light-weight web server as proxy (caddy, nginx), or you can start Jetty as described by Joakim.
Good idea to ask the Jetty devs - I'll try that.
Thanks; feel free to keep us updated, Christian
[1] https://stackoverflow.com/questions/38635262/jetty-9-and-gziphandler [2] https://www.eclipse.org/jetty/documentation/current/gzip-filter.html
I just wanted to try gzip http compression and downloaded the current build BaseX93-20191116. The option is not there anymore. What happened?
Best regards
Omar Siam
The snapshot has been updated. Is it working now?
On Mon, Nov 18, 2019 at 6:41 PM Omar Siam Omar.Siam@oeaw.ac.at wrote:
I just wanted to try gzip http compression and downloaded the current build BaseX93-20191116. The option is not there anymore. What happened?
Best regards
Omar Siam
Yes, it works! 1000 entries of XML in a JSON wrapper from my data are now transfered as 193 KB instead of 1.6 MB. Not bad. Unfortunately on localhost that doesn't make much of a difference in overall timing as measured in Chrome's development tools. For real internet connections I think this is quite an improvement.
Best regards
Omar Siam
Am 19.11.2019 um 01:28 schrieb Christian Grün:
The snapshot has been updated. Is it working now?
On Mon, Nov 18, 2019 at 6:41 PM Omar Siam Omar.Siam@oeaw.ac.at wrote:
I just wanted to try gzip http compression and downloaded the current build BaseX93-20191116. The option is not there anymore. What happened?
Best regards
Omar Siam
Thanks for the confirmation!
Omar Siam Omar.Siam@oeaw.ac.at schrieb am Mi., 20. Nov. 2019, 12:41:
Yes, it works! 1000 entries of XML in a JSON wrapper from my data are now transfered as 193 KB instead of 1.6 MB. Not bad. Unfortunately on localhost that doesn't make much of a difference in overall timing as measured in Chrome's development tools. For real internet connections I think this is quite an improvement.
Best regards
Omar Siam
Am 19.11.2019 um 01:28 schrieb Christian Grün:
The snapshot has been updated. Is it working now?
On Mon, Nov 18, 2019 at 6:41 PM Omar Siam Omar.Siam@oeaw.ac.at wrote:
I just wanted to try gzip http compression and downloaded the current
build BaseX93-20191116. The option is not there anymore. What happened?
Best regards
Omar Siam
basex-talk@mailman.uni-konstanz.de