radiasoft / sirepo

Sirepo is a framework for scientific cloud computing. Try it out!
https://sirepo.com
Apache License 2.0
64 stars 31 forks source link

Should cloudmc use downloadDataFile to return json? #6392

Open robnagler opened 1 year ago

robnagler commented 1 year ago

This code is what I'm concerned about:

            reader = vtk.IO.Core.vtkHttpDataSetReader.newInstance();
            cacheReadersByVol[volId] = reader;
            res = reader.setUrl(volumeURL(volId), {
                compression: 'zip',
                fullpath: true,
                loadData: true,
            });
mkeilman commented 1 year ago

We do the compression - I believe we need the structure of the zip file that gzip lacks, but we can experiment. vtkHttpDataSetReader does support gzip.

json is convenient but another format could work. It can be completely numeric - as long as volume ids are always numbers

robnagler commented 1 year ago

I believe we need the structure of the zip file that gzip lacks, but we can experiment.

I see.

json is convenient but another format could work. It can be completely numeric - as long as volume ids are always numbers

Can vtkHttpDataSetReader accept an Object with the data, i.e. data that was received elsewhere?

moellep commented 4 days ago

vtk.js has a special web-only format which vtkHttpDataSetReader uses to read full volumes (polys and points and other data) all in one zip file. If it isn't provided as a zip file, I believe it makes many requests for each component. The vtkHttpDataSetReader.setURL API makes it really convenient to load a volume - no extra processing is required.

The outlines.json problem is unrelated - I've opened a new issue for that #7332