Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[data interfacing] save profile data at the server-side (backend) #1342

Open
kswang1029 opened this issue Nov 29, 2023 · 5 comments
Open

[data interfacing] save profile data at the server-side (backend) #1342

kswang1029 opened this issue Nov 29, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request requiring frontend this backend issue requires work in both frontend and backend
Milestone

Comments

@kswang1029
Copy link
Contributor

as of v4-stable, CARTA can only save profile data (spatial / spectral / histogram) as a text file at the client-side. This introduces a usability issue about having data in multiple places (ie client side and server side). Therefore it becomes less convenient to work with data and interface with other tools.

@kswang1029 kswang1029 added the enhancement New feature or request label Nov 29, 2023
@kswang1029 kswang1029 added this to the v5.0-beta milestone Dec 11, 2023
@markccchiang
Copy link
Contributor

Does it need a corresponding frontend development?

@kswang1029
Copy link
Contributor Author

Does it need a corresponding frontend development?

Yes CARTAvis/carta-frontend#2303

@kswang1029 kswang1029 added wontfix This will not be worked on requiring frontend this backend issue requires work in both frontend and backend and removed wontfix This will not be worked on labels Dec 11, 2023
@markccchiang
Copy link
Contributor

I guess we need to add a new CARTA::EventType that is sent from the frontend to the backend and requests spatial, spectral, or histogram data from the backend based on a specific file ID and region ID. So the frontend can use these data for further analysis. @kswang1029 is that correct?

@kswang1029
Copy link
Contributor Author

kswang1029 commented Jan 2, 2024

I guess we need to add a new CARTA::EventType that is sent from the frontend to the backend and requests spatial, spectral, or histogram data from the backend based on a specific file ID and region ID. So the frontend can use these data for further analysis. @kswang1029 is that correct?

I imagine we need a message sent from the frontend to the backend on what data to be saved at the server side. Then the backend can generate the relevant data accordingly (or fetch from cache (preferred for performance reasons)) and save them directly. Then users can access those saved data by ssh-logging to the server where the CARTA backend runs.

@markccchiang
Copy link
Contributor

markccchiang commented Jan 3, 2024

I imagine we need a message sent from the frontend to the backend on what data to be saved on the server side. Then the backend can generate the relevant data accordingly (or fetch from cache (preferred for performance reasons)) and save them directly. Then users can access those saved data by ssh-logging into the server where the CARTA backend runs.

We may need to modify the Export data widget on the spatial/spectral/histogram view panel on the frontend and add a new option to export the data to the server side. The frontend can use the FILE_LIST_REQUEST command to browse server directories and users can choose where to save the data. Do we need an option that allows users to create a new folder on the server and save the data if they have permission? A new protobuf message sent from the frontend to the backend for exporting data may be like this:

message ExportData {
    // File directory
    string directory = 1;
    // File name
    string name = 2;
    // Comments (spatial/spectral/histogram profiles, x-label, y-label, region box coordinates, etc.)
    repeated string comments = 3;
    // Data (x, y)
    repeated string data = 5;
}

Although the backend has caches for profile raw data, users may want to save the data after smoothing (processed y-value), or with different coordinate values (processed x-value). So far these steps are done on the frontend (except for the histogram). This is a fast and straightforward way. It is also 100% consistent with the exported data to the client site. Although we may have a performance issue when the exported data is very large.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request requiring frontend this backend issue requires work in both frontend and backend
Projects
No open projects
Status: Backlog
Status: Backlog
Development

No branches or pull requests

2 participants