Open kanishk1010 opened 7 years ago
This issue is linked to https://github.com/open-learning-exchange/take-home/issues/63 .. On take-home issue log.. We are working towards moving documents (not database) from couchdb on raspberry pi to android device..
@kanish1010 What do you think of this plugin: https://github.com/oreinecke/couch-gzip?
Since there are hundreds of files (attachments) associated with an HTML resource (app)
Should we be concatenating/minifying the resources?
possibly relevant: https://github.com/open-learning-exchange/BeLL-Apps/blob/dev/app/minify_html.py
Perhaps we should look into webpack, (which supports images: https://survivejs.com/webpack/loading/images/)
@kanish1010 What do you think of this plugin: https://github.com/oreinecke/couch-gzip?
The known limitations/issues make me nervous about this. Crashing for large responses, 100ms+ for every response, no SSL...
I think using nginx in front of couchdb would do the trick, see: http://nginx.org/en/docs/http/ngx_http_gzip_module.html
The Take Home Android app requests and loads HTML resources from the BeLL-Apps server wirelessly. Since there are hundreds of files (attachments) associated with an HTML resource (app), it's a huge payload which results in very slow loading on the Android app. One way to tackle this would be to compress the files ( CouchDB attachments and metadata) into a single archive, when a particular resource is requested by an Android device. To make this happen, we would probably need to have an interface in the Bell-App which allows execution of this operation on a particular CouchDB resource on demand.
Note: One of the potential solutions I came across is an npm package called couchdb-dump which enables to perform compression,archiving and migration of CouchDB database.