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

OpenEM: Add ingestor app #102

Conversation

phwissmann
Copy link
Collaborator

@phwissmann phwissmann commented Aug 22, 2024

This is a cleaned up version of the ingester app I prototyped a while ago.

The three commits show the journey from wails.io framework to the ingester framework with task queue. It should help to understand how to use wails. Each of the commits should build and compile.

What's missing from the top of my head:

  • webserver and REST API
  • configuration
  • running headless mode without UI needed to run as service (needs some some abstraction on the runtime.emitEvent interface)
  • ingestion task implementation (WIP, have a draft)
  • s3 transfer
  • globus transfer
  • tests

Not meant to be merged at this stage.

image

Add project structure from wails init -t svelte-ts.
Add OpenEM Logo and a sample button
Adds a button to the UI to select folders and adds them to a list
Add ingestion tasks, a worker queue based on go routines and task results. Interactions with the UI are implement as well via buttons and emitted events
@phwissmann phwissmann changed the title Feature/add ingestor app OpenEM: Add ingestor app Aug 27, 2024
@phwissmann phwissmann changed the base branch from feature/library_refactor to main August 27, 2024 15:41
Use viper to parse config from a yaml file. Mulitple paths are check for the config file to exist (cwd, userConfigDir, src/openem-ingestor/core)
Add launch and build task to debug service and app respectively
Set cwd in launch task to executable parent folder
@consolethinks consolethinks marked this pull request as ready for review August 28, 2024 14:24
@phwissmann phwissmann changed the base branch from main to cli-next August 28, 2024 14:27
Copy link
Collaborator

@consolethinks consolethinks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left notes on the code, nothing set in stone though, so feel free to give counterpoints

openem-ingestor/go.mod Outdated Show resolved Hide resolved
openem-ingestor/README.md Show resolved Hide resolved
openem-ingestor/core/api.go Show resolved Hide resolved
openem-ingestor/core/config.go Show resolved Hide resolved
openem-ingestor/core/taskqueue.go Show resolved Hide resolved
// An extremely simple external store
import { writable } from 'svelte/store'
export default writable(0)
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stating the obvious again, but this should be changed later

openem-ingestor/core/taskqueue.go Show resolved Hide resolved
openem-ingestor/service/main.go Show resolved Hide resolved
openem-ingestor/service/openem-ingestor-config.yaml Outdated Show resolved Hide resolved
@phwissmann
Copy link
Collaborator Author

  • CI is missing

@consolethinks consolethinks self-requested a review August 30, 2024 09:10
openem-ingestor/core/config.go Show resolved Hide resolved
func (a *App) ScheduleTask(id uuid.UUID) {

a.taskqueue.ScheduleTask(id)
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to save them to some persistent storage, but it's not a priority for now. If the transfer never completes due to the service crashing or restarting, they can re-request ingestion, maybe with an option to use a pre-existing entry in the scicat database (or use the sourceFolder to see if there's already one).

@minottic
Copy link
Collaborator

minottic commented Aug 30, 2024

just noticed this PR, any reason why this is supposed to become part of the scicat-cli repo and not another repo in openEm which uses the scicat-cli interface/package to connect?

@sbliven
Copy link
Member

sbliven commented Aug 30, 2024

We had discussed wanting to make scicat-cli a mono repo so that versions are sync'd between the CLI, REST daemon, and admin app (this part). However, after reviewing this PR there is more app-specific top-level stuff required than I expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants