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

Simplify Illustration Management #640

Closed
4 tasks done
Arthi-chaud opened this issue Mar 22, 2024 · 0 comments · Fixed by #653
Closed
4 tasks done

Simplify Illustration Management #640

Arthi-chaud opened this issue Mar 22, 2024 · 0 comments · Fixed by #653
Assignees
Labels
Breaking Change This is very likely to cause a breaking change Enhancement/Optimization Anything that could be managed better File Management Anything related to File system management Server Back-end related
Milestone

Comments

@Arthi-chaud
Copy link
Owner

Arthi-chaud commented Mar 22, 2024

We currently have 4 Illustration Models (Artist, Release, Playlist, Track).

  • There should be a single table for illustration models.
  • There should be a single API endpoint to serve the images /illustrations/{id}
  • Updating a resource's illustration should insert a new row in the database and delete the previous one

The current Illustration file system's structure uses the relations between the illustrated models. This makes it very easy for a user to navigate through it.

However, since manual modifications on this FS does not trigger changes in the database, this transparency is useless.
Moreover, the structure causes massive overhead when fetching/serving an image file (need to fetch the parent model(s) to build the path).

  • The Illustration File System's structure should organize illustrations by their ID.

Example: /images/3/cover.jpg instead of:

  • /images/artist_slug/cover.jpg
  • /images/artist_slug/album_slug/release_slug/cover.jpg
  • /images/artist_slug/album_slug/release_slug/disc_index/cover.jpg
  • /images/artist_slug/album_slug/release_slug/disc_index/track_index/cover.jpg

From a client perspective, this new architecture comes with the pros of canceling cache when an illustration changes, since the ID of the illustration will change.

@Arthi-chaud Arthi-chaud added File Management Anything related to File system management Enhancement/Optimization Anything that could be managed better Server Back-end related Breaking Change This is very likely to cause a breaking change labels Mar 22, 2024
@Arthi-chaud Arthi-chaud self-assigned this Mar 22, 2024
@Arthi-chaud Arthi-chaud changed the title Simplify Illustration File System Simplify Illustration Management Mar 22, 2024
@Arthi-chaud Arthi-chaud added this to the v2.0.0 milestone May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change This is very likely to cause a breaking change Enhancement/Optimization Anything that could be managed better File Management Anything related to File system management Server Back-end related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant