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

Node nevermined service refactor #51

Open
6 tasks
r-marques opened this issue Nov 16, 2022 · 0 comments
Open
6 tasks

Node nevermined service refactor #51

r-marques opened this issue Nov 16, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request refactor

Comments

@r-marques
Copy link
Member

r-marques commented Nov 16, 2022

The node nevermined service https://github.com/nevermined-io/node/blob/main/src/shared/nevermined/nvm.service.ts currently handles to much responsibilities (ipfs, filecoin, s3, ...).

This makes it difficult to work with and modify. This is a problem since this service is handling the different integrations that nevermined has with different 3rd party services.

The goal of this epic is to follow the nestjs best practices and separate all this functionality into different services. Ideally we should have a different service for each integration, and we should use nestjs provided tools instead of more external npm packages:

  • Service to handle files stored on S3: upload and download
  • Service to handle files stored on ipfs: upload and download
  • Service to handle files stored on filecoin: upload and download
  • Service to handle files meant to be retrieved by url: download
  • Make use of nestjs httpmodule to make http requests https://docs.nestjs.com/techniques/http-module
  • Add tests for the services. Specially test failure conditions like 404 when the file does not exist and 401 when there are authorization issues when accessing 3rd party services
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor
Projects
None yet
Development

No branches or pull requests

2 participants