snikproject / graph

Visualization of the snik-ontology.
http://www.snik.eu/graph
GNU General Public License v3.0
8 stars 3 forks source link

Can SPARQL results be compressed? #433

Closed KonradHoeffner closed 3 weeks ago

KonradHoeffner commented 1 month ago

What new feature do you want?

Every time SNIK graph is started, it receives several MB of JSON data from the SPARQL endpoint in JSON format. Can we get it in compressed form to save data (relevant on mobile data) and perhaps time?

Screenshot from 2024-08-01 09-43-38

Request Header

GET /sparql?query=[...]format=json HTTP/1.1
Host: www.snik.eu
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br, zstd
Referer: https://www.snik.eu/graph/
DNT: 1
Connection: keep-alive
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Priority: u=4
Pragma: no-cache
Cache-Control: no-cache

Response Headers

HTTP/1.1 200 OK
Date: Thu, 01 Aug 2024 07:43:11 GMT
Server: Virtuoso/07.20.3239 (Linux) x86_64-ubuntu_bionic-linux-gnu
Accept-Ranges: bytes
Content-disposition: filename=sparql_2024-08-01_07-43-11Z.json
Content-Type: application/sparql-results+json
Content-Length: 2766401
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive

Tested on Firefox Developer Edition

KonradHoeffner commented 1 month ago

Asked in https://stackoverflow.com/questions/78819781/how-to-compress-query-results.

KonradHoeffner commented 3 weeks ago

There was a bug in Virtuoso which is now fixed in the newest pkleef beta image.

KonradHoeffner commented 3 weeks ago

Resolved by https://github.com/snikproject/docker/commit/b26f9202ab37f686d6f17ecaa6e409dcf91ffbaa.