Open mikekucera opened 2 years ago
It would be more natural to create the thumbnail on the server at the same time as creating the snapshot. However, that requires the ‘cytosnap’ extension which uses Cytoscape.js inside a headless chrome instance, which is very heavyweight.
Creating and destroying Chrome instances is very heavyweight. Usually this means you need to keep a headless Chrome instance running all the time and you have a job queue that reuses that instance. Biofactoid does this: https://github.com/PathwayCommons/factoid
It probably makes more sense to create the thumbnail on the client and send it to the server
Another possibility is to not store images on the server at all. If we assume that the snapshot data is already stored in the client so that the user can just click to quickly restore that snapshot, then the client could dynamically generate those images from the data using Cytoscape.