ucscXena / XenaGoWidget

Xena Gene Set Viewer (demo: http://xenademo.berkeleybop.io/xena)
https://xenageneset.berkeleybop.io/xena/
BSD 3-Clause "New" or "Revised" License
2 stars 5 forks source link

handle local storage size or move to intermediate server #645

Closed nathandunn closed 3 years ago

nathandunn commented 3 years ago

Getting this error:

react_devtools_backend.js:2430 DOMException: Failed to execute 'setItem' on 'Storage': Setting the value of 'xena-custom-pathways-storage' exceeded the quota.
    at Function.storeCustomPathways (http://localhost:3000/main.demo.js:160513:20)
    at XenaGeneSetApp.storeCustomGeneSet (http://localhost:3000/main.demo.js:152045:83)
    at XenaGeneSetApp._callee$ (http://localhost:3000/main.demo.js:152104:20)
    at tryCatch (http://localhost:3000/main.demo.js:117824:40)
    at Generator.invoke [as _invoke] (http://localhost:3000/main.demo.js:118058:22)
    at Generator.prototype.<computed> [as next] (http://localhost:3000/main.demo.js:117876:21)
    at step (http://localhost:3000/main.demo.js:150779:314)
    at http://localhost:3000/main.demo.js:150779:607

I think this is related to #644 in that we quite simply need a backend store to make this work.

nathandunn commented 3 years ago

The problem is that after uploading the first one, I can't really upload a subsequent one as individual keys have a limit.

Some possible solutions would be to remove unused data (e.g., sample names), which gets us a bit further, but not a great solution. We could also use individuals keys, which is also problematic.

I think if we wanted to store analysis results for GMT files, this would be a preferred method, especially as I think GMT files are easy to create, and fun to analyze. Also, hallmark is 50 gene sets. When we are looking at 5K, it quite simply won't work. I think the limit is 5200000 characters https://stackoverflow.com/a/61018107/1739366. On the flipptity, if we paired down the data and set a hard limit on geneset size, but this won't scale at all.

Looking at #644 I think we need a more robust solution. Its a bit wonky, but I feel as though it provides a more robust solution.

We would then have:

client -> analysis-storage-server / R-server -> xena

In this case we wouldn't hit the R-server directly ever and would likely just do an exec.

nathandunn commented 3 years ago

In terms of the architecture, for storage, we are creating keys into JSON blobs right now. data type / analysis method 1- geneset list 1- geneset results

nathandunn commented 3 years ago

https://docs.google.com/spreadsheets/d/1oU6YG_7JK6_qBuTNdkXRw6GGiX3vQpzg3f47t84rJAA/edit#gid=1556857962. (sauce: https://github.com/pouchdb/pouchdb/issues/4031#issuecomment-241243773)

. . . pouchdb might be intesreting here.

nathandunn commented 3 years ago

https://pouchdb.com/guides/setup-couchdb.html