biigle / core

:large_blue_circle: Application core of BIIGLE
https://biigle.de
GNU General Public License v3.0
12 stars 15 forks source link

Compatibility with a central image/video repository #207

Closed mzur closed 3 years ago

mzur commented 4 years ago

Make BIIGLE compatible with a central marine image/video repository that might become available in the future. If the repository can be used for remote volumes/videos, integrate it to make creation of volumes/videos easier. Otherwise, implement an interface to the repository.

mzur commented 4 years ago

The people at GEOMAR are currently evaluating Elements as media asset management system. This is a candidate system to which BIIGLE could establish compatibility.

mzur commented 3 years ago

A connection to Elements might be possible using the Elements API. Authorization is done with a token in the request header. The token can be stored in the user settings. API endpoints to explore are:

All further work requires an Elements instance to use for testing.

mzur commented 3 years ago

The GEOMAR Elements instance is now available. Work on this issue can proceed.

mzur commented 3 years ago

I asked the Elements developers for assistance (elements-storage/elements-sdk-python#1).

mzur commented 3 years ago

This could work in two alternative ways:

  1. Elements is able to create public URLs for directories that can be used with the existing remote volume feature of BIIGLE. No issues here.

    • Apparently this approach can't work.
  2. We implement a new storage disk adapter for Elements. Elements users can share directories with a special Elements user for the BIIGLE instance. The storage disk is configured with an API token of the special Elements user. New volumes are created e.g. with the elements:// disk prefix.

    • What file path is specified? Can we take an actual directory with the filenames? Do we need to use the Elements file IDs? Both could be hard to get through the Elements UI.
    • The files are proxied through BIIGLE so a BIIGLE user can access them even if they are not authenticated with Elements. This could be slow (especially with videos).
      • Elements supports range requests for videos. Loading times could be reasonable if we update the API endpoint of BIIGLE accordingly (which currently downloads and caches the whole file for range requests, I think).
    • The adapter could even support the "public URL" feature of Laravel storage disks, using expiring public share links of Elements. This could be used for videos ( #268 ).
mzur commented 3 years ago

A read-only adapter for Elements is now implemented in biigle/laravel-elements-storage.

mzur commented 3 years ago

The Elements adapter is functional. #268 needs to be resolved to fix performance issues with large videos (this affects any storage disk).