-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
Add API to replace FS access #832
Comments
Hi @fionera, thanks for trying Navidrome! I already thought about introducing this FS abstraction, but after moving my library to GDrive and setting up RClone to mount it, I don't see any advantage of incorporating this functionality directly into Navidrome's codebase. It would be more code to maintain and it would never be better than something dedicated to it, like RClone. Think about all the tweaks and fine-tuning one have to do to make the access as fast and transparent as possible? Having said that, I may still implement this in a future version, but it is definitely not a priority now because, as I said, you can already achieve this by using RClone. Let me know your thoughts, and if I'm missing any important aspect of this. |
I have a big library I cant just mount with rclone and I would implement my own driver for it then anyway. If its wanted, I could take a look into implementing this |
I'm all for contributions, but I still don't get why you say you can't just mount it.. My library is 70K songs, mostly FLAC and it works pretty well, taking less than 30 seconds to add a new album. I know some folks that have more than a million songs, also mounting using rclone. Can you elaborate a bit more on why this is not possible in your case. And, in the issue description you said:
So, I'm kind of confused here: why do you say using rclone as a storage source is good, but mounting with it is not? Anyway, if we decide to implement something like this, I'd like to use an approach of external plugins, maybe using Hashicorp's go-plugin library |
The Library I want to use and index currently has over 20 million songs and is over 500TB in size. Its split across multiple s3 buckets and not sorted in a human readable way. There are multiple abstractions in there. If I mount it, its far more overhead. Using rclone was just an example, so I am not the only one who would use that Interface ;) I dont really like the native go plugin system, since it has multiple problems and the go-plugin lib from Hashicorp is using gRPC under the hood which afaik also adds overhead since you stream real files, tho for the normal User that shouldnt be a problem. |
Wow! Are you trying to launch your own streaming service? LOL! Seriously though, abstracting away the FS access is a Good Thing ™️, but I'm not sure how we would handle TagLib's access to the files (it is a C++ library, not Go). By the way, in your case, you may encounter other issues with this huuuuge library, ex: I'm not sure if SQLite3 is the best option to store a library this size. |
Nah not really, I am just experimenting with some open Storage Systems and want to access them over a nice UI. In this case I want to try to Index some Items from Archive.org. Regarding TagLib... Arent there other Libraries that are written in Go for that? Maybe switch? |
Unfortunately TagLib is the best option out there, and there are upcoming features that depends on some of its features, like multi-valued tags. Maybe we can create a File class in C++ whose methods calls the |
I'll throw in my $0.02, as I think object store support (i.e. S3) would be very useful...
Anyway, those are some initial reasons I can think of right now. I wrote this quickly & ad-hoc, so if anything is unclear, let me know and I'll see if I can expand further. If I'm wrong about something, please don't hesitate to correct me. I'd take a shot at trying to implement this myself, but I'm not really a golang guy, mostly a Rust + TypeScript guy. I have worked with go-plugin a bit though (along with gRPC for HashiCorp clustering tools), so I hope it wouldn't be too foreign, but who knows. I'm also really short on time currently and don't want to do a quick/crappy job, so it might take me a month or two to get around to it. Thoughts? EDIT: Gah, I just noticed PR #851 lol :) |
@xorander00, good points, and I'm starting to think it may be worth to implement something like this. But I still think it would be better to be implemented as a plugin, and I don't think the gRPC would cause any performance issues, as the main bottleneck would be the communication with the remote storage. As I said before, we would need to write a C++ File class wrapper for |
@deluan I'm interested in picking this up. Do you already have a plan in place to implement? Also, I'm not sure what your thoughts were on the |
I think the first step is what @fionera started doing (still doing?): Abstract away all access to the filesystem with calls to Next would be to make taglib and ffmpeg work through For ffmpeg, I think we could read the file with Go code as a Reader and pass it as stdin (instead of an argument as -i), both for the probe command (to read tags) and for the transcoding. For taglib, your idea of using What do you think? |
I'd like to take a closer look at I'm very interested in this feature, as I would like to be able to natively use Navidrome with webdav. I care a little about File class wrapper vs buffer, but not enough to keep me from hacking on this if you are REEALLY tied to the wrapper. I'll get back to you as I'm able. |
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Navidrome team are limited, and so we are asking for your help. |
I'm still very interested in this; rclone mount has been unreliable for me so i'd really like native s3 support |
Keep in mind that Navidrome needs to read the tags and will do a request per file. This may get expensive if you're not careful. |
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Navidrome team are limited, and so we are asking for your help. |
Pretty sure if Navidrome were hosted on an EC2 instance in the same region as the S3 bucket you wouldn't incur transfer-out cost on scan, only on client access. Of course if you're hosting Navidrome on EC2 you could also just use a mounted EBS volume or even EFS, but that would be several times the cost. |
Hi, I would like to use navidrome, but I have my files in an object storage and I would like to directly interact with it. How about an API so it is possible to use other storage providers. This could also allow to use as example rclone as storage source
The text was updated successfully, but these errors were encountered: