Hi Stefan,
I had reopened the corresponding Github issue to remember your request [1]. I’ve just added a link to the mailing list thread.
Best, Christian
PS: Would anyone else be interested in assigning custom GZIP options?
[1] https://github.com/BaseXdb/basex/issues/1748
On Wed, Jan 22, 2020 at 6:33 PM Stefan Koch koch@buit-solutions.com wrote:
Hi,
Sorry for self-bumping - but topic might have been overlooked because of holydays.
While gzip may be my personal wishlist - It would be could if others could chime in and say what they think about it.
HTTPS however is pretty important - independent of my personal wishlist. If there is an embedded jetty already - it should support HTTPS without using proxy workarounds, IMO. See recent issue with a lot of repostitories stopping HTTP support, breaking a couple of build chains. (https://www.alphabot.com/security/blog/2020/java/Your-Java-builds-might-brea...)
HTTP is gonna cause more issues/bugs in the future ... For security reasons HTTPS should be mandatory and default, IMO. Trusted SSL certificates are free nowadays (self signed still works for services) ...
Keep up the great work,
Stefan
-----Ursprüngliche Nachricht----- Von: Stefan Koch [mailto:koch@buit-solutions.com] Gesendet: Montag, 23. Dezember 2019 19:16 An: basex-talk@mailman.uni-konstanz.de Betreff: Re: [basex-talk] HTTPServer + gzip compression
Hi Christian,
Checked the GZIP Handler options.
https://www.eclipse.org/jetty/documentation/current/gzip-filter.html
It should support:
includedMethods (GET, POST, PUT) - PATCH is not used by BaseX REST API - not needed.
However these are response settings.
Jetty does support request compression - if BaseX works for XML-Webservices, you wanna POST/PUT large XML docs that are compressed, I guess.
As far as I could figure out: "inflateBufferSize" should be set to 1 (0 is default) (it's in the official jetty-gzip.xml not in the link from above). No default option in jetty, shouldn't be default in BaseX REST client, I guess. This should enable request compression.
HTTP is dead, long live HTTPS!
For productive use this is needed (otherwise you have to run NGINX as proxy or do similar workarounds). Currently only HTTP is supported.
Downloaded jetty - in /etc there are the config xmls - relevant config options are:
jetty-https,jetty-ssl, jetty-ssl-context (you wanna have a keystore/certificate for SSL).
productive use:
jetty-threadpool, jetty-threadlimit and jetty-connectionlimit might come in handy for the admins - but have no clue about that. Not really a priority, though.
There is a bunch of other stuff, but IMO not really important.
Best wishes and nice holydays,
Stefan
-----Ursprüngliche Nachricht----- Von: Christian Grün [mailto:christian.gruen@gmail.com] Gesendet: Dienstag, 17. Dezember 2019 07:59 An: Stefan Koch koch@buit-solutions.com Cc: BaseX basex-talk@mailman.uni-konstanz.de Betreff: Re: [basex-talk] HTTPServer + gzip compression
Hi Stefan,
We could consider an extension of the current solution.
So only for GET - not POST. Our current Webservices rely heavily on POST (+Response) though :(
Have you checked the remaining default options? What other custom settings may you need to rely on?
Cheers, Christian
-----Ursprüngliche Nachricht----- Von: Stefan Koch [mailto:koch@buit-solutions.com] Gesendet: Mittwoch, 20. November 2019 14:45 An: basex-talk@mailman.uni-konstanz.de Betreff: Re: [basex-talk] HTTPServer + gzip compression
Hi,
great to hear! So it's coming in 9.3
We have been running base.war via tomcat with gzip instead - but it wasn't optimal for our solution.
Thx for fixing
Stefan
-----Ursprüngliche Nachricht----- Von: Christian Grün [mailto:christian.gruen@gmail.com] Gesendet: Mittwoch, 20. November 2019 13:26 An: Omar Siam Omar.Siam@oeaw.ac.at Cc: BaseX basex-talk@mailman.uni-konstanz.de Betreff: Re: [basex-talk] HTTPServer + gzip compression
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