Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4797

Postgres(t) compression of huge json data for clients fetch call

$
0
0

I am using a Postgres DB to store large JSON data (~2 MB). To view and analyze the data (logfiles from different applications), I have implemented a web server with an Ag-Grid table. Based on Postgrest, I implemented a REST API to retrieve the data on the client (browser) side. All in all, the whole thing runs quite smoothly. However, depending on the network speed, it may take some time (several seconds) for the JSON to be transferred from the DB to the user's browser.Therefore, I am looking for a way to compress the JSON before sending it to the user's browser.
I have seen that there is a Postgres gzip extension to compress data on the DB: https://github.com/pramsey/pgsql-gzip

However, this extension seems to be quite old (~5 years). Does anyone know a better idea how I can compress JSON data before sending it to the user's browser via REST call?

Many thanks in advance!


Viewing all articles
Browse latest Browse all 4797

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>