frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Question: how to include PSI Ingestor and depositor frontend pages?

Open sbliven opened this issue 11 months ago • 10 comments

Summary

At the 2025-01-21 meeting I showed PSI's new Ingestor and OneDep deposition pages. The main question is how (or whether) we should contribute these features back to the main frontend codebase.

Details

Slides are available here, but I'll repeat the summary:

  • The Web Ingestor page doesn’t require tight integration. It’s an independent page, and only requires an additional link from the scicat menubar. The ingestor could be a general tool for facilities with non-trivial data transfer steps and is applicable to all data types.
  • The Depositor is tightly integrated into the Dataset Details as a new tab. It is selectively enabled based on dataset properties. And it only applies to cryoEM data, making it not relevant to many facilities.

Implementation options

Three implementation options were discussed.

  1. Enableable Feature in Core. Features are included in the main scicat image (but must be enabled in the config). Example: the current 'Create Dataset' feature
  2. Separate Service + links. The feature runs as a separate web service. The only frontend change is to allow custom links (configured similarly to #1700). Example: the DOI landing pages
  3. Plugin system/microfrontend. Refactor the frontend to allow site-specific code to be loaded at runtime. Example: ICAT microfrontend
Enableable Feature in Core Separate Service + links Plugin system/microfrontend
Implementation difficulty + Easy + Medium (needs separate repo and web service) - Major refactor
Integration with other pages + Full integration possible - No integration (link only) + Tight integration is possible (depending on plugin API)
Frontend JS size - Increases frontend size, even for sites that disable it + Minimal code size increase + Depends on implementation

sbliven avatar Jan 22 '25 12:01 sbliven

Some additional links were posted in chat for various plugin approaches (thanks @dylanmcreynolds and @minottic )

  • https://module-federation.io/
  • https://single-spa.js.org/
  • https://webpack.js.org/concepts/module-federation/

sbliven avatar Jan 22 '25 12:01 sbliven

Personally I would probably go with either the separate service approach ( note, that without a sso solution inplace the user may needs to login multiple times) or the plugin system as that allows better facility customizations.

bpedersen2 avatar Jan 22 '25 14:01 bpedersen2

as much as I like 3, I think it requires a huge amount of work and it's personally not what I would start with. IMO, a solution in between, especially for the depositor which is well scoped, is web components (or loading JS scripts dynamically if we want an even quicker solution), which could be enabled selectively as part of deploying the FE through its config.

minottic avatar Jan 22 '25 15:01 minottic

Related:

  • #1519
  • #1642
  • #986
  • #1700
  • https://github.com/SciCatProject/scicat-backend-next/issues/862

sbliven avatar Jan 23 '25 13:01 sbliven

Number 1 is the easiest from our point of view. Are there strong opinions against this? There are many features implemented this way already.

sbliven avatar Jan 23 '25 13:01 sbliven

I agree with @minottic that solution 3 requires a major refactoring and we are lacking resources at the moment. After digesting all the information provided, I would try with solution 1 provided that we generalize and well-define the functionalities. Regarding the dataset ingestion, I propose that this feature should be the evolution of the rudimentary "create dataset" functionality that is currently present in FE, but is clearly limited and confusing. About the depositor, I would suggest that this should implemented as "dataset actions" which can be configurable with a set of rules similar to the "datafiles" actions which are already in the FE code

nitrosx avatar Jan 27 '25 10:01 nitrosx

Thanks, Spencer for putting it down here. I'd go for option 2 as this emphasizes the strength of scicat to integrate with other systems easily and institutes can decide if they want it or not. I'm not much in favor of option 1, as other instituts would have to carry addtional load they may not want - you mentioned yourself it may be not so useful to "many facilities" due to its specific use case . However I think with option 2, the respective site admin can be inspired and adopt to his case. Option 3 would be off the table due to its implementation efforts.

rkweehinzmann avatar Jan 29 '25 08:01 rkweehinzmann

I vote option 1 for the Web Ingestor. It's a feature that already exists in the scicat core (create dataset form) with a greater enhancement. For the Depositor option 3. I don't quite see the use case at the moment, so would prefer it to be as flexible as possible

Junjiequan avatar Jan 30 '25 14:01 Junjiequan

I vote option 1 for the Web Ingestor. It's a feature that already exists in the scicat core (create dataset form) with a greater enhancement.

I very much agree with this!

And still think the depositor should be a web component...

minottic avatar Jan 30 '25 14:01 minottic

Based on the discussion in today's meeting, we will prepare a PR for option 1 (using the new customization options for buttons). This will make it easier to test functionality and make sure it's suitable for inclusion in core.

sbliven avatar Feb 04 '25 21:02 sbliven